TikTok Ad Library Scraper — DSA Commercial Content Spy avatar

TikTok Ad Library Scraper — DSA Commercial Content Spy

Pricing

$2.00 / 1,000 ad scrapeds

Go to Apify Store
TikTok Ad Library Scraper — DSA Commercial Content Spy

TikTok Ad Library Scraper — DSA Commercial Content Spy

Scrape TikTok's official DSA-mandated public Ad Library (library.tiktok.com). Search by keyword or browse all ads per country. Get advertiser, video URL, cover, image URLs, first/last shown dates, estimated audience, spend and impressions. Headless bootstrap + HTTP pagination.

Pricing

$2.00 / 1,000 ad scrapeds

Rating

0.0

(0)

Developer

Walid

Walid

Maintained by Community

Actor stats

0

Bookmarked

28

Total users

18

Monthly active users

9 days ago

Last modified

Share

TikTok Ad Library Scraper extracts ads from TikTok's official DSA-mandated public Ad Library (library.tiktok.com) — every ad that ran in the EU: advertiser, dates, estimated audience tier, and the direct video URL. Turn on fetchDetails to enrich the top ads with the DSA per-ad detail: real impressions, the age × gender delivery breakdown (who actually saw the ad), the advertiser's TikTok account, and the media agency. Different from the Creative Center: this is the full DSA library (FR alone has 83M+ ads). Browse all ads per country or search by keyword. Headless bootstrap + pure HTTP pagination.

Found this useful? Click the Bookmark button at the top of this page — it's the single strongest signal that keeps this actor visible to others. One click. No signup beyond your existing Apify account.


What can TikTok Ad Library Scraper do?

  • 🌍 Browse the full DSA library per country (FR, DE, IT, ES, NL, PL...) — 83M+ ads in FR alone
  • 🔍 Search by keyword in ad content / advertiser names
  • 📊 DSA audience tierestimated_audience (0-1K, 1K-10K, 10K-100K...) on every ad
  • 🔬 Per-ad DSA detail (fetchDetails) — real impressions per region, the age × gender delivery breakdown, the advertiser's TikTok account (username + followers), and the media agency
  • 🎬 Direct video URLs + cover + image URLs
  • 📅 Period filter — last N days
  • 🧭 2 sectionsads (standard) and other (other commercial content)
  • 📈 Sort modes — newest / oldest / highest impressions
  • Headless bootstrap (~10s) + HTTP pagination — 60 ads in ~25s

What data can you extract per TikTok ad?

FieldDescription
ad_idTikTok DSA library ad ID
advertiser_nameAdvertiser display name
advertiser_idInternal advertiser/business ID
audit_statusDSA moderation status
typeAd type code
first_shown_msFirst shown date (epoch ms)
last_shown_msLast shown date (epoch ms)
estimated_audienceDSA audience tier (e.g. 0-1K, 1K-10K, 10K-100K...)
impressionsNumber of impressions reported by TikTok
spentSpend disclosure
video_urlDirect video URL
cover_urlCover image
image_urlsAll image URLs (carousel ads)
regionCountry code
detail_urlDirect link to the DSA detail page

In the list view impressions and spent are empty — TikTok returns them only on the per-ad detail. Enable fetchDetails to get real impressions. spent stays empty for commercial ads (the DSA discloses ad spend for political / issue ads only).


Per-ad DSA detail (fetchDetails)

The list endpoint returns audience tier only. Enable fetchDetails to enrich the top maxDetails ads with the official DSA detail payload, added under a detail key on each ad:

FieldDescription
impressions_totalTotal impressions (tier, e.g. 1M-10M)
impressions_by_regionReal impressions per country (e.g. FR: 5.0M)
delivery_demographicsWho actually saw the ad — age × gender × impressions rows
advertiser_accountThe advertiser's TikTok account: username, followers, account_type, profile_link
media_agencyThe sponsoring media agency (e.g. PUBLICIS MEDIA FRANCE)
objective, cta, landing_url, ad_titleAd objective, call-to-action, landing page, copy
target_audience_size, targeted_age, targeted_gender, targeted_countriesDeclared targeting

Detail is fetched in one reused headless browser (~2.5s per ad), so it stays cheap. Each enriched ad is billed as one extra ad (no separate pricing event). Keep maxDetails low on large runs.


How to spy on TikTok ads (DSA library)

  1. Create a free Apify account — no credit card required
  2. Open TikTok Ad Library Scraper in Apify Store
  3. Pick a country (default FR) and optionally a query keyword
  4. Pick a period (default 30 days) and sort (newest / impressions)
  5. Click Start — ads stream within seconds

