# Get Statistic Campaign, Adgroup, Ad

## URL

{% hint style="success" %}
<https://tiki.ants.vn/v3/admin/api/report/performance>
{% endhint %}

## Request Params fix value

> When call API, please send params with fix value (always send in API)

| Param              | Required | Value      |
| ------------------ | -------- | ---------- |
| \_state            | yes      | app.report |
| \_token            | yes      |            |
| \_user\_id         | yes      | 1210044026 |
| data\_source\_type | yes      | 2          |
| format             | yes      | grid       |

## Request parameters

| Param      | Required | Description                                                                                                                                                                                                                                                                                                           |
| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| from\_date | No       | Start date get data statistic (example: 26/02/2020). Default is last 7 days                                                                                                                                                                                                                                           |
| to\_date   | No       | End date get data statistic (example: 03/03/2020). Default is yesterday.                                                                                                                                                                                                                                              |
| limit      | No       | Default 10 row                                                                                                                                                                                                                                                                                                        |
| page       | No       | Default: 1                                                                                                                                                                                                                                                                                                            |
| metrics    | yes      | Hard value: PROCEEDS,CLICK,IMPRESSION                                                                                                                                                                                                                                                                                 |
| segments   | yes      | <ol><li>if get data Campaign, send value: <strong><code>DAY,LINEITEM\_ID</code></strong></li><li>if get data Ad Group, send value: <strong><code>DAY,LINEITEM\_ID,CAMPAIGN\_ID</code></strong></li><li>if get data Ad, send value: <strong><code>DAY,LINEITEM\_ID,CAMPAIGN\_ID,CREATIVE\_ID</code></strong></li></ol> |

## Example API

```
https://tiki.ants.vn/v3/admin/api/report/performance?_state=app.report&_token=&_user_id=1210044026&data_source_type=2&format=grid&from_date=26%2F02%2F2020&to_date=03%2F03%2F2020&limit=10&page=1&metrics=PROCEEDS,CLICK,IMPRESSION,ECPC_VAT&segments=DAY,LINEITEM_ID,CAMPAIGN_ID,CREATIVE_ID
```

## Response parameters

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

| Name         | Description                                                                                                                    |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| day          | Date                                                                                                                           |
| lineitem\_id | The ID of the Campaign.                                                                                                        |
| campaign\_id | The ID of the Ad Group                                                                                                         |
| creative\_id | The ID of the Ad                                                                                                               |
| proceeds     | The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period. (campaign spend (cost)) |
| click        | The number of clicks.                                                                                                          |
| impression   | Count of how often your ad has appeared on a search results page                                                               |
| ecpc\_vat    | The total cost of all clicks divided by the total number of clicks received. (avg. cpc)                                        |

{% endtab %}

{% tab title="Output example" %}
Status 200

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "rows": [
      {
        "day": "Mar 03, 2020",
        "lineitem_id": "4758553215",
        "campaign_id": "4758932899",
        "creative_id": "4758933385",
        "proceeds": 1081582,
        "click": "20",
        "impression": "27",
        "ecpc_vat": "54079"
      }
    ],
    "total_records": "265814"
  }
}
```

{% 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://developers.ants.vn/tiki_ads/support-api-tiki/data_statistat.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.
