TikTok Ad Library Search API
Search TikTok Commercial Content Library — relevance-filtered, uniform null schema (2 credits).
GET request to /v1/ad-library/tiktok/search that responds with clean JSON and costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.What is the TikTok Ad Library Search API?
Search TikTok's Commercial Content Library (library.tiktok.com / EU DSA) by keyword. Local keyword matching is case-insensitive whole-word match=any|all (hair ≠ wheelchair). Envelope uses candidatesScanned / truncated (true when literalMatches > totalReturned); each hit has matchedFrom as a string array of matched fields. platform is tiktok (library=dsa). media[] are objects with url/type/expiresAt when signed. Ads share a uniform key set — withheld fields are null, not missing. firstShown/lastShown are omitted (DSA list XHR stamps scrape/serve times, not run dates) — use /tiktok/ad-details for calendar-day ISO dates. advertiser is always {id,name,url,logo,location}. Flat 2 credits when results are returned (empty is free); Apify fallback capped at 5. Hard-capped at 110s. country default GB (US often empty). For brand performance use /v1/ad-library/tiktok/top-ads.
What you get
- Ranked, structured result list
- Title, URL, author, and thumbnail per result when available
- Engagement metrics where the platform exposes them
- Configurable result limit
Try it
Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).
Parameters
curl "https://api.captapi.com/v1/ad-library/tiktok/search?q=nike" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."Edit the parameters and the code updates instantly. Switch languages and hit copy.
Example response
{
"success": true,
"data": {
"query": "nike",
"country": "GB",
"totalReturned": 3,
"ads": [
{
"platform": "tiktok_ad_library",
"id": "1872402620173314",
"url": "https://library.tiktok.com/ads/detail/?ad_id=1872402620173314",
"text": "Professional Massage Therapy for Relaxation, Recovery, and Wellness.",
"adFormat": "video",
"firstShown": "2026-08-02T00:00:00.000Z",
"lastShown": "2026-08-02T00:00:00.000Z",
"impressions": "0-1K",
"advertiser": {
"name": "HongKong AdTiger Media Co., Limited",
"location": "Hong Kong"
},
"media": [
"https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/3dff80d5a4f73a22d6682afa5f45d78d~tplv-tiktokx-origin.jpeg?dr=14582&refresh_token=cd5ba53f&x-expires=1785686400&x-signature=m6GakMpuep1d%2BRNlCGpC0K9CiWE%3D&t=4d5b0474&ps=13740610&a",
"https://library.tiktok.com/api/v1/cdn/1785667308/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS9mMTgyNTU3Yzg1OGVjOGEwM2RkMGQ1MjRjZTRlOWM4Ny82YTZmNzM3ZS92aWRlby90b3MvYWxpc2cvdG9zLWFsaXNnLXZlLTAwNTFjMDAxLXNnL29zOU5VSkFzZ0lMUGVtT0RoRlVHZUdSQzNSb1JnbW5lQUFKTEdiLw==/fee44425-7600-4c48-8df9-ce242eb52069?a=475769&bt=593&btag=e00088000&bti=PDU2NmYwMy86&ft=.NpOcInz7Thz~INGXq8Zmo&l=2026080218414895FDAC2A6CF961573BDF&mime_type=video_mp4&rc=N2hoOzVpZzM1OTs0aDM5aUBpajVpOGw5cjRqPDMzODYzNEBjMmFeYy9fXzMxMS0zLTJjYSNxZy82MmRraWthLS1kMC1zcw%3D%3D&signature=v7cmUB0AYCwTjyukuWGzRGtiRJKMRb6UOyUo2szN2pY%3D&vvpl=1"
],
"impressionsRange": {
"min": 0,
"max": 1000,
"raw": "0-1K"
}
},
{
"platform": "tiktok_ad_library",
"id": "1872069030885697",
"url": "https://library.tiktok.com/ads/detail/?ad_id=1872069030885697",
"text": "Visit the website and learn more.",
"adFormat": "video",
"firstShown": "2026-08-02T00:00:00.000Z",
"lastShown": "2026-08-02T00:00:00.000Z",
"impressions": "0-1K",
"advertiser": {
"name": "VV7 HOLDING LLC",
"location": "United States"
},
"media": [
"https://p16-common-sign.tiktokcdn.com/ad-site-i18n-sg/20260729c7c7767b1bd4c6634305aba2~tplv-tiktokx-origin.jpeg?dr=14582&refresh_token=a7fcf310&x-expires=1785686400&x-signature=H8hajcaAaLOzUe4Qcbse8V10R%2Bs%3D&t=4d5b0474&ps=13740610&shp=0c75dd76&s",
"https://library.tiktok.com/api/v1/cdn/1785667310/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS9kOTEzMzQzYmVlZTBlODkyNDRhOTZjYmE0ZTdjYzk1OS82YTZmNzM2MC92aWRlby90b3MvYWxpc2cvdG9zLWFsaXNnLXZlLTAwNTFjMDAxLXNnL28wM3VvbDdZak5BRUFpSHcybXk5enB2aVVNY0JCWGFRQ3FOSUEv/a83a6b69-bc09-432a-a704-4cb96c22fbb2?a=475769&bt=997&btag=e000b8000&bti=PDU2NmYwMy86&ft=.NpOcInz7Thn~INGXq8Zmo&l=202608021841508CA9C9F51CA00456AC9F&mime_type=video_mp4&rc=Z2dpNWY5ZTdmM2k8ZzU2OEBpM3FvcnU5cmw2PDMzODYzNEBhMDUyLjFhXjQxMF5jXy1eYSNiY3MwMmRrLmlhLS1kMC1zcw%3D%3D&signature=c1LXfiH6SOrrYOTEWg4TRCzE%2BNR%2BSu0k%2Fuj%2FDEUJ3vk%3D&vvpl=1"
],
"impressionsRange": {
"min": 0,
"max": 1000,
"raw": "0-1K"
}
}
]
}
}Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.
Response structure
A successful call returns success, cached, creditsUsed, and a data object with the following fields:
Top-level fields
queryThe search query you sent.countryCountry for the request context. On popular-creators top-level: ISO feed market you queried (e.g. US) — not each creator's home country (see region).totalReturnedNumber of items returned in this response.
Ads
Each item in ads contains:
platformPlatform identifier for this response (matches the endpoint's platform).idStable platform ID for the item.urlCanonical URL of the item.textText content.adFormatFormat of the ad creative.firstShownWhen the ad was first shown.lastShownWhen the ad was last shown.impressionsEstimated ad impressions.advertiserAdvertiser running the ad.mediaArray of {url,type,width,height,durationSeconds,expiresAt?} — expiresAt only when the signed CDN URL encodes one.impressionsRangeParsed impressions as {min, max, raw}. Prefer this for sorting; impressions stays the Meta display string. Usually null for commercial ads.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Keyword or advertiser to search TikTok Commercial Content Library (min 2 characters). |
| country | string | No | Two-letter ISO country code (e.g. GB, DE, FR). Default GB (EU DSA library; US often empty). |
| match | string | No | Keyword token mode: "any" (default, OR whole-word) or "all" (AND). hair ≠ wheelchair. Empty results are free. |
| limit | integer | No | Max items to return (default 20, max 200). Flat 2 credits per call. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits. |
Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh.
tiktok_ad_library_search via @captapi/mcp. Set it up →How it works
- 1. Sign up — get 100 free credits, no card required.
- 2. Create a key from your dashboard.
- 3. Send one request to
/v1/ad-library/tiktok/searchand parse the JSON response.
Use cases
Trend Discovery
Find trending content by keyword or hashtag.
Content Sourcing
Build feeds and playlists programmatically.
Monitoring
Track topics, brands, and competitors.
Research
Sample large sets of content for analysis.
Frequently asked questions
What does the TikTok Ad Library Search API do?+
The TikTok Ad Library Search API lets you search and return matching results from a public TikTok Ad Library query using one GET request to /v1/ad-library/tiktok/search. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the TikTok Ad Library Search API cost?+
Each successful call costs 2 credits. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.
Do I need a TikTok Ad Library API key or OAuth?+
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.
Is this TikTok Creative Center (CTR / Top Ads)?+
No. This endpoint searches TikTok's Commercial Content Library (library.tiktok.com — EU DSA transparency). For Creative Center Top Ads with CTR, likes, industry/objective, and orderBy, use GET /v1/ad-library/tiktok/top-ads.
Why is this only 2 credits when older docs said ~70?+
Native Decodo search is flat 2 credits when ads are returned (empty is free). The old ~70 figure was Apify billed at ~3.5 credits per result (limit 20). Apify fallback is now capped at 5 credits total.
Why did my keyword return zero ads?+
Read candidatesScanned, filteredOut, literalMatches. match=any (default) keeps rows with any whole-word token in advertiser/title/copy; match=all requires every token. TikTok's keyword ranking is soft — we never echo that unfiltered list. If candidatesScanned>0 and totalReturned=0, the library had rows and local filter dropped them (try an advertiser name token). US is often empty; default GB.
Is the TikTok Ad Library Search API suitable for production use?+
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.
More TikTok Ad Library APIs
Ready to use the TikTok Ad Library Search API?
Sign up, grab your key, and make your first call in 60 seconds.