Campaigns in your TikTok ad account — status, budget
tiktok-ads.campaignsList the campaigns in your TikTok ad account with objective, status and budget
- Price
- freeプロバイダー原価
- Success rate
- —成功率データはまだありません成功率データはまだありません
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/tiktok-ads.campaignsPreview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
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)
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
page | 整数 | 任意 | 1 | |
fields | 配列 | 任意 | JSON array; omit for the default field set | ["campaign_id","campaign_name","objective_type","budget","budget_mode","operation_status"] |
filtering | オブジェクト | 任意 | JSON object in the query string: {"primary_status":"STATUS_DELIVERY_OK"} or {"campaign_ids":["123"]} | {"primary_status":"STATUS_DELIVERY_OK"} |
page_size | 整数 | 任意 | max 1000, default 10 — the small default is the usual reason a campaign looks missing | 100 |
advertiser_id | 文字列 | 必須 | 7000000000000000000 | |
- クエリパラメータ
page整数任意例:
1fields配列任意JSON array; omit for the default field set
例:
["campaign_id","campaign_name","objective_type","budget","budget_mode","operation_status"]filteringオブジェクト任意JSON object in the query string: {"primary_status":"STATUS_DELIVERY_OK"} or {"campaign_ids":["123"]}
例:
{"primary_status":"STATUS_DELIVERY_OK"}page_size整数任意max 1000, default 10 — the small default is the usual reason a campaign looks missing
例:
100advertiser_id文字列必須例:
7000000000000000000
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
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());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は free です。サービス料を含みます。