# Analytics

## Get analytics data for the last 7 days

<mark style="color:blue;">`GET`</mark> `https://api-v2.acrcloud.com/api/bm-bd-projects/:project_id/analytics/results`

#### Path Parameters

| Name                                          | Type   | Description    |
| --------------------------------------------- | ------ | -------------- |
| project\_id<mark style="color:red;">\*</mark> | Number | The project id |

#### Query Parameters

| Name                                           | Type   | Description                                                                                                                                   |
| ---------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| stats\_type<mark style="color:red;">\*</mark>  | String | <p>Type of data, including date, track, artists, label, channel.</p><p>If result\_type is custom, then only include date, track, channel.</p> |
| result\_type<mark style="color:red;">\*</mark> | String | Type of result, including music, custom                                                                                                       |

#### Headers

| Name                                            | Type   | Description      |
| ----------------------------------------------- | ------ | ---------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer token     |
| Accept<mark style="color:red;">\*</mark>        | String | application/json |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "data": {
        "id": "ddddcbffeccc2daf603dddde4ed0dddd",
        "project_id": 1234,
        "stats_type": "date",
        "result_type": "music",
        "start_timestamp_utc": "2022-07-27 00:00:00",
        "end_timestamp_utc": "2022-08-02 23:59:59",
        "results": [
            {
                "date": "2022-07-27",
                "play_time": 461059,
                "plays": 4249,
                "rank": 1
            },
            {
                "date": "2022-07-28",
                "play_time": 479187,
                "plays": 4434,
                "rank": 2
            },
            {
                "date": "2022-07-29",
                "play_time": 466170,
                "plays": 4211,
                "rank": 3
            },
            {
                "date": "2022-07-30",
                "play_time": 451512,
                "plays": 3863,
                "rank": 4
            },
            {
                "date": "2022-07-31",
                "play_time": 479693,
                "plays": 4174,
                "rank": 5
            },
            {
                "date": "2022-08-01",
                "play_time": 468885,
                "plays": 4256,
                "rank": 6
            },
            {
                "date": "2022-08-02",
                "play_time": 466158,
                "plays": 4091,
                "rank": 7
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```shell
curl --location --request GET 'https://api-v2.acrcloud.com/api/bm-bd-projects/1234/analytics/results?result_type=music&stats_type=date' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your token}' \
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acrcloud.com/reference/console-api/bm-projects/broadcast-database-projects/analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
