Campaigns in your TikTok ad account — status, budget
tiktok-ads.campaignsList the campaigns in your TikTok ad account with objective, status and budget
- Price
- freeAt provider cost
- Success rate
- —No success-rate data yetNo success-rate data yet
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/tiktok-ads.campaignsPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameters
budget is a number in the account currency and budget_mode says whether it is daily (BUDGET_MODE_DAY) or lifetime. Two status fields disagree on purpose: operation_status is what you set (ENABLE/DISABLE), primary_status is what TikTok is actually doing (delivering, budget exceeded, in review)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
page | integer | Optional | 1 | |
fields | array | Optional | JSON array; omit for the default field set | ["campaign_id","campaign_name","objective_type","budget","budget_mode","operation_status"] |
filtering | object | Optional | JSON object in the query string: {"primary_status":"STATUS_DELIVERY_OK"} or {"campaign_ids":["123"]} | {"primary_status":"STATUS_DELIVERY_OK"} |
page_size | integer | Optional | max 1000, default 10 — the small default is the usual reason a campaign looks missing | 100 |
advertiser_id | string | Required | 7000000000000000000 | |
- Query parameters
pageintegerOptionalExample:
1fieldsarrayOptionalJSON array; omit for the default field set
Example:
["campaign_id","campaign_name","objective_type","budget","budget_mode","operation_status"]filteringobjectOptionalJSON object in the query string: {"primary_status":"STATUS_DELIVERY_OK"} or {"campaign_ids":["123"]}
Example:
{"primary_status":"STATUS_DELIVERY_OK"}page_sizeintegerOptionalmax 1000, default 10 — the small default is the usual reason a campaign looks missing
Example:
100advertiser_idstringRequiredExample:
7000000000000000000
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
curl -X GET 'https://toolswitch.dev/v1/tools/tiktok-ads.campaigns' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/tiktok-ads.campaigns",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/tiktok-ads.campaigns", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at free, including the service fee.