At a glance
What the TikTok Ads Library API does
- Search by
- Keyword, advertiser name or Ad Library URL
- Filters
- Country (EU/EEA, UK, CH, TR or all), last N days, sort order, exact max ads per query
- Output
- 27 fields per ad incl. targeting summary; JSON, CSV, Excel, API
- Automate
- Schedules, webhooks, Zapier, Make, n8n, Google Sheets, MCP for AI agents
Who it is for
- Marketers and agencies studying competitors' TikTok ads and targeting in Europe
- E-commerce brands tracking which products rivals push on TikTok, with the new-ads feed
- Media buyers benchmarking reach, audiences and objectives by country
- Sales teams finding businesses that actively advertise on TikTok
Output
What you get
- Ad id and public Ad Library link
- Advertiser name, advertiser id, registered location, paid-for-by and the linked TikTok account (handle, display name, followers, account type, profile link)
- First and last shown dates in ISO 8601 UTC
- Unique users reached as text and as numbers
- Ad text, call to action, landing page (or app-store link for app ads), objective, industry
- Video, video cover and image links
- Targeting summary: countries, provinces, cities, ages, genders, interests, audience size, custom audience, languages, devices, operating systems, and reach by country, age and gender
Example
Input and output
Input
{
"queries": [
"sneakers",
"https://library.tiktok.com/ads?region=DE&adv_name=NIKE%20Retail%20B.V.&adv_biz_ids=6876453864464188162&query_type=2"
],
"country": "FR",
"days": 30,
"maxResultsPerQuery": 50
}One output record
{
"ad_id": "1878781117610354",
"advertiser_name": "Birkenstock Europe GmbH",
"advertiser_id": "7210820606949064706",
"advertiser_registered_location": "Germany",
"paid_for_by": "BIRKENSTOCK EUROPE GMBH",
"tiktok_business_account": "birkenstockeurope",
"tiktok_business_account_followers": "51.9K",
"tiktok_account_display_name": "Birkenstock Europe",
"tiktok_account_type": "BLUEV_BA",
"tiktok_account_url": "https://www.tiktok.com/share/user/7122063849268446214?source=ad_review",
"industry": "Apparel & Accessories",
"first_shown": "2026-10-11T00:00:00Z",
"last_shown": "2026-11-03T00:00:00Z",
"unique_users_seen": "200K-300K",
"unique_users_seen_range": {
"min": 200000,
"max": 300000
},
"ad_text": "Vos chaussures d’automne",
"call_to_action": "Learn more",
"landing_url": "https://www.birkenstock.com/fr/nouvelle-collection/?utm_source=tiktok&utm_medium=cpm&utm_campaign=2610_new-collection-autumn_fr&utm_content=video&utm_term=pr…",
"objective": "Reach",
"format": "video",
"video_urls": [
"https://library.tiktok.com/api/v1/cdn/1793821782/video/aHR0cHM6Ly92NzcudGlrdG9rY2RuLmNvbS9hZjRkODE2MDIzYWVhMTI4OTMwY2ZlOGY1ZjI5MzA2MC82YWViZTBiZS92aWRlby90b3…"
],
"video_cover_urls": [
"https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/o0rMSaVIvvksiAYiyAB2dAYV0BUOLj33zxmNE~tplv-tiktokx-origin.jpeg?dr=14582&refresh_token=5a35dab7&…"
],
"image_urls": [
"https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/o0rMSaVIvvksiAYiyAB2dAYV0BUOLj33zxmNE~tplv-tiktokx-origin.jpeg?dr=14582&refresh_token=5a35dab7&…"
],
"removed": false,
"targeting": {
"regions": [
"FR"
],
"provinces": [],
"cities": [],
"ages": {
"FR": [
"18-24",
"25-34",
"35-44",
"… 2 more"
]
},
"genders": {
"FR": [
"female",
"male",
"unknown"
]
},
"audience_size": "14.0M-17.1M",
"interests": [
"Sports & Outdoors",
"Music",
"Men's Clothing",
"… 6 more"
],
"video_interactions": "Beauty & Style, Sports & Outdoors",
"creator_interactions": "Fashion & Beauty",
"custom_audience": "No",
"excluded_audience": "Yes",
"languages": [],
"devices": [],
"operating_systems": [
"ALL"
],
"high_spending_power": "No",
"reach_by_region": [
{
"region": "FR",
"unique_users_seen": "261K",
"by_age_gender": [
{
"age": "18-24",
"gender": "male",
"unique_users_seen": "25K"
},
{
"age": "18-24",
"gender": "female",
"unique_users_seen": "51K"
},
{
"age": "18-24",
"gender": "unknown",
"unique_users_seen": "0-1K"
},
"… 12 more"
]
}
]
},
"details_loaded": true,
"search_region": "FR",
"ad_library_url": "https://library.tiktok.com/ads/detail/?ad_id=1878781117610354",
"source_url": "https://library.tiktok.com/ads/detail/?ad_id=1878781117610354",
"scraped_at": "2026-11-04T19:49:36Z"
}From a real run of this tool; long text and lists shortened here.
How to use it
Three steps
- Put keywords or advertiser names (e.g. 'sneakers', 'Nike') or Ad Library URLs into Queries.
- Optionally pick a country, the last N days, the sort order and the exact number of ads per query; turn on 'Only new ads since last run' for a feed.
- Click Start, then download JSON, CSV or Excel, or schedule it and send results to Google Sheets, Zapier, Make or n8n.
API
Call it from Python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("aurelix/tiktok-ads-library-scraper").call(run_input={'queries': ['sneakers',
'https://library.tiktok.com/ads?region=DE&adv_name=NIKE%20Retail%20B.V.&adv_biz_ids=6876453864464188162&query_type=2'],
'country': 'FR',
'days': 30,
'maxResultsPerQuery': 50})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)pip install apify-client. The same input works from the Apify console, a schedule, Make, n8n, Zapier or an AI agent through the Apify MCP server.
Pricing
Pay per result
| Per 1,000 ads, free plan | $1.40 |
| Start fee per run | $0.02 |
Live prices from the Apify Store; no subscription and no platform usage billed on top. See the Store page.
Honest limits
What it does not do
- Data comes from the public Ad Library web pages, not TikTok's official research API (which needs an approved developer application). A TikTok layout change can break it until fixed; the daily health run catches that within 24 hours.
- TikTok's search shows at most about 5,000 ads per query; split big searches by country or by a shorter date range.
- Video and image links are signed by TikTok and expire after a while; download creatives soon after the run.
- With the targeting summary on, each ad needs its own public detail page, so runs take about 2 seconds per ad; turn it off for a faster list at the same price.
- TikTok throttles the library from time to time. The Actor waits and retries, and opens fresh sessions; if TikTok still refuses, that query stops early, the run still succeeds with a PARTIAL status message, and you pay only for the ads returned.
- TikTok's own search is not stable: the 'Total ads' it reports moves between page loads, and it sometimes ends a result list early (no 'View more'). When that happens before your limit, the status message marks the query PARTIAL; rerun later for more.
- Runs connect from Apify's servers without a proxy, which is fastest and costs least. If TikTok throttles them, a query can stop early (PARTIAL in the status message, you pay only for ads returned); rerun later.
FAQ
Questions buyers ask
How much does the TikTok Ads Library API cost?
$1.40 per 1,000 ads, billed through your Apify account; you pay only for results. Apify's free plan includes $5 of credit a month, enough for about 3,571 ads.
Do I need a TikTok account or an API key?
No. The Actor reads the public Ad Library pages that anyone can open without logging in. It never logs in and uses no account or API key.
Is this legal?
It reads only public data any logged-out visitor can see: TikTok's Commercial Content Library, which TikTok publishes under the EU Digital Services Act. It goes at a polite pace, never logs in and never solves CAPTCHAs. It returns ad fields and advertiser names as the library shows them. Data is returned as shown publicly on the source; people can ask for removal by opening an issue on this Actor's Issues tab; if TikTok formally asks us to stop, this Actor will stop. You are responsible for using the data lawfully, incl. anti-spam and privacy laws; this is not legal advice.
Which countries are covered?
Only the countries TikTok's ad library covers: the EU/EEA countries, Switzerland, the United Kingdom and Turkey. Ads shown only in the US or elsewhere are not in the library. Choose 'All covered countries' to search them all at once, or add an Ad Library URL per country to 'queries'.
What is 'unique users seen'?
TikTok's own reach estimate for the ad, given as a range such as 100K-200K. The Actor also returns it as numbers in 'unique_users_seen_range', and per country, age and gender in the targeting summary.
Does the limit really hold?
Yes. 'Max ads per query' is an exact cap applied after duplicates are removed, and Apify's spending limit is respected too.
Can I use it from an AI assistant?
Yes. The input is described for agents: give 'queries' and optional filters. It works through Apify's MCP server and API.
Why did a query return fewer ads than I asked for?
TikTok's search often ends its result list early, or refuses 'View more' after several tries. The query is then marked PARTIAL in the run status with the number of ads it reached, and you pay only for the ads returned. Rerun later, or split the search by country or a shorter period. In our test runs the prefilled 'sneakers' search stopped at 4 ads this way.
How do I get the ads of one exact advertiser?
Search the advertiser on library.tiktok.com, copy the page address (it contains adv_biz_ids) and paste it into 'queries'. A plain name such as 'Nike' is searched like a keyword.
How are duplicates handled?
Each ad is returned once per run, even when several queries find it, and duplicates are not charged. With 'Only new ads since last run', ads returned by an earlier run with the same queries, country and sort order are skipped and not charged; the memory forgets ads not seen for 60 days. Set a state key to keep separate feeds apart.
What does 'Include targeting summary' change?
It opens each ad's public detail page to add targeting, objective, call to action, landing page, paid-for-by and the advertiser's registered location. The price per ad is the same, but runs are slower. If a detail page does not load, the ad is still returned from the list, with details_loaded false.
What do 'removed' and 'details_loaded' mean?
removed is true when TikTok shows a removal reason for the ad. details_loaded is true when the ad's detail page was read, so the targeting and landing-page fields are filled where TikTok has them.
How far back can I search?
'Days' goes up to 365, because TikTok keeps ads in the library for a year after they last ran. TikTok's search shows at most about 5,000 ads per query.
What am I charged when a run fails or finds nothing?
Invalid input fails at once with a clear message. A search with no ads pays only the start fee. If every query is refused and no ad is returned, the run is marked failed and no ads are charged.
Why are ad_text, call_to_action or landing_url empty on some ads?
They are filled only when the ad has them and the detail page was read. App ads return their app-store link as landing_url.
How do I export ads to Google Sheets?
Download the run's results as CSV or Excel and open them in Google Sheets, or add Apify's Google Sheets integration to the run or a schedule so every run's results land in a sheet.
Guides
Tutorials using this tool
Related
Related tools
Facebook Ad Library Search & API
Facebook and Instagram business ads from the Meta Ad Library: copy, creatives, landing pages, dates, optional EU reach.
Competitor Watch
One report per competitor with only what is new: Meta and TikTok ads, page changes, Shopify products and prices, jobs.
App Store & Google Play Scraper
Scrape App Store and Google Play apps and reviews in one schema: $0.18 per 1,000 apps and $0.025 per 1,000 reviews. App Store data and Google Play data: ratings, installs, developer pages, App Store top charts, several countries per run, only-new-reviews mode. No login; reviewer names as shown.
Try the TikTok Ads Library API
Open it on the Apify Store, paste the example input above and click Start. Results download as CSV, Excel or JSON.