Skip to content
Blog7 min read

TikTok Ad Library API: get a competitor's TikTok ads with payer, targeting and impressions as JSON

Guide
What TikTok's own Commercial Content API asks for (an application, a client access token, 10 ads per request) beside a querying.ai tiktok_ad_library search for a competitor's TikTok ads in Germany, with payer, targeting and impressions, at 0.5 credits per 30 ads

TikTok's own Commercial Content API needs an approved application and returns 10 ads per request, for Europe only. Read a competitor's TikTok ads as JSON with one API key: search the TikTok Ad Library by advertiser or keyword in 34 regions, with payer, landing page, targeting and impressions by age and gender, plus request examples, response fields and the cost per 10,000 ads.

What TikTok offers developers

TikTok publishes the ads shown in Europe in its Commercial Content Library and offers the Commercial Content API on top of it. The product page lists three steps: create a TikTok for Developers account with your official email address, complete the online application with the information it asks for, then wait for TikTok's answer, which it says comes within 2 working days. If the application is approved, the client key for the API appears in your developer account. TikTok describes the data as open to the public and researchers, and says the API includes ads data from the EU to begin with. Source: TikTok Commercial Content API.

The Query Ads reference sets the shape of a call. You exchange the client key and secret for a client access token and send POST /v2/research/adlib/ad/query/ with the fields you want. max_count defaults to 10 and its maximum is 10, so every 10 ads take one more call with the search_id of the last response. The filters need a published date range whose start is within one year, and a search term holds 50 characters or less. Source: Query Ads.

A research project that fits the application gets what it needs there, 10 ads at a time. A team that tracks competitors every week, or wants ads from Türkiye or Brazil, starts with an application and a loop of small pages. The rest of this guide reads the same library as JSON with one API key.

TikTok ad data: TikTok Commercial Content API and querying.ai, November 2026
TikTok Commercial Content APIquerying.ai tiktok_ad_library
AccessOnline application, client key, client access tokenAn API key and one HTTP request
Ads per requestUp to 10Up to 300, or 60 with details
RegionsEU, EEA, UK, SwitzerlandEU, EEA, UK, Switzerland, Türkiye, Brazil (34)
Search bySearch term, dates, countries, filtersadvertiserName, query, country, dates
Payer, landing page, targetingAd details call, one ad eachad, or every ad of a search with details
Summary of the adsBuild it yourselfsummary: formats, landing domains, launches by week

Get a competitor's TikTok ads as JSON

Two requests cover one competitor. advertisers with the start of its name returns the exact names the library knows, up to 20, in the country you pick:

curl -X POST https://api.querying.ai/v1/ads/tiktok-ad-library/advertisers \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "nike", "country": "DE" }'

Then search with that exact name in advertiserName lists its ads, 30 by default and up to 300. sortBy orders them by publish date, last shown date or impressions. Add details: true to read every ad the way ad does, up to 60 per request. A request waits for the result up to 290 seconds and answers in the same call. Reference: TikTok Ads.

curl -X POST https://api.querying.ai/v1/ads/tiktok-ad-library/search \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "advertiserName": "NIKE Retail B.V.", "country": "DE", "details": true, "limit": 6 }'

The response counts the advertiser's ads in the library and lists each ad with its run dates, impressions range, payer, landing page and targeting:

{
  "platform": "tiktok_ad_library",
  "action": "search",
  "country": "DE",
  "advertiserName": "NIKE Retail B.V.",
  "totalCount": 20862,
  "returnedCount": 6,
  "hasMore": true,
  "ads": [
    {
      "libraryId": "1882509444419618",
      "advertiserName": "NIKE Retail B.V.",
      "startDate": "2026-11-21",
      "endDate": "2026-11-21",
      "activeDays": 1,
      "format": "VIDEO",
      "ctaText": "Shop now",
      "objective": "Sales",
      "landingDomain": "nike.com",
      "payer": "INITIATIVE MEDIA B.V.",
      "impressions": { "min": 0, "max": 1000 },
      "targeting": {
        "byCountry": [{ "country": "DE", "ages": ["18-24"], "genders": ["FEMALE"] }],
        "targetAudienceSize": "22.0M-26.8M"
      },
      "detailStatus": "read"
    }
  ],
  "summary": { "landingDomains": [{ "domain": "nike.com", "ads": 6 }], "medianActiveDays": 1 },
  "detailedCount": 6
}
tiktok_ad_library search response fields, November 2026
FieldWhat it holds
totalCount, returnedCount, hasMore, nextCursorThe library's count of matching ads, the ads in this response, whether more remain, and the cursor that reads them
ads[].libraryId, advertiserName, title, formatThe ad's ID, the advertiser, its text and VIDEO, IMAGE or TEXT
ads[].startDate, endDate, activeDaysThe first and last day the library shows the ad, in UTC, and the days between them
ads[].impressions, estimatedAudienceThe impressions range as numbers and as the library writes it
ads[].payer, linkUrl, landingDomain, utmWho paid and where the ad leads, with details or ad
ads[].targeting, transparencyAges, genders, regions and audience size, and impressions by country, age and gender
ads[].images, videosSigned media URLs that expire about 5 to 6 hours after the read
summaryFormats, landing domains, launches by ISO week, the 5 longest running ads and the median activeDays

Open one ad and read who it targets

Open one ad with ad, its libraryId and the country of the search:

