Campaigns in your TikTok ad account — status, budget
tiktok-ads.campaignsList the campaigns in your TikTok ad account with objective, status and budget
- Price
- freeZum Anbieterpreis
- Success rate
- —Noch keine ErfolgsratendatenNoch keine Erfolgsratendaten
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/tiktok-ads.campaignsPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameter
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 | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Abfrageparameter | ||||
page | Ganzzahl | 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 | Objekt | Optional | JSON object in the query string: {"primary_status":"STATUS_DELIVERY_OK"} or {"campaign_ids":["123"]} | {"primary_status":"STATUS_DELIVERY_OK"} |
page_size | Ganzzahl | Optional | max 1000, default 10 — the small default is the usual reason a campaign looks missing | 100 |
advertiser_id | Zeichenkette | Erforderlich | 7000000000000000000 | |
- Abfrageparameter
pageGanzzahlOptionalBeispiel:
1fieldsArrayOptionalJSON array; omit for the default field set
Beispiel:
["campaign_id","campaign_name","objective_type","budget","budget_mode","operation_status"]filteringObjektOptionalJSON object in the query string: {"primary_status":"STATUS_DELIVERY_OK"} or {"campaign_ids":["123"]}
Beispiel:
{"primary_status":"STATUS_DELIVERY_OK"}page_sizeGanzzahlOptionalmax 1000, default 10 — the small default is the usual reason a campaign looks missing
Beispiel:
100advertiser_idZeichenketteErforderlichBeispiel:
7000000000000000000
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
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());Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit free einschließlich Servicegebühr abgerechnet.