# Get Ads Report

Returns TikTok's aggregate ad publication report: country share and daily unique-ad counts, optionally filtered to one advertiser.

- Platform: [TikTok Ad Library](https://docs.upscrape.com/docs/platforms/tiktok-adlibrary)
- Capability ID: `tiktok-adlibrary.ads.report.get`
- Cost: 10 credits per request
- Maximum runtime: 60 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "country": "ALL"
  },
  "capability": "tiktok-adlibrary.ads.report.get"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `advertiser_name` | `string` | No | Exact advertiser name from advertiser.search; provide with business_id. |
| `business_id` | `string` | No | Advertiser business id from advertiser.search; provide with advertiser_name. |
| `country` | `string` | No | Current TikTok Commercial Content Library region, or ALL. |
| `end_date` | `string` | No | Report end date, inclusive; defaults to today. |
| `start_date` | `string` | No | Report start date; the range may span at most 31 days. |

### Example input

```json
{
  "country": "ALL"
}
```

## Response

Successful output is returned in `results[0].data`. Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This redacted fixture is an example, not a fixed response schema.

```json
{
  "ad_activity": {
    "columns": [
      "region",
      "percent"
    ],
    "rows": [
      [
        {
          "str_value": "GB"
        },
        {
          "double_value": 0.07593036472458096
        }
      ],
      [
        {
          "str_value": "DE"
        },
        {
          "double_value": 0.05512698278534072
        }
      ],
      [
        {
          "str_value": "FR"
        },
        {
          "double_value": 0.046793195784205
        }
      ]
    ]
  },
  "ad_published": {
    "columns": [
      "date",
      "total_count"
    ],
    "rows": [
      [
        {
          "int64_value": 1784764800
        },
        {
          "int32_value": 9279039
        }
      ],
      [
        {
          "int64_value": 1784851200
        },
        {
          "int32_value": 9853321
        }
      ],
      [
        {
          "int64_value": 1784937600
        },
        {
          "int32_value": 8537046
        }
      ]
    ]
  }
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `ad_activity` | `object` | 2 fields |
| `ad_activity.columns` | `array` | 2 items |
| `ad_activity.rows` | `array` | 3 items |
| `ad_published` | `object` | 2 fields |
| `ad_published.columns` | `array` | 2 items |
| `ad_published.rows` | `array` | 3 items |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