curl -X POST https://api.querying.ai/v1/ads/tiktok-ad-library/ad \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "libraryId": "1879578148398450", "country": "DE" }'
{
  "ad": {
    "title": "Neue Winterausrüstung in Nike Factory Stores.",
    "linkUrl": "https://www.nike.com/de/retail",
    "payer": "INITIATIVE MEDIA B.V.",
    "objective": "Traffic",
    "startDate": "2026-10-20",
    "endDate": "2026-11-08",
    "activeDays": 20,
    "targeting": { "provinces": ["Berlin"], "targetAudienceSize": "15.5M-18.9M" }
  },
  "advertiser": { "registryCountry": "Netherlands", "account": { "username": "nike", "followers": "9.4M" } },
  "transparency": {
    "totalImpressions": "300K-400K",
    "byCountry": [{ "country": "DE", "impressions": "357K", "breakdowns": [{ "age": "18-24", "gender": "MALE", "impressions": "44K" }] }]
  }
}
  • Read payer across a competitor's ads to see which agency buys its TikTok media.
  • Read summary.launchesByWeek from a daily search to see when a competitor starts a new push.
  • Compare targeting.byCountry and transparency.byCountry to see whom a competitor aims at and who saw the ad.
  • Search with query to see which advertisers run ads on a product or hashtag, in order of relevance.

Top ads in the US, Korea and Japan

The ad library answers for its 34 regions only, so a country such as US, KR or JP is rejected with 400 VALIDATION_ERROR. For those markets, tiktok-creative-center reads the TikTok Creative Center top ads of 28 countries over the last 7, 30 or 180 days, with each ad's ctrPercent, likes, costLevel, industry and objectives. It is a ranked sample with no advertiser lookup, dates or impressions, so use it to see which hooks and formats work in a market:

curl -X POST https://api.querying.ai/v1/ads/tiktok-creative-center/search \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "country": "US", "period": 30, "sortBy": "ctr", "limit": 25 }'

Cost per 10,000 ads

Cost of 10,000 TikTok ads, list prices on November 26, 2026
PlanPrice and creditsAd list, per 10,000 adsWith details, per 10,000 ads
querying.ai Basic$20 / 8,000 credits$0.42$2.92
querying.ai Pro$200 / 170,000 credits$0.20$1.37
querying.ai Scale$500 / 480,000 credits$0.17$1.22
querying.ai Max$1,000 / 1,000,000 credits$0.17$1.17

A search is charged 0.5 credits for every 30 ads it returns, at least 0.5 credits, so a search of 300 ads costs 5 credits and 10,000 ads cost 167 credits. details adds 0.5 credits for every 5 ads read in detail, so a detailed search of 60 ads costs 7 credits and 10,000 ads with their details cost 1,167 credits. Prices are each plan's monthly price divided by its credits. advertisers and ad cost 0.5 credits each, and only completed requests are charged. A new account starts with 500 free credits, enough for 30,000 ads before you pick a plan.

Limits to plan for

  • country is required on every call and takes one of the 34 library regions. A search covers one country, so run one search per market.
  • The library keeps ads for about 13 months and the default range is the last 365 days. To keep a competitor's history, search its ads every day and store them.
  • A query search is ordered by relevance and its totalCount stops at 5,000. An advertiserName search counts every ad of that name and takes sortBy.
  • The library publishes impressions as ranges and gives no spend. isActive has a value only when activeStatus is active or inactive.
  • A search of 300 ads takes about a minute, and image and video URLs expire about 5 to 6 hours after the read, so save the files you need. Compare the other ad libraries in Ad libraries compared.

Frequently asked questions

Does TikTok have an Ad Library API?

Yes. TikTok offers the Commercial Content API for its ad library. You apply from a TikTok for Developers account, and an approved application gets a client key for a client access token. Its Query Ads call returns up to 10 ads per request for the EU, the EEA, the UK and Switzerland.

Which countries does the TikTok Ad Library cover?

The library covers ads shown in Europe. On querying.ai, tiktok_ad_library takes 34 regions: the EU and EEA countries, the UK, Switzerland, Türkiye and Brazil. For the US, Korea and Japan, tiktok_creative_center lists the top ads of a country.

How do I get a competitor's TikTok ads as JSON?

Find the exact advertiser name with POST /v1/ads/tiktok-ad-library/advertisers, then send it as advertiserName, with a country, to POST /v1/ads/tiktok-ad-library/search. Add details: true to read each ad's payer, landing page and targeting in the same request.

How much does a TikTok ad search cost on querying.ai?

0.5 credits for every 30 ads a search returns, which is $0.42 per 10,000 ads on Basic and $0.17 on Max. With details, 10,000 ads cost $2.92 to $1.17.

Can I see who paid for a TikTok ad and whom it targeted?

Yes. ad and a search with details return payer, targeting by country, age, gender and region, and transparency with impressions by country, age and gender.

How many ads can one request return?

Up to 300 with limit, or up to 60 with details. Send the response's nextCursor as cursor with the same search to read the next ads.

  • Ad Library API for Competitor Ads

    Search the Meta, Google, LinkedIn and TikTok ad libraries by keyword or by advertiser and get your competitors' ads as JSON through one async API. Ads from Facebook, Instagram, Google Search, YouTube, Display, Maps, LinkedIn and TikTok arrive with their creative, format, advertiser and landing page, and with the run dates and impressions the library publishes.

Start free

500 free credits when you sign up. Collect your first answers in minutes.

Start free

More from the blog