TikTok Ad Library

TikTok Ad Library Search API

Search TikTok Commercial Content Library — relevance-filtered, uniform null schema (2 credits native, 5 via fallback).

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}; advertiser.logo is null in practice because the library publishes no advertiser logo (the key stays for the shared ad-library schema). 2 credits when the native path returns results; 5 credits when the fallback path serves them; empty results are 0 credits. Native-only by default (the fallback path is disabled). A miss is a retryable 503 at 0 credits. When the fallback is enabled and the native fetch is slow, it starts beside it (15s for one-page fetches, later for larger limits) and the first useful answer wins. country default GB (US often empty). Coverage is ads shown in the last 30 days (the library's default window): an ad that stopped running more than 30 days ago drops out of results, so a keyword that matched last month can return empty today — use /v1/ad-library/tiktok/ad-details with the ad id for older ads. For brand performance use /v1/ad-library/tiktok/top-ads.

Docs: https://captapi.com/apis/tiktok-ad-library-search

get/v1/ad-library/tiktok/search

Request

  • Base URL: https://api.captapi.com
  • URL: https://api.captapi.com/v1/ad-library/tiktok/search
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Query parameters

qstring required

Keyword or advertiser to search TikTok Commercial Content Library (min 2 characters).

countrystring

Two-letter ISO country code (e.g. GB, DE, FR). Default GB. TikTok's Commercial Content Library only covers the EU/EEA, the UK and Switzerland (32 countries) — other codes (US, SA, …) return 400 UNSUPPORTED_REGION with the supported list; TikTok has no ad-library data for them.

matchstring

Keyword token mode: "any" (default, OR whole-word) or "all" (AND). hair ≠ wheelchair. Literal hits lead; already-fetched SERP ads fill behind them up to limit (matchedFrom [] = ranked fill). Empty results are free.

limitinteger

Max items to return (default 20, max 200). Does not change the price: 2 credits native, 5 via the fallback path, 0 when empty.

cacheboolean

Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.

Response

Success. The data object for this endpoint.

successunknown required

Changes

No recorded changes to this operation across all 3 revisions of this API.