TikTok Scraper avatar

TikTok Scraper

Pricing

from $2.00 / 1,000 results

Go to Apify Store
TikTok Scraper

TikTok Scraper

TikTok Ads Library & Competitor Ad Scraper. Search TikTok advertisements, discover competitors, extract commercial advertising data, creative references, and export organized datasets for research and analysis.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Barz F Hussein

Barz F Hussein

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Features

Limited permissions

Share

TikTok Ads Library & Competitor Ad Scraper
Official Commercial Content API integration for European Economic Area (EEA) ad transparency and competitor advertising research.


Introduction

TikTok Scraper helps advertisers, agencies, and researchers discover TikTok advertisements and public commercial content. Search by keyword, advertiser, country, and date range, then export structured advertisement data, creative references, advertiser information, reach data, and available targeting details.

Unlike fragile browser scrapers that break when TikTok updates its web interface, TikTok Scraper queries the official TikTok Commercial Content API (part of TikTok's European Economic Area ad transparency and Digital Services Act compliance tooling). This provides reliable, structured, and rate-limit-aware access to public ad campaigns, advertiser business IDs, creative media URLs, and audience targeting parameters.

Mandatory Compliance & Access Notice:

  • API Approval Requirement: Access requires an approved TikTok Developer account with the Commercial Content API (research.adlib.basic) scope enabled.
  • Commercial Monetization Gate: Commercial monetization, Pay Per Event (PPE) billing, and commercial dataset redistribution are strictly locked pending verified written authorization from TikTok confirming that the intended Apify distribution and customer usage are permitted. The Actor operates in authorized private developer/research mode by default.
  • Geographic Coverage: Advertising data coverage is strictly limited to European Economic Area (EEA) member states as mandated by European transparency regulations. The United Kingdom and Switzerland are excluded per official TikTok documentation.

Key Features

  • Official Commercial Content API Integration: Built directly on TikTok's official REST API endpoints, ensuring high reliability, stability, and zero risk of IP blocking.
  • Mandatory Compliance Gate: Enforces platform terms of service and prevents unauthorized commercial billing until written authorization is verified.
  • Competitor Ad Keyword Search: Search advertisements using keywords or phrases with both fuzzy and exact match modes (up to 10 ads per API request).
  • Advertiser Discovery: Uncover brand accounts and retrieve verified TikTok advertiser business IDs and country registrations (direct query up to 50 advertisers per request).
  • Controlled Ad Details Extraction: Fetch full creative assets, objectives, call-to-action buttons, and landing page URLs for specific ad IDs using strictly one ad_id per request with controlled sequential rate-pacing.
  • Creator Commercial Content Discovery: Search public branded and sponsored creator content labeled under TikTok's commercial disclosure rules (up to 50 posts per request).
  • Geographic Scope (EEA): Filter ad and commercial content searches across 30 European Economic Area (EEA) member countries.
  • Date Filtering: Query historical campaigns with date windows up to 365 days dating back to October 1, 2022.
  • Ad Format & Status Filtering: Filter by creative type (VIDEO or IMAGE) and delivery status (ACTIVE or INACTIVE).
  • Observed Longevity Intelligence: Automatically calculate active campaign duration in calendar days between first shown and last shown dates to evaluate creative longevity signals.
  • Targeting & Audience Data: Extract authorized targeting criteria, including age brackets, gender distributions, and target countries.
  • Audience Reach Intervals: Extract official reach intervals (0-10K, 10K-100K, 100K+) without fabricating fake impression numbers.
  • Lossless 64-bit ID Handling: Custom pre-parse JSON stream transformation guarantees zero IEEE-754 precision loss on 64-bit numeric IDs.
  • Enterprise Deduplication: Deduplicates ads strictly by unique ad.id—preserving different creative campaigns from the same advertiser.
  • Zero-Secret Logging: Complete redaction of API keys, client secrets, and Bearer tokens across all logs, error traces, and dataset outputs.
  • Multi-Format Export: Export clean datasets to JSON, CSV, or Excel directly via the Apify platform.

Primary Use Cases

  1. Competitor Advertising Intelligence: Monitor what competitors are testing in European markets, how long their ads remain active, and what angles they emphasize.
  2. TikTok Creative Research: Discover high-longevity video creatives and hook concepts across specific e-commerce and SaaS niches.
  3. Advertiser Brand Audits: Identify all active advertisements run by a specific business ID or brand name.
  4. Media Buying & Market Expansion: Research which European countries competitors target before launching international campaigns.
  5. Creative Strategy & Ad Copy Benchmarking: Compare headline hooks, call-to-action choices, and destination landing pages across top advertisers.
  6. Regulatory Compliance & Transparency Research: Analyze advertising frequency, demographic targeting patterns, and disclosure labels for academic or institutional research.

How to Use

  1. Obtain TikTok Developer Credentials: Log in to TikTok for Developers and ensure your project has been approved for the Commercial Content API.
  2. Open TikTok Scraper on Apify: In the Actor input form, paste your tiktokClientKey and tiktokClientSecret. (These fields are encrypted and secret).
  3. Select an Operation:
    • search_ads — Search paid advertisements (Primary, max 10/request)
    • search_advertisers — Search advertiser brands and business IDs (Direct query, max 50/request)
    • get_ad_details — Retrieve detailed metadata for specific ad IDs (Controlled sequential retrieval)
    • search_commercial_content — Query creator sponsored posts (Max 50/request)
    • ad_reports — Retrieve publishing volume time-series reports by country
  4. Configure Search Parameters: Enter your target search keywords (e.g., ["fitness supplements"]) and select EEA country codes (e.g., ["DE", "FR"]).
  5. Set Date Range: Define dateFrom and dateTo (e.g., 2024-01-01 to 2024-06-01, maximum window 365 days).
  6. Set Maximum Results: Specify the maximum number of records to retrieve (default: 100).
  7. Start the Actor: Click Start. The Actor will authenticate, validate the compliance gate, query the official endpoints, normalize records losslessly, and write them to the Apify dataset.
  8. Export Your Data: Download the extracted dataset in JSON, CSV, or Excel format.

Input Examples

Example 1: Search Ads by Keyword (Primary)

{
"operation": "search_ads",
"tiktokClientKey": "your_client_key",
"tiktokClientSecret": "your_client_secret",
"searchTerms": ["collagen peptides"],
"searchType": "fuzzy_phrase",
"countryCodes": ["DE", "AT"],
"dateFrom": "2024-01-01",
"dateTo": "2024-06-01",
"adStatus": "ACTIVE",
"adType": "VIDEO",
"maxResults": 100,
"includeAdDetails": false
}

Example 2: Search Ads by Multiple Keywords with Ad Detail Enrichment

{
"operation": "search_ads",
"tiktokClientKey": "your_client_key",
"tiktokClientSecret": "your_client_secret",
"searchTerms": ["protein powder", "creatine monohydrate"],
"countryCodes": ["FR"],
"dateFrom": "2024-01-15",
"dateTo": "2024-04-15",
"adStatus": "ALL",
"maxResults": 100,
"includeAdDetails": true
}

Example 3: Search Advertisers by Brand Name (Direct Single Query)

{
"operation": "search_advertisers",
"tiktokClientKey": "your_client_key",
"tiktokClientSecret": "your_client_secret",
"searchTerms": ["Gymshark"],
"maxResults": 50
}

Example 4: Get Detailed Metadata for Specific Ad IDs (Sequential)

{
"operation": "get_ad_details",
"tiktokClientKey": "your_client_key",
"tiktokClientSecret": "your_client_secret",
"adIds": ["1048365937726458", "1048365937726459"],
"maxResults": 10
}

Example 5: Search Creator Commercial Content (Sponsored Posts)

{
"operation": "search_commercial_content",
"tiktokClientKey": "your_client_key",
"tiktokClientSecret": "your_client_secret",
"searchTerms": ["sponsored"],
"countryCodes": ["DE"],
"dateFrom": "2024-01-01",
"dateTo": "2024-05-01",
"maxResults": 50
}

Example 6: Generate Country Time-Series Ad Publishing Report

{
"operation": "ad_reports",
"tiktokClientKey": "your_client_key",
"tiktokClientSecret": "your_client_secret",
"countryCodes": ["DE"],
"dateFrom": "2024-01-01",
"dateTo": "2024-01-31"
}

Output Data Schema

Every record written to the dataset includes a recordType field distinguishing paid ads, advertisers, commercial content, and reports:

Field Reference Table

Field PathData TypeDescriptionSourcePossible Missing Values
recordTypestringType of record (paid_ad, advertiser, commercial_content, advertising_report)System NormalizerAlways present
ad.idstringUnique 64-bit advertisement identifier (lossless string preservation)TikTok Ad LibraryPresent on paid_ad
ad.titlestring | nullHeadline or creative caption of the advertisementTikTok Ad Librarynull if omitted by advertiser
ad.firstShownDatestring | nullEarliest observed publication date (ISO YYYY-MM-DD)TikTok Ad Librarynull if unavailable
ad.lastShownDatestring | nullMost recent observed publication date (ISO YYYY-MM-DD)TikTok Ad Librarynull if unavailable
ad.statusstring | nullCurrent delivery status (ACTIVE, INACTIVE)TikTok Ad Librarynull if omitted
ad.videoUrlsstring[]Direct media URLs for video creative assetsTikTok Ad LibraryEmpty array [] if image ad
ad.imageUrlsstring[]Image slide or video thumbnail URLsTikTok Ad LibraryEmpty array [] if none
ad.externalUrlstring | nullDestination landing page URLAd Details APInull if query only
ad.callToActionstring | nullAction button text (e.g. Shop Now, Learn More)Ad Details APInull if not specified
ad.advertisingObjectivestring | nullOptimization objective (e.g. CONVERSIONS, TRAFFIC)Ad Details APInull if not available
ad.reach.rawstring | nullOfficial audience reach bracket (e.g. 10K-100K, 100K+)TikTok Ad Librarynull if pending audit
advertiser.businessIdstring | nullUnique advertiser account identifier (lossless string preservation)TikTok Ad Librarynull if missing
advertiser.businessNamestring | nullRegistered legal or trade name of the advertiserTikTok Ad Librarynull if unlisted
advertiser.paidForBystring | nullLegal entity or agency funding the advertisementTikTok Ad Librarynull if same as brand
advertiser.countryCodestring | nullRegistered corporate country code of the advertiserTikTok Ad Librarynull if undisclosed
targeting.ageGroupsstring[]Target audience age brackets (e.g. ["18-24", "25-34"])Ad Group TargetingEmpty array []
targeting.genderstring | nullGender targeting filter (MALE, FEMALE, or null)Ad Group Targetingnull if unsegmented
targeting.countriesstring[]Target delivery country codesAd Group TargetingArray of country codes
intelligence.observedSpanDaysnumber | nullActive running duration in calendar daysIntelligence Enginenull if dates missing
intelligence.hasVideoCreativebooleanFlag indicating presence of video creative assetsIntelligence Enginetrue or false
intelligence.hasImageCreativebooleanFlag indicating presence of static image creative assetsIntelligence Enginetrue or false
intelligence.longevitySignalNotestringFact-based explanatory signal note with disclaimerIntelligence EngineDescriptive text string
report.publishedAdsCountnumberCount of published ads for country/date time-seriesAd Report APIPresent on advertising_report
report.timeSeriesMetricstringMetric name (count_time_series_by_country)Ad Report APIPresent on advertising_report
report.descriptionstringDelineates publishing time-series from ad metricsSystem NormalizerPresent on advertising_report
searchContext.keywordstring | nullQuery keyword that discovered this recordExecution Contextnull if advertiser query
searchContext.countryCodesstring[]Targeted country codes in queryExecution ContextArray of country codes
source.providerstringData source provider (TikTok Commercial Content API)Provenance EngineAlways present
source.endpointstringSpecific API endpoint calledProvenance EngineAlways present
source.retrievedAtstringISO-8601 UTC timestamp of data retrievalProvenance EngineAlways present

Illustrative JSON Record Example

(The following is a formatted structural example illustrating normalized output):

{
"recordType": "paid_ad",
"ad": {
"id": "1048365937726458",
"title": "Premium Plant-Based Protein Shake",
"firstShownDate": "2024-01-15",
"lastShownDate": "2024-03-20",
"status": "ACTIVE",
"statusStatement": "Complies with advertising standards",
"videoUrls": [
"https://v16.tiktokcdn.com/commercial/video/sample.mp4"
],
"imageUrls": [
"https://p16.tiktokcdn.com/commercial/img/sample.jpeg"
],
"externalUrl": "https://example.com/protein-shake",
"callToAction": "Shop Now",
"advertisingObjective": "CONVERSIONS",
"reach": {
"raw": "100K+",
"value": null
}
},
"advertiser": {
"businessId": "984729184729184",
"businessName": "FitLife Global Nutrition",
"paidForBy": "FitLife Global Ltd",
"countryCode": "DE",
"followerCount": 125000,
"profileUrl": "https://www.tiktok.com/@fitlifeglobal",
"avatarUrl": "https://p16.tiktokcdn.com/commercial/avatar/fitlife.jpeg"
},
"targeting": {
"ageGroups": ["18-24", "25-34"],
"gender": "MALE, FEMALE",
"countries": ["DE", "AT"],
"raw": {
"country": ["DE", "AT"],
"age": ["18-24", "25-34"]
}
},
"intelligence": {
"observedSpanDays": 66,
"activeStatus": "ACTIVE",
"hasVideoCreative": true,
"hasImageCreative": true,
"creativeCount": 2,
"longevitySignalNote": "Long-running ad creative: Observed active in the ad library for 66 days. Observed creative longevity indicates the verified calendar span between first and last publication dates in the TikTok Ad Library. It reflects how long the creative was actively kept in circulation, but should not be construed as proof of financial profitability or advertiser return on ad spend (ROAS)."
},
"searchContext": {
"keyword": "protein",
"countryCodes": ["DE"],
"dateFrom": "2024-01-01",
"dateTo": "2024-05-01"
},
"source": {
"provider": "TikTok Commercial Content API",
"endpoint": "ad/query",
"retrievedAt": "2024-03-20T14:30:00.000Z"
}
}

API Access & Commercial Authorization

To run this Actor against live TikTok advertising data, you must provide valid credentials from an approved TikTok for Developers application.

Developer Setup Steps

  1. Register Developer Account: Navigate to TikTok for Developers and register or log in.
  2. Apply for Commercial Content API: Submit an application for the Commercial Content API under European Union / EEA transparency and Research tools.
  3. Obtain Project Credentials: Once approved, copy your Client Key and Client Secret from your project settings.
  4. Enter Credentials in Actor: Paste credentials into the tiktokClientKey and tiktokClientSecret input fields.
  5. Commercial Distribution Notice: By default, the Actor operates under authorized private developer and research testing. Enabling commercial monetization, Pay Per Event billing, or public dataset redistribution requires explicit written authorization from TikTok.

Geographic Scope & Regulatory Boundaries

Supported Countries (EEA Member States)

Queries are supported across 30 European Economic Area (EEA) countries:

  • Austria (AT), Belgium (BE), Bulgaria (BG), Croatia (HR), Cyprus (CY), Czech Republic (CZ), Denmark (DK), Estonia (EE), Finland (FI), France (FR), Germany (DE), Greece (GR), Hungary (HU), Iceland (IS), Ireland (IE), Italy (IT), Latvia (LV), Liechtenstein (LI), Lithuania (LT), Luxembourg (LU), Malta (MT), Netherlands (NL), Norway (NO), Poland (PL), Portugal (PT), Romania (RO), Slovakia (SK), Slovenia (SI), Spain (ES), Sweden (SE).

Excluded Countries

  • United Kingdom (GB / UK) and Switzerland (CH) are explicitly excluded from the Commercial Content API per official TikTok documentation.
  • Non-European countries (e.g. US, CA, AU) are not covered by this ad library transparency endpoint.

Note on Advertiser Country Code: While ad publishing searches require supported EEA target countries, an advertiser's corporate legal registration (advertiser.countryCode) can be global (e.g. US, CA, CN) and is preserved as returned.


Pricing & Monetization Notice

  • Current Status: Commercial monetization and Pay Per Event (PPE) charges are strictly disabled in compliance with the TikTok Commercial Content API terms.
  • Commercial Deployment Requirement: Written authorization from TikTok confirming the permitted distribution model is required prior to introducing any commercial fee or PPE tier.
  • Fair Use: Under private research use, no usage fees or event charges apply.

Limitations

  1. Official API Eligibility: This Actor relies solely on the official TikTok Commercial Content API. It requires an approved developer project and cannot run anonymously.
  2. Endpoint Maximum Page Limits:
    • Ad search: maximum 10 ads per request.
    • Advertiser search: direct query, maximum 50 advertisers per request (no cursor pagination documented).
    • Commercial content search: maximum 50 posts per request.
  3. Audience Reach as Brackets: TikTok reports reach as bucketed intervals (0-10K, 10K-100K, 100K+). Exact impression counts are not provided by TikTok and are not fabricated by this Actor.
  4. Publishing Time-Series: The ad report endpoint provides aggregate volume of published ads per day per country; it does not provide individual ad impressions, click-through rates (CTR), or ad spend.
  5. Creative File Downloads: High-resolution CDN URLs are extracted rather than downloading raw video files.
  6. Date Constraints: The API enforces a 365-day maximum query window, and historical ad library data begins on October 1, 2022.

Frequently Asked Questions (FAQ)

What is TikTok Scraper?

TikTok Scraper is a compliant Apify Actor designed to search, extract, and analyze commercial advertisements and sponsored creator content from the official TikTok Ad Library.

Do I need a TikTok developer account?

Yes. It integrates directly with the official TikTok Commercial Content API, requiring a registered TikTok for Developers account.

Do I need API approval?

Yes. Your project must have approved access to the Commercial Content / Ad Library API (research.adlib.basic scope).

Can I search competitor advertisements?

Yes. You can search by keywords in the ad copy, filter by publication date range, filter by active or inactive status, or target specific advertiser business IDs.

How does advertiser search work?

The official advertiser search endpoint returns up to 50 matching advertisers for a keyword in a single direct response. The Actor does not attempt unsupported cursor pagination on this endpoint.

How does ad details retrieval work?

The ad details endpoint accepts strictly one ad_id per request. When multiple IDs are requested, the Actor executes controlled sequential retrieval with polite rate-pacing.

Does the report operation return impressions or ad spend?

No. TikTok's commercial content reporting endpoint returns aggregate time-series counts of published advertisements per country. It does not provide individual campaign spend, impressions, CTR, or ROAS.

Can I search in the United States or the UK?

No. TikTok's Commercial Content API is specifically tied to the European Economic Area (EEA) transparency framework. The UK, Switzerland, and the United States are not covered by this endpoint.

How are duplicates handled?

Advertisements are deduplicated strictly by their unique 64-bit ad.id. If an advertiser runs multiple separate advertisements, all distinct ads are preserved. Advertisers in the advertiser search operation are deduplicated by business_id.

Does the Actor download video files?

No. It extracts verified CDN video URLs and cover image links, allowing you to preview or stream creatives on demand without consuming excessive disk space. LETS MAKE DATA MORE USEFULL :)