SFOLN

Catalogue / Ad intelligence

TikTok Ads Library Scraper

sfoln/tiktok-ads-search · Social media, Lead generation, Ecommerce On request

Search TikTok's public Ads Library by keyword or advertiser: ad ID, advertiser, first and last shown dates, reach, impressions, video and cover URLs, plus optional caption, countries and landing page. $1.50 per 1,000 ads + $0.004 per results page; ad details $5 per 1,000.

About

What it does

TikTok Ads Library Scraper searches TikTok's public Ads Library by keyword or advertiser name and returns one dataset record per ad: ad ID and library link, advertiser name and business ID, first and last shown dates, estimated reach bucket, impressions and spend when disclosed, video and cover image URLs. Turn on ad details to add the caption, countries, landing page, likes, CTR, campaign objective and best-quality video for every ad. Built for competitor monitoring, creative research, agencies and AI agents.

Price

Price per delivered record

EventPricePer 1,000Charged for
TikTok ad
tiktok-ad
$0.0015$1.5 / 1,000Charged once per ad record delivered from the TikTok Ads Library (recordType ad). Duplicates, ads removed by the date filter, query summary rows and failed requests are not charged.
TikTok Ads Library page
tiktok-ads-query
$0.004$4 / 1,000Charged once per Ads Library results page fetched for a query. A page without new ads is charged only when the upstream provider billed it. Failed requests are not charged.
TikTok ad details
tiktok-ad-details
$0.005$5 / 1,000Optional (includeAdDetails). Charged once per ad enriched with details: caption, countries, landing page, likes, CTR, objective. Not charged when the details request fails.

Apify free plan: up to 10 items per run. Paid plans have no per-run cap; set maxTotalChargeUsd to cap spend.

Run

Call it from code, an agent or the Console

This API is private on Apify for now. Email us and we will publish it for you, usually within two working days. The calls below work once it is public. contact@sfoln.com

curl · synchronous run, rows in the response
curl -X POST "https://api.apify.com/v2/actors/sfoln~tiktok-ads-search/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"queries":["protein"],"maxAdsPerQuery":10}'
mcp.json · hosted Apify MCP server
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=sfoln/tiktok-ads-search"
    }
  }
}
asynchronous run · for large batches
POST https://api.apify.com/v2/actors/sfoln~tiktok-ads-search/runs?maxTotalChargeUsd=1
GET  https://api.apify.com/v2/actor-runs/{runId}            # until status is SUCCEEDED
GET  https://api.apify.com/v2/datasets/{defaultDatasetId}/items?format=json

Authenticate with an Apify API token. MCP clients can instead sign in with OAuth when prompted. Example prompt for an agent: Find 20 recent TikTok ads that mention "protein" and list their advertisers, first and last shown dates and estimated reach.

Input

Input fields

Search TikTok's public Ads Library by keyword or advertiser name. Each query returns one dataset record per ad plus one summary record.

FieldTypeDefaultMeaning
queriesarray—Search keywords
General Ads Library searches, one per line. Accounts on the Apify free plan can process up to 10 queries per run (searches and advertiser names together).
advertiserNamesarray—Advertiser names
Advertiser names (e.g. Gymshark). The name is resolved to TikTok's advertiser entity, falling back to a name search.
maxAdsPerQueryinteger50Max ads per query
Maximum ads returned per keyword or advertiser (1–500). Range 1–500.
shownAfterstring—Last shown on or after (YYYY-MM-DD)
Optional: keep only ads last shown on or after this date. Results are newest-first, so pagination stops at the first page with only older ads. Filtered ads are not charged.
includeAdDetailsbooleanfalseInclude ad details
Fetch details for every delivered ad (caption, countries, landing page, likes, CTR, objective, best-quality video). Adds one tiktok-ad-details event per ad.
maxQueriesinteger100Max queries
Safety cap on keywords + advertisers processed in this run. Range 1–1000.
concurrencyinteger4Concurrency
Queries processed in parallel (1–8). Range 1–8.
itemTimeoutSecsinteger900Time limit per query (seconds)
Pagination (and ad-detail calls) for one keyword or advertiser stops cleanly shortly before this limit (60–3600). Raise it for very large per-query limits. Range 60–3600.
includeRawbooleanfalseInclude raw upstream response
Attach the unmodified upstream ad object(s) to each ad record under `raw` (larger output).
Example input
{
  "queries": [
    "protein"
  ],
  "maxAdsPerQuery": 10
}

Output

One record per input item

Records land in the run's dataset; a synchronous call returns them directly. Each has a status (ok is charged; everything else is free) and a charged flag. The run's OUTPUT record totals items and charges.

