Practical Tools
tiktokad-librarycompetitor-researchweb-scraping

How to Scrape TikTok Ad Library for Competitor Research

Learn how to scrape the TikTok Ad Library at scale for competitor research, including filters, output fields, and a ready-to-use Apify actor.

To scrape the TikTok Ad Library for competitor research, send queries to TikTok's Commercial Content Library (part of the Creative Center) and parse the returned ad cards for creative URLs, advertiser names, spend ranges, targeting data, and runtime. The public endpoints cap unauthenticated browsing at roughly 20–40 results per query, so most teams use a managed scraper like the Advanced TikTok Ad Library Scraper / API to pull thousands of ads per competitor in one run. The data is public, so scraping it is legal in the EU and US — the technical limits, not the law, are what break naive scripts.

Quick Answer

To scrape TikTok Ad Library data, query the Commercial Content Library by advertiser name, keyword, country, or date range, then extract ad creatives, advertiser metadata, targeting parameters, and impression ranges from each result. TikTok's public UI returns only 20–40 ads before throttling or blocking, so you need pagination handling, fingerprint rotation, and a way to resolve video URLs. The fastest path is a pay-per-use Apify actor that returns structured JSON or CSV. Output typically includes ad ID, advertiser, video/image URL, EEA impressions, target age groups, and first/last shown dates. Expect 1,000–10,000 ads per competitor depending on category and region.

Yes. The TikTok Commercial Content Library is a public transparency tool TikTok publishes to comply with the EU Digital Services Act (DSA). No login is required, no Terms of Service block automated access to the library specifically, and the data itself — ads shown to users — is not personal data under GDPR. Both Scrapfly and Decodo have documented this as a green-light target.

The legal boundary to watch is the same one that applies to Google: don't bypass authentication, don't scrape PII from comment sections inside ads, and respect robots.txt for the surrounding marketing pages. The ad library endpoints themselves are fair game.

What data can you pull from the TikTok Ad Library?

Each ad record in the Commercial Content Library exposes around 15–25 fields. The high-value ones for competitor research:

  • Advertiser name and verified business ID
  • Ad creative URL (video MP4 or image)
  • First shown date / last shown date — useful for calculating ad lifespan
  • Country/region targeting (EEA-only for DSA disclosures)
  • Age range targeting (e.g., 18–24, 25–34)
  • Gender targeting
  • Interest categories TikTok inferred
  • Unique users reached (bucketed: <1K, 1K–10K, etc.)
  • Ad format (in-feed, Spark Ad, TopView)

Combine these fields and you can answer questions like: Which creatives did Gymshark run longest in Germany targeting 18–24? or What's the average creative refresh cycle for Shein vs. Temu?

How do you get past the 20–40 result limit?

TikTok's unauthenticated Creative Center caps result sets in two ways: a hard pagination ceiling (~40 results per query) and rate limits per IP (around 30 requests/minute before a soft block). Three techniques get you past this:

  1. Query slicing. Instead of one broad query for "fashion," fan out into date windows (week by week), countries, and ad format combinations. The same ad won't appear twice, but the union of slices recovers the full set.
  2. Residential proxy rotation. Datacenter IPs get flagged within 50–100 requests. Residential or mobile pools push that to 1,000+.
  3. Browser fingerprint rotation. TikTok fingerprints canvas, WebGL, and TLS handshakes. Headless Chromium with stock Puppeteer is blocked within minutes; patched stealth builds or real browsers fare better.

If you don't want to maintain proxy pools and fingerprint patches, the Advanced TikTok Ad Library Scraper / API handles all three and bills per result on Apify.

How to scrape TikTok Ad Library step by step

Here's the workflow most competitor-research teams use:

1. Define your target list

Build a CSV of 5–50 competitor advertiser names. Pull them from your own market knowledge, SimilarWeb, or by searching the ad library for category keywords ("activewear," "meal kit," "VPN") and extracting top advertisers.

2. Choose your filters