How much does it cost to spy on TikTok DSA ads?

$0.002 per ad ($2 per 1,000 ads). One-shot headless bootstrap (~10s once per run) then pure HTTP pagination.

Run sizeAdsApify costTime
Quick test12~$0.024~15s
Standard60~$0.12~25s
Deep240~$0.48~1min
Massive1000~$2~3min

Input parameters

ParameterTypeDefaultDescription
regionstringFRISO 2-letter code (EU + supported globals)
querystringKeyword to search; empty = browse all ads
sectionstringadsads or other (other commercial content)
periodDaysinteger30Lookback window in days
orderstringlast_shown_date,desclast_shown_date,desc/asc, first_shown_date,desc, impression,desc
maxResultsinteger60Cap on total ads returned
fetchDetailsbooleanfalseEnrich the top ads with the DSA per-ad detail (real impressions, age × gender delivery, advertiser account, agency). Reused headless browser; each enriched ad is billed as one extra ad.
maxDetailsinteger10Max ads to enrich when fetchDetails is on (~2.5s each).
useResidentialProxybooleanfalseEnable only if you hit rate limits

Output example

{
"ad_id": "1866718100189281",
"advertiser_name": "olesiashopart",
"advertiser_id": null,
"audit_status": "1",
"type": "2",
"first_shown_ms": 1780241349000,
"last_shown_ms": 1780241349000,
"estimated_audience": "0-1K",
"impressions": 0,
"spent": null,
"video_url": "https://library.tiktok.com/api/v1/cdn/.../video.mp4",
"cover_url": "https://...cover.image",
"image_urls": [],
"region": "FR",
"detail_url": "https://library.tiktok.com/ads/detail/?ad_id=1866718100189281"
}

Use cases

  • EU competitor ad spy — every TikTok ad shown in any EU country since 2023
  • DSA compliance research — pull the official transparency record per advertiser
  • Agency reporting — full library coverage (way wider than the Creative Center's curated Top Ads)
  • AI training data — bulk video URLs + DSA-tier labels
  • Dropshipping research — sort by impression,desc to surface winning creatives

Use the actor via API

Python:

import requests
run = requests.post(
"https://api.apify.com/v2/acts/dltik~tiktok-ad-library/runs",
headers={"Authorization": "Bearer YOUR_APIFY_TOKEN"},
json={"region": "FR", "query": "nike", "periodDays": 30, "maxResults": 60}
).json()
print("Run started:", run["data"]["id"])

curl:

curl -X POST "https://api.apify.com/v2/acts/dltik~tiktok-ad-library/runs" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"region":"FR","query":"nike","periodDays":30,"maxResults":60}'

FAQ

What's the difference vs the TikTok Creative Center scraper? TikTok runs two transparency products. The Creative Center showcases a curated "Top Ads" feed for advertiser inspiration (with CTR + likes). The DSA Ad Library (this scraper) is the official EU-mandated public record of every ad shown — far wider coverage, includes the DSA-mandated fields (audience tier, impressions, spend). Use this for compliance, deep competitor sweeps, EU-targeted research.

Do I need a TikTok account? No. The DSA library is a public transparency tool. The scraper bootstraps a session token in a headless browser (once per run) then paginates over HTTP — no login, no cookies.

Why does the actor briefly run Chromium? The library API requires an x-ccl-str token generated client-side. We capture one fresh token in ~10s via headless Chromium then reuse it for the rest of the run via fast HTTP calls.

Advanced: refresh signing without redeploy. If TikTok rotates the validity window and the bundled fallback expires, override two env vars in the Apify console: TT_CCL_STR (the token), TT_CCL_REFERER (the page URL it came from). Copy them from the request headers of any /api/v1/search call in DevTools.


Found this TikTok Ad Library Scraper useful? Bookmark it — Apify ranks actors by bookmarks, so it's the strongest single signal for Store visibility.

Other scrapers by dltik

ActorWhat it doesPrice
Facebook Ads Library ScraperMeta (Facebook + Instagram) ad library spy with DSA detail enrichment$0.75/1K
Google Ads Transparency ScraperGoogle Search, YouTube, Display ad spy via official Ad Transparency Center$0.8/1K
LinkedIn Ad Library ScraperB2B competitor ad spy from LinkedIn's public Ad Library$2/1K
TikTok Creative CenterCurated Top Ads with CTR + likes + MP4 video URL$2/1K