ACRCloud
Visit WebsiteConsole
  • Introduction
  • Get Started
  • Console Tutorials
    • Recognize Music
    • Recognize Custom Content
    • Broadcast Monitoring for Music
    • Broadcast Monitoring for Custom Content
    • Detect Live & Timeshift TV Channels
    • Recognize Custom Content Offline
    • Recognize Live Channels and Custom Content
    • Find Potential Detections in Unknown Content Filter
  • SDK REFERENCE
    • Mobile SDK
      • iOS
      • Android
      • Unity
    • Backend SDK
      • Python
      • PHP
      • Go
      • Java
      • C/C++
      • C#
    • Error Codes
  • API Reference
    • Identification API
    • Console API
      • Access Token
      • Buckets
        • Audio Files
        • Live Channels
        • Dedup Files
      • Base Projects
      • OfflineDBs
      • BM Projects
        • Custom Streams Projects
          • Streams
          • Streams Results
          • Streams State
          • Recordings
          • Analytics
          • User Reports
        • Broadcast Database Projects
          • Channels
          • Channels Results
          • Channels State
          • Recordings
          • Analytics
          • User Reports
      • File Scanning
        • FsFiles
      • UCF Projects
        • BM Streams
        • UCF Results
    • Metadata API
  • Tools
    • Audio File Fingerprinting Tool
    • Local Monitoring Tool
    • Live Channel Fingerprinting Tool
    • File Scan Tool
  • Metadata
    • Music
    • Music (Broadcast Monitoring with Broadcast Database)
    • Custom Files
    • Live Channels
    • Humming
  • FAQ
    • Definition of Terms
  • Service Usage
Powered by GitBook
On this page
  • Create a project
  • List projects
  • Get a project
  • Update a project
  • Delete a project
  • Get the status of the project's buckets
  • Get the statistics of the project
  1. API Reference
  2. Console API

Base Projects

Create a project

POST https://api-v2.acrcloud.com/api/base-projects

Create a recognition project

Headers

Name
Type
Description

Authorization

string

Bearer token

Request Body

Name
Type
Description

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

{
    "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 --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);
});

List projects

GET https://api-v2.acrcloud.com/api/base-projects

Query Parameters

Name
Type
Description

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

Headers

Name
Type
Description

Authorization

string

Bearer token

{
    "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 --location --request GET 'https://api-v2.acrcloud.com/api/base-projects?type=AVR' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

Get a project

GET https://api-v2.acrcloud.com/api/base-projects/:id

Get the details of a project

Path Parameters

Name
Type
Description

id

number

The project id

Headers

Name
Type
Description

Authorization

string

Bearer token

{
    "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 --location --request GET 'http://127.0.0.1:8080/api/base-projects/15' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

Update a project

PUT https://api-v2.acrcloud.com/api/base-projects/:id

Path Parameters

Name
Type
Description

id

number

The project id

Headers

Name
Type
Description

Authorization

string

Bearer token

Request Body

Name
Type
Description

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

{
    "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 --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 a project

DELETE https://api-v2.acrcloud.com/api/base-projects/:id

Path Parameters

Name
Type
Description

id

number

The project id

Headers

Name
Type
Description

Authorization

string

Bearer token

Get the status of the project's buckets

GET https://us-api-v2.acrcloud.com/api/base-projects/:id/buckets-status

Path Parameters

Name
Type
Description

id

string

The project id

Headers

Name
Type
Description

Authorization

string

Bearer token

Response

Nmae
Type
Description

buckets

string

The buckets your porject are using.

nodes

string

The server nodes for the buckets

status

string

1: healthy 0: unhealthy

```json
{
    "ACRCloudFile": [
        {
            "buckets": [
                {
                    "name": "ACRCloud Music",
                    "id": 23
                }
            ],
            "nodes": {
                "node": "46671216359c47fc0c1b236194f7cca0",
                "status": 1
            }
        }
    ]
}
```
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 the statistics of the project

GET https://api-v2.acrcloud.com/api/base-projects/:id/day-stat

Path Parameters

Name
Type
Description

id

number

The project id

Query Parameters

Name
Type
Description

start

string

The start date YYYY-MM-DD

end

string

The end date

Headers

Name
Type
Description

Authorization

string

Bearer token

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 updated 9 months ago