Scrape the TikTok ad library by keyword
apify.tiktok-ads.library.searchScrape publicly running TikTok ads from TikTok's ad library by keyword or advertiser
- Price
- $0.003/resultプロバイダー原価
- Success rate
- 100%Last 30 days · 119 calls
- Latency p50
- 11 sp95 28 s
- Last verified
- 2026/09/26Verified working
POSThttps://toolswitch.dev/v1/tools/apify.tiktok-ads.library.search?timeout=90&maxItems=1&maxTotalChargeUsd=0.05Preview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
returns creative content, advertiser, dates, audience reach and targeting as TikTok discloses them in the Commercial Content Library. Community actor, not an official TikTok surface — the only route to this capability in the catalog, and the one most likely to break upstream, so check the actor's run history before relying on it
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
timeout | 整数 | 任意 | treg's key requires 1-90 so the run and its rows arrive before any wait gives up (a larger pull needs your own key) | 90 |
maxItems | 整数 | 任意 | optional row cap; pay-per-event actors that take the row count from their own input ignore it, so maxTotalChargeUsd is the spend limit | 50 |
maxTotalChargeUsd | 数値 | 任意 | the spend cap Apify enforces on every event this run bills, in dollars. treg's key requires it, above 0 and at most 1, and holds it for the call | 0.5 |
- クエリパラメータ
timeout整数任意treg's key requires 1-90 so the run and its rows arrive before any wait gives up (a larger pull needs your own key)
例:
90maxItems整数任意optional row cap; pay-per-event actors that take the row count from their own input ignore it, so maxTotalChargeUsd is the spend limit
例:
50maxTotalChargeUsd数値任意the spend cap Apify enforces on every event this run bills, in dollars. treg's key requires it, above 0 and at most 1, and holds it for the call
例:
0.5
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
curl -X POST 'https://toolswitch.dev/v1/tools/apify.tiktok-ads.library.search?timeout=90&maxItems=1&maxTotalChargeUsd=0.05' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"limit":1,"offset":0,"region":"all","search":"nike","query_type":"1"}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/apify.tiktok-ads.library.search?timeout=90&maxItems=1&maxTotalChargeUsd=0.05",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"limit\":1,\"offset\":0,\"region\":\"all\",\"search\":\"nike\",\"query_type\":\"1\"}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/apify.tiktok-ads.library.search?timeout=90&maxItems=1&maxTotalChargeUsd=0.05", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"limit\":1,\"offset\":0,\"region\":\"all\",\"search\":\"nike\",\"query_type\":\"1\"}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は $0.003/result です。サービス料を含みます。