The library accepts:

  • advertiser_name (exact or fuzzy)
  • keyword (matches ad text + captions)
  • country (ISO codes, EEA + UK + US currently)
  • date_from / date_to
  • ad_format

Narrow filters return cleaner data. Broad keyword searches without country filters waste credits on irrelevant results.

3. Run the scrape

Using the Apify actor, a typical input looks like:

{
  "advertisers": ["Gymshark", "Alo Yoga", "Lululemon"],
  "countries": ["DE", "FR", "IT"],
  "dateFrom": "2025-01-01",
  "dateTo": "2025-12-31",
  "maxAdsPerAdvertiser": 2000
}

A run targeting 3 advertisers × 3 countries × 12 months typically returns 4,000–8,000 ads and finishes in 20–40 minutes.

4. Parse and store

The actor returns JSON. Push it to BigQuery, Postgres, or even a Google Sheet. Useful derived fields:

  • creative_lifespan_days = last_shown - first_shown
  • is_evergreen = creative_lifespan_days > 90
  • creative_hash (perceptual hash of the video) to deduplicate near-identical variants

5. Analyze

Common competitor-research outputs:

  • Top 10 longest-running creatives per competitor (winners they keep spending on)
  • Refresh velocity — new ads per week
  • Targeting overlap matrix — which age/gender/country segments each brand prioritizes
  • Creative format mix — % in-feed vs. Spark Ad vs. TopView

How much does it cost to scrape the TikTok Ad Library?

If you build it yourself, expect $50–$200/month for residential proxies, plus engineering time to maintain the scraper as TikTok ships UI changes (roughly every 6–8 weeks).

With the pay-per-use Apify actor, costs scale linearly with ad count. A typical monthly competitor-research workload — 10 advertisers, 5 countries, full year of data, refreshed weekly — runs in the $20–$60/month range. That's significantly cheaper than ad intelligence SaaS tools like AdSpy or Minea, which start at $99–$199/month and don't expose raw JSON.

How often should you re-scrape for competitor monitoring?

Weekly is the sweet spot for most categories. Ad creative lifespans on TikTok cluster around 7–21 days for performance campaigns, so weekly pulls catch new creatives within their first impressions and let you spot winners before competitors scale them.

For slower categories (B2B SaaS, financial services), monthly is enough. For DTC fashion or gaming, consider daily — the creative refresh rate can exceed 5 new ads per day per major brand.

Set up the actor on Apify's scheduler with a webhook to your data warehouse. Diff against last week's run to surface only new and removed ads — that's the actual signal.

FAQ

Q: Can I scrape TikTok Ad Library data from outside the EU? Yes. The Commercial Content Library is globally accessible via TikTok's Creative Center, and DSA-mandated transparency data covers EEA ads regardless of where you query from. Some advertiser-level fields are richer for EEA campaigns due to DSA requirements, but the core endpoints work from any country.

Q: Does TikTok ban accounts that scrape the ad library? The library doesn't require login, so there's no account to ban. TikTok blocks at the IP and fingerprint level. If you hit rate limits, you'll see HTTP 429s or empty results — not an account suspension. Rotating residential proxies resolves it.

Q: What's the difference between the TikTok Ad Library and the Creative Center? The Creative Center is TikTok's broader marketer-facing portal with trending sounds, hashtags, and top ads. The Commercial Content Library is a specific section of the Creative Center focused on DSA-compliant ad transparency, with advertiser identity and targeting disclosures. Scraping the library specifically gives you the structured competitor data.

Q: Can I get the actual video files, or just metadata? You get direct CDN URLs to the MP4 or image creative. You can download the files separately or feed the URLs to a vision model for creative analysis. Note that TikTok CDN URLs expire after a few hours, so download videos within the same pipeline run if you need persistent copies.

Q: How accurate are the impression and spend ranges? TikTok reports impressions as buckets (e.g., 10K–100K) per DSA requirements, not exact numbers. Spend is not disclosed at all. For directional competitor analysis — which ads got widest reach — buckets are sufficient. For precise spend benchmarking, you'd need to combine ad library data with third-party panel estimates.