ACRCloud
Ask or search…
K
Links

Base Projects

post
https://api-v2.acrcloud.com
/api/base-projects
Create a project
Create a recognition project
Parameters
Header
Authorization
string
Bearer token
Body
name
string
The project name
region
string
eu-west-1,us-west-2,ap-southeast-1
type
string
There are three types. AVR,LCD,HR. AVR is detecting music or custom content LCD is detecting live channels and time-shifting channels HR is detecting both live channel and custom contents
buckets
array
The project detects content from the buckets. The format is bucket id array.
audio_type
string
linein or recorded. Default is linein recorded: Audio captured via microphone or noisy audio files linein: Audio of original file or stream without noise
external_ids
string
spotify,deezer,isrc,upc,musicbrainz
Responses
200
The project successfully created.
Curl
Python
PHP
Nodejs
curl --location --request POST 'https://api-v2.acrcloud.com/api/base-projects' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}'
import requests
url = "https://api-v2.acrcloud.com/api/base-projects"
payload={
"name":"test",
"region":"eu-west-1",
"buckets":[8881,8883],
"type":"AVR",
"audio_type":"linein",
"external_ids":["spotify", "isr\", "deezer"]
}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-v2.acrcloud.com/api/base-projects',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({"name":"test","region":"eu-west-1","buckets":[8881,8883],"type":"AVR","audio_type":"linein","external_ids":["spotify","isrc","deezer"]});
var config = {
method: 'post',
url: 'https://api-v2.acrcloud.com/api/base-projects',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
get
https://api-v2.acrcloud.com
/api/base-projects
List projects
Parameters
Query
region
string
eu-west-1,us-west-2,ap-southeast-1
type
string
AVR,LCD,HR
page
string
Page number
per_page
string
The results number per page
Header
Authorization
string
Bearer token
Responses
200
Curl
curl --location --request GET 'https://api-v2.acrcloud.com/api/base-projects?type=AVR' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
get
https://api-v2.acrcloud.com
/api/base-projects/:id
Get a project
Get the details of a project
Parameters
Path
id
number
The project id
Header
Authorization
string
Bearer token
Responses
200
Curl
curl --location --request GET 'http://127.0.0.1:8080/api/base-projects/15' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
put
https://api-v2.acrcloud.com
/api/base-projects/:id
Update a project
Parameters
Path
id
number
The project id
Header
Authorization
string
Bearer token
Body
name
string
Project name
buckets
array
The project detects content from buckets. The format is bucket id array.
audio_type
string
linein or recorded
external_ids
string
spotify,deezer,youtube,isrc,upc,musicbrainz
Responses
200
Curl
curl --location --request PUT 'http://127.0.0.1:8080/api/base-projects/15' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"name":"test", "region":"eu-west-1", "buckets":[8881,8883],"type":"AVR", "audio_type":"linein", "external_ids":["spotify", "isrc", "deezer"]}'
delete
https://api-v2.acrcloud.com
/api/base-projects/:id
Delete a project
Parameters
Path
id
number
The project id
Header
Authorization
string
Bearer token
Responses
204
get
https://us-api-v2.acrcloud.com/api/
base-projects/:id/buckets-status
Get the status of the project's buckets
Curl
Python
curl --location --request GET 'https://us-api-v2.acrcloud.com/api/base-projects/:your_project_id/buckets-status' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_token'
import requests
url = "https://us-api-v2.acrcloud.com/api/base-projects/:project_id/buckets-status"
payload={}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer your_token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
get
https://api-v2.acrcloud.com
/api/base-projects/:id/day-stat
Get the statistics of the project
Parameters
Path
id
number
The project id
Query
start
string
The start date YYYY-MM-DD
end
string
The end date
Header
Authorization
string
Bearer token
Responses
200
Curl
curl --request GET 'https://api-v2.acrcloud.com/api/base-projects/:id/day-stat?start=2021-04-09&end=2021-04-23'
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_token'
Last modified 2mo ago