TikTok API endpoint
Lists the country filters offered by TikTok Creative Center Top Ads. Each country has an `id` such as `US`, a `value` (the country name), a `label` and a `has_conversion` flag. Takes no parameters.
/tiktok/top-ads/locationsNotable response behavior:
| Field | Filled in, of 73 checked |
|---|---|
| id | 73 |
| value | 73 |
| label | 73 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/tiktok/top-ads/locations" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"code": 0,
"msg": "OK",
"data": {
"country": [
{
"id": "US",
"value": "United States",
"label": "US"
}
]
}
}
}Request schema
No body schema
Response schema
#/definitions/populartrend.topAdsLocationsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | popularTrend.TopAdsLocationsResp | No | ||||
| data.code | integer | No | ||||
| data.data | object | No | Countries available for top ads targeting. | |||
| data.data.country | array | No | ||||
| data.data.country[].has_conversion | boolean | No | Whether the objective is one that tracks conversions. Only set on objective options. | |||
| data.data.country[].id | object | No | Filter option id in TikTok's own format, a string or a number depending on the filter. | |||
| data.data.country[].label | string | No | Label key TikTok uses for the option. | |||
| data.data.country[].parent_id | object | No | Id of the parent option, for example the top-level industry of a sub-industry. | |||
| data.data.country[].value | string | No | Display value of the option, always returned as a string. | |||
| data.msg | string | No | ||||
| data.request_id | string | No | Request id returned by TikTok Creative Center. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/tiktok/top-ads/locations" \
-H "x-api-key: $CRAWLORA_API_KEY"