LurkAPI
Docs · Search TikTok Ad Library

Search TikTok Ad Library

Ads shown in the EU, the UK, Switzerland and Turkey that match a keyword or an advertiser, 12 per page.

1 credit per callFresh within 1 hourMCP tool: tiktok_ad_library_search
GEThttps://api.lurkapi.com/v1/tiktok/ad-library/search

Example responseView as markdown

When to use this

Use it to see what a brand or a category advertises on TikTok: each ad with its advertiser, caption, video or images, when it ran and roughly how many people saw it. This is TikTok's Ad Library under the EU Digital Services Act, so it only has ads shown in the EU/EEA, Switzerland, the UK and Turkey. Ads shown only in the US or elsewhere aren't in it.

Search by query, a keyword matched against ad text and advertiser names (so resellers show up too), or by advertiser_name for one advertiser's ads, spelled as the library shows it (e.g. NIKE Retail B.V., as in a result's advertiser_name). Results are ads shown in the last 30 days, most relevant first. region narrows them to one country; an ad that ran in several countries appears under each.

Pagination. 12 ads per page. Pass the response's cursor back as cursor (with the same params) for more; has_more is false at the end. For keyword searches total stops counting at 5,000.

An advertiser_name the library doesn't know returns 404 not_found, with close matches in the message.

Parameters

All parameters go in the query string.

ParameterDescription
query
stringoptional
Keyword, e.g. running shoes. Pass this or advertiser_name.
Example
running shoes
advertiser_name
stringoptional
One advertiser's name as the library shows it, e.g. NIKE Retail B.V. Pass this or query.
region
stringoptional
Where the ads were shown: a 2-letter country code (DE, FR, GB, …) of the 33 countries the library covers, or all.
One of
allATBEBGCHCYCZDEDKEEESFIFRGBGRHRHUIEISITLILTLULVMTNLNOPLPTROSESISKTR
Default
all
Example
DE
cursor
stringoptional
The cursor from the previous response, to get the next page. Keep every other param the same.

Example request

Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.

Language

Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….

Show the example response (2 KB)
{
  "success": true,
  "credits_remaining": 999988,
  "credits_charged": 1,
  "ads": [
    {
      "id": "1876549962700817",
      "url": "https://library.tiktok.com/ads/detail/?ad_id=1876549962700817",
      "advertiser_name": "扬州哲鸟网络科技有限公司",
      "title": "Breathable Running Shoes for Men",
      "category": "Apparel & Accessories",
      "first_shown": 1789603200,
      "last_shown": 1789603200,
      "estimated_audience": "0-1K",
      "videos": [
        {
          "url": "https://library.tiktok.com/api/v1/cdn/1790776192/video/aHR0cHM6Ly92MTZtL…",
          "cover": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/owrWfpAWeA…"
        }
      ],
      "image_urls": [
        "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/owrWfpAWeA…"
      ]
    },
    {
      "id": "1876549961564434",
      "url": "https://library.tiktok.com/ads/detail/?ad_id=1876549961564434",
      "advertiser_name": "扬州哲鸟网络科技有限公司",
      "title": "Breathable Running Shoes for Men",
      "category": "Apparel & Accessories",
      "first_shown": 1789603200,
      "last_shown": 1789603200,
      "estimated_audience": "0-1K",
      "videos": [
        {
          "url": "https://library.tiktok.com/api/v1/cdn/1790776192/video/aHR0cHM6Ly92MTZtL…",
          "cover": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/ooNNDEglIq…"
        }
      ],
      "image_urls": [
        "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/ooNNDEglIq…"
      ]
    }
  ],
  "total": 5000,
  "has_more": true,
  "cursor": "eyJsYXN0X3NvcnQiOlszNy43Njk1NywxNzg5NjAzMjAwMDAwXSwibmV4dF9jdXJzb3IiOjEyfQ=="
}

Response fields

Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.

Show all 19 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
adsobject[]Ads, most relevant first.
ads[].idstringAd id. Pass it as ad_id to TikTok Ad Library ad for targeting and reach.
ads[].urlstringThe ad on library.tiktok.com.
ads[].advertiser_namestringnullableThe advertiser as registered with TikTok; null for the few ads published without one.
ads[].titlestringnullableThe ad's caption text; null if it has none.
ads[].categorystringnullableTikTok's category for the ad, e.g. Apparel & Accessories or Apps; null if none.
ads[].first_shownnumberFirst day the ad was shown in the library's countries, Unix seconds (midnight UTC).
ads[].last_shownnumberLatest day it was shown, Unix seconds (midnight UTC). Yesterday or today for ads still running.
ads[].estimated_audiencestringnullableTikTok's estimate of unique users who saw the ad at least once, as a range such as 10K-100K; null if not given.
ads[].videosobject[]The ad's videos, usually one. Empty for image ads.
ads[].videos[].urlstringMP4 URL. It redirects to TikTok's CDN and expires about 6 hours after we fetched the ad.
ads[].videos[].coverstringnullableCover image URL (expires about 6 hours after we fetched the ad); null if none.
ads[].image_urlsstring[]The ad's images, in order. Empty for most video ads.
totalnumberAds matching the search in the last 30 days. Keyword searches stop counting at 5,000.
has_morebooleanThere are more ads after this page.
cursorstringnullablePass as cursor for the next page. null on the last page.

Pagination

Pass the response's cursor back as cursor, with the other parameters unchanged, for the next page. It's null on the last page. Each page costs 1 credit.

The first five pages, in JavaScript
let cursor = null;
for (let page = 1; page <= 5; page++) {
  const params = new URLSearchParams({ query: "running shoes", region: "DE" });
  if (cursor) params.set("cursor", cursor);
  const res = await fetch(`https://api.lurkapi.com/v1/tiktok/ad-library/search?${params}`, {
    headers: { "x-api-key": process.env.LURKAPI_KEY },
  });
  const data = await res.json();
  if (!data.success) throw new Error(`${data.code}: ${data.error}`);
  console.log(data.ads);
  cursor = data.cursor;
  if (!cursor) break; // last page
}

Caching and freshness

Responses are cached for up to 1 hour, so a repeat call within that window can return the same data. It still costs 1 credit.

Errors

Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.

StatusCodeMeaning
401missing_api_keyNo API key. Send it in the x-api-key header.
401invalid_api_keyThe key is unknown or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack or wait for tomorrow's top-up.
404not_foundThe endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked.
405method_not_allowedEndpoints take GET with query params.
429rate_limitedToo many calls at once. Wait for the retry-after seconds, then retry.
500internal_errorSomething broke on our side. Retry; 5xx errors are free.
502upstream_errorThe platform didn't give a usable answer. Retry; 5xx errors are free.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds; 5xx errors are free.
504upstream_timeoutThe platform took over 30 seconds to answer. Retry; timeouts are free.

Use it in Claude

Once LurkAPI is connected to Claude, this endpoint is the tiktok_ad_library_search tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's tiktok_ad_library_search with query "running shoes", region "DE" and summarize what you find.

Claude calls tiktok_ad_library_search with arguments like these, and each call costs 1 credit:

Tool arguments
{
  "query": "running shoes",
  "region": "DE"
}

Tool results skip nulls and empty lists to save tokens.