FieldTypeMeaning
inputstring | objectInput
The input query this record belongs to.
recordTypestringRow type
ad (one per ad, charged tiktok-ad) | query (one summary per query, free).
statusstringStatus
ok | not_found | error | skipped_invalid | skipped_budget | skipped_free_plan
chargedbooleanCharged
Whether this record incurred a pay-per-event charge.
chargedEventstringCharged event
Pay-per-event event charged for this record.
sourcestringSource
Upstream data source (scrapecreators = ScrapeCreators API over the public ad library).
fetchedAtstringFetched at
ISO timestamp.
errorobjectError
code / message when status is not ok.
warningsarrayWarnings
Non-fatal notes (e.g. stopped early).
querystring | nullQuery
Keyword or advertiser name the row belongs to.
queryTypestring | nullQuery type
keyword | advertiser.
positioninteger | nullPosition
1-based position within the query results (newest shown first).
adIdstring | nullAd ID
TikTok Ads Library ad ID.
adLibraryUrlstring | nullAd Library URL
Public TikTok Ads Library detail page.
advertiserNamestring | nullAdvertiser
Advertiser (legal entity) name.
advertiserIdstring | nullAdvertiser ID
TikTok advertiser business ID (adv_biz_ids).
firstShownstring | nullFirst shown
ISO date the ad was first shown.
lastShownstring | nullLast shown
ISO date the ad was last shown.
estimatedAudiencestring | nullReach (bucket)
Estimated unique users reached, e.g. 1K-10K.
impressionsinteger | nullImpressions
Impressions when TikTok discloses them (null otherwise).
spendstring | nullSpend
Spend text when disclosed.
videoUrlsarrayVideo URLs
Ad video URLs (best quality first from details when included).
coverImageUrlstring | nullCover image
Video cover image.
imageUrlsarrayImage URLs
Image creatives.
detailsFetchedboolean | nullDetails fetched
Details were fetched and charged (includeAdDetails).
detailsChargedEventstring | nullDetails event
tiktok-ad-details when details were charged for this ad.
captionstring | nullCaption
Ad text / title (details only).
countriesarrayCountries
Countries the ad ran in (details only).
landingPageUrlstring | nullLanding page
Destination URL (details only).
likesinteger | nullLikes
Likes (details only, mostly Top Ads).
commentsinteger | nullComments
Comments (details only).
sharesinteger | nullShares
Shares (details only).
ctrnumber | nullCTR
Click-through rate as reported by Creative Center (details only).
objectivestring | nullObjective
Campaign objective, e.g. reach, conversions (details only).
industrystring | nullIndustry
TikTok industry key (details only).
videoDurationSecsnumber | nullVideo duration (s)
Video duration (details only).
creativeCenterUrlstring | nullCreative Center URL
Creative Center Top Ads link when available (details only).
resolvedAdvertiserNamestring | nullResolved advertiser
Advertiser entity TikTok matched for an advertiser query (summary rows).
adsDeliveredinteger | nullAds delivered
Ads delivered for this query (summary rows).
pagesFetchedinteger | nullPages fetched
Upstream pages fetched (summary rows).
queryFeesChargedinteger | nullPage fees charged
tiktok-ads-query events charged (summary rows).
adDetailsChargedinteger | nullDetails charged
tiktok-ad-details events charged (summary rows).
totalResultsinteger | nullTotal results
Total matching ads reported by TikTok (summary rows).
stopReasonstring | nullStop reason
limit | end | budget | max_pages | older_than_filter | deadline | error | empty_pages (summary rows).
Example record
{
  "input": {
    "kind": "advertiser",
    "value": "Gymshark"
  },
  "recordType": "ad",
  "query": "Gymshark",
  "queryType": "advertiser",
  "position": 1,
  "adId": "1871655924410641",
  "adLibraryUrl": "https://library.tiktok.com/ads/detail/?ad_id=1871655924410641",
  "advertiserName": "GYMSHARK LTD",
  "advertiserId": "7078923208527618049",
  "firstShown": "2026-07-25T00:00:00.000Z",
  "lastShown": "2026-07-26T00:00:00.000Z",
  "estimatedAudience": "1K-10K",
  "impressions": null,
  "spend": null,
  "videoUrls": [
    "https://library.tiktok.com/api/v1/cdn/…"
  ],
  "coverImageUrl": "https://p16-common-sign.tiktokcdn.com/…",
  "imageUrls": [],
  "detailsFetched": false,
  "caption": null,
  "countries": [],
  "landingPageUrl": null,
  "status": "ok",
  "charged": true,
  "chargedEvent": "tiktok-ad",
  "source": "scrapecreators",
  "fetchedAt": "2026-10-14T10:00:00.000Z"
}

Machine-readable

This page for agents