Base Projects

post
Create a project

https://api-v2.acrcloud.com/api/base-projects
Create a recognition project
Request
Response
Request
Headers
Authentication
required
string
Bearer token
Body Parameters
name
required
string
The project name
region
required
string
eu-west-1,us-west-2,ap-southeast-1
type
required
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
required
array
The project detects content from the buckets. The format is bucket id array.
audio_type
optional
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
optional
string
spotify,deezer,isrc,upc,musicbrainz
Response
200: OK
The project successfully created.
{
"data": {
"uid": 1,
"access_key": "e7a84ca942a13773f6d22e9fd6808fce",
"access_secret": "9zlEAx57jaCgeLpDKKQmorv0brrhAYqj076n6FyP",
"service_type": "AVR",
"state": 1,
"name": "test",
"region": "eu-west-1",
"day_limit": 0,
"total_limit": 0,
"audio_type": "linein",
"version": 1,
"external_id": "",
"updated_at": "2020-12-25T09:47:25.000000Z",
"created_at": "2020-12-25T09:47:25.000000Z",
"id": 15,
"buckets": [
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
},
{
"id": 8883,
"name": "api-test",
"type": "File",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": ["spotify", "isrc", "deezer"]
}
}
Curl
Python
PHP
Nodejs
Curl
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"]}'
Python
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
<?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;
Nodejs
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
List projects

https://api-v2.acrcloud.com/api/base-projects
Request
Response
Request
Headers
Authentication
optional
string
Bearer token
Query Parameters
region
optional
string
eu-west-1,us-west-2,ap-southeast-1
type
optional
string
AVR,LCD,HR
page
optional
string
Page number
per_page
optional
string
The results number per page
Response
200: OK
{
"data": [
{
"id": 15,
"uid": 1,
"access_key": "e7a84ca942a13773f6d22e9fd6808fce",
"access_secret": "9zlEAx57jaCgeLpDKKQmorv0brrhAYqj076n6FyP",
"name": "test",
"service_type": "AVR",
"state": 1,
"region": "eu-west-1",
"day_limit": 0,
"qps_limit": 0,
"audio_type": "linein",
"version": 1,
"external_id": "",
"created_at": "2020-12-25T09:47:25.000000Z",
"updated_at": "2020-12-25T09:47:25.000000Z",
"buckets": [
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
},
{
"id": 8883,
"name": "api-test",
"type": "File",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": []
},
{
"id": 14,
"uid": 1,
"access_key": "9246b72f271403f4abefd723b10d2810",
"access_secret": "TZZbedkkArX2cLDdz6PBc1rkBkUrq3izQccmjDGc",
"name": "vue-project-2",
"service_type": "AVR",
"state": 1,
"region": "ap-southeast-1",
"day_limit": 0,
"qps_limit": 0,
"audio_type": "recorded",
"version": 1,
"created_at": "2020-08-07T19:21:48.000000Z",
"updated_at": "2020-08-07T19:22:01.000000Z",
"buckets": [
{
"id": 8880,
"name": "ACRCloud Music",
"type": "ACRCloudFile",
"metadata_template": null
},
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
},
{
"id": 8883,
"name": "api-test",
"type": "File",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": [
"Youtube",
"Deezer"
]
},
{
"id": 13,
"uid": 1,
"access_key": "a13717e4bef752c067d0cee5dfc13dfb",
"access_secret": "W0IhtWoQjLceyRNufQUhQabudUu0009APOaciRAy",
"name": "vue-project",
"service_type": "AVR",
"state": 1,
"region": "ap-southeast-1",
"day_limit": 0,
"qps_limit": 0,
"audio_type": "recorded",
"version": 1,
"created_at": "2020-08-07T19:21:48.000000Z",
"updated_at": "2020-08-07T19:22:01.000000Z",
"buckets": [
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": [
"Deezer",
"Spotify"
]
},
{
"id": 5,
"uid": 1,
"access_key": "965eb1aded32934b78a599fffb9befdd",
"access_secret": "BqSmWxTV5dwJgxGVG0Pfxq1wUXHlAXBm4Poy8jpf",
"name": "param_test",
"service_type": "AVR",
"state": 1,
"region": "ap-southeast-1",
"day_limit": 0,
"qps_limit": 0,
"audio_type": "recorded",
"version": 1,
"created_at": "2020-08-07T19:21:48.000000Z",
"updated_at": "2020-08-07T19:22:01.000000Z",
"buckets": [
{
"id": 8880,
"name": "ACRCloud Music",
"type": "ACRCloudFile",
"metadata_template": null
},
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": [
"deezer",
"itunes",
"spotify",
"youtube",
"isrc",
"upc",
"musicstory",
"lyricfind"
]
},
{
"id": 3,
"uid": 1,
"access_key": "01d97da894699fb8e0ea9832e679fdc8",
"access_secret": "0t7zQ23F2yhaXEBqUMZ6qvRzhiGt8BKMvk6FPkfG",
"name": "hr",
"service_type": "HR",
"state": 1,
"region": "ap-southeast-1",
"day_limit": 0,
"qps_limit": 0,
"audio_type": "recorded",
"version": 1,
"external_id": "",
"created_at": "2020-08-07T19:21:48.000000Z",
"updated_at": "2020-08-07T19:22:01.000000Z",
"buckets": [
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
},
{
"id": 8882,
"name": "tv",
"type": "Live",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": []
},
{
"id": 2,
"uid": 1,
"access_key": "896cf772dc1b5f2e9287f524fcc78971",
"access_secret": "5TETNWSHDnGbXv6OhVrgkbbVzQtuhMuFSDpXu4TW",
"name": "tv_project",
"service_type": "LCD",
"state": 1,
"region": "ap-southeast-1",
"day_limit": 0,
"qps_limit": 0,
"audio_type": "recorded",
"version": 1,
"external_id": "",
"created_at": "2020-08-07T19:21:48.000000Z",
"updated_at": "2020-08-07T19:22:01.000000Z",
"buckets": [
{
"id": 8882,
"name": "tv",
"type": "Live",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": []
}
],
"links": {
"first": "https://api-v2.acrcloud.com/api/base-projects?page=1",
"last": "https://api-v2.acrcloud.com/api/base-projects?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api-v2.acrcloud.com/api/base-projects",
"per_page": "20",
"to": 6,
"total": 6
}
}
Curl
Curl
curl --location --request GET 'https://api-v2.acrcloud.com/api/base-projects?type=AVR' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

get
Get a project

https://api-v2.acrcloud.com/api/base-projects/:id
Get the details of a project
Request
Response
Request
Path Parameters
id
required
number
The project id
Headers
Authentication
optional
string
Bearer token
Response
200: OK
{
"data": {
"uid": 1,
"access_key": "e7a84ca942a13773f6d22e9fd6808fce",
"access_secret": "9zlEAx57jaCgeLpDKKQmorv0brrhAYqj076n6FyP",
"service_type": "AVR",
"state": 1,
"name": "test",
"region": "eu-west-1",
"day_limit": 0,
"total_limit": 0,
"audio_type": "linein",
"version": 1,
"external_id": "",
"updated_at": "2020-12-25T09:47:25.000000Z",
"created_at": "2020-12-25T09:47:25.000000Z",
"id": 15,
"buckets": [
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
},
{
"id": 8883,
"name": "api-test",
"type": "File",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": ["spotify", "isrc", "deezer"]
}
}
Curl
Curl
curl --location --request GET 'http://127.0.0.1:8080/api/base-projects/15' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

put
Update a project

https://api-v2.acrcloud.com/api/base-projects/:id
Request
Response
Request
Path Parameters
id
required
number
The project id
Headers
Authentication
required
string
Bearer token
Body Parameters
name
optional
string
Project name
buckets
optional
array
The project detects content from buckets. The format is bucket id array.
audio_type
optional
string
linein or recorded
external_ids
optional
string
spotify,deezer,youtube,isrc,upc,musicbrainz
Response
200: OK
{
"data": {
"uid": 1,
"access_key": "e7a84ca942a13773f6d22e9fd6808fce",
"access_secret": "9zlEAx57jaCgeLpDKKQmorv0brrhAYqj076n6FyP",
"service_type": "AVR",
"state": 1,
"name": "test",
"region": "eu-west-1",
"day_limit": 0,
"total_limit": 0,
"audio_type": "linein",
"version": 1,
"external_id": "",
"updated_at": "2020-12-25T09:47:25.000000Z",
"created_at": "2020-12-25T09:47:25.000000Z",
"id": 15,
"buckets": [
{
"id": 8881,
"name": "bucket-music",
"type": "File",
"metadata_template": null
},
{
"id": 8883,
"name": "api-test",
"type": "File",
"metadata_template": null
}
],
"status_check": 2,
"external_ids": ["spotify", "isrc", "deezer"]
}
}
Curl
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
Delete a project

https://api-v2.acrcloud.com/api/base-projects/:id
Request
Response
Request
Path Parameters
id
required
number
The project id
Headers
Authentication
required
string
Bearer token
Response
204: No Content

get
Get the status of the project's buckets

https://us-api-v2.acrcloud.com/api/base-projects/:id/buckets-status
Request
Response
Request
Path Parameters
id
required
string
The project id
Headers
Authentication
required
string
Bearer token
Response
200: OK
{
"File": [
{
"buckets": [
{
"name": "*****",
"id": 1234
},
{
"name": "****",
"id": 455
}
],
"nodes": {
"id": 60,
"node": "2b86a1171b93bc8348cd40024c0f520f",
"current_connections": 12,
"status": 1,
"sub_nodes": [
{
"name": "***",
"current_connections": 2,
"status": 1
},
{
"name": "***",
"current_connections": 10,
"status": 1
}
]
}
}
],
"Live": [
{
"buckets": [
{
"name": "***",
"id": ***
},
{
"name": "***",
"id": ***
}
],
"nodes": {
"id": 53,
"node": "0672cfab6faf89689b311efe6dfcffd8",
"current_connections": 12,
"status": 1,
"sub_nodes": [
{
"name": "***",
"current_connections": 9,
"status": 1
},
{
"name": "***",
"current_connections": 7,
"status": 1
}
]
}
}
],
"LiveTimeshift": [
{
"buckets": [
{
"name": "***",
"id": **
},
{
"name": "***",
"id": **
}
],
"nodes": {
"id": 54,
"node": "bc50332904aa4c1f5e146dd46ed82d60",
"current_connections": 6,
"status": 1,
"sub_nodes": [
{
"name": "1",
"status": 1,
"current_connections": 4
},
{
"name": "2",
"status": 1,
"current_connections": 4
},
{
"name": "3",
"status": 1,
"current_connections": 3
}
]
}
}
]
}
Curl
Python
Curl
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'
Python
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
Get the statistics of the project

https://api-v2.acrcloud.com/api/base-projects/:id/day-stat
Request
Response
Request
Path Parameters
id
required
number
The project id
Headers
Authentication
required
string
Bearer token
Query Parameters
start
optional
string
The start date YYYY-MM-DD
end
optional
string
The end date
Response
200: OK
Curl
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'