# TikTok Ads Library Scraper - Ad Library & Creative Center Ads (`topapi/tiktok-ads-library-scraper`) Actor

Scrape TikTok ads from the TikTok Ad Library and Creative Center: advertiser, ad text, video, dates, unique users seen, targeting, reach by country, age and gender, landing URL, CTR, likes. Search by keyword, advertiser or country, monitor new ads. From $0.99 per 1,000 ads. No login.

- **URL**: https://apify.com/topapi/tiktok-ads-library-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 ad library ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does TikTok Ads Library Scraper do?

**TikTok Ads Library Scraper** extracts TikTok ads from TikTok's two public ad sources in one actor: the **TikTok Ad Library** (library.tiktok.com, every ad shown in the EU, EEA, UK, Switzerland and Turkey) and the **TikTok Creative Center Top Ads** (ads.tiktok.com, top-performing ads worldwide). Search by keyword, advertiser, country or date and get one row per ad with advertiser, ad text, video, first and last shown dates and unique users seen, plus optional targeting and reach by country, age and gender. Built for marketers, agencies and brand-safety teams who track competitors' TikTok advertising.

TikTok ads scraper · TikTok Ad Library scraper · TikTok Creative Center scraper · TikTok ads spy tool

<a href="https://console.apify.com/actors/mnLx7IKokiuccMhKh"><img src="https://api.apify.com/v2/key-value-stores/qNQ9zP0xaj2yxGeMY/records/tiktok-ads-library-scraper-source.png" alt="TikTok Ad Library search page that TikTok Ads Library Scraper turns into rows" style="width:70%"></a>

- **TikTok Ad Library ads:** advertiser, ad text, format, video and images, first and last shown dates, days running, unique users seen, removal and restriction notices
- **Targeting and reach (add-on):** targeted countries, ages, genders, interests and audiences, unique users seen by country × age × gender, landing URL, call to action, objective, who paid for the ad, the advertiser's TikTok account
- **Creative Center Top Ads:** CTR, likes, budget level, industry, objective, video in every resolution; add-on details with landing page, comments, shares, countries; second-by-second keyframe curves included free
- **Top Ads Spotlight and creators' commercial content:** TikTok's own case studies with reported results, and creators' paid partnerships and promotional posts
- **No login, no cookies, no TikTok API key:** paste a keyword, an advertiser name, a TikTok URL or an ad id
- **Monitor mode:** schedule it and get only the ads that are new since the last run
- **Export anywhere:** JSON, CSV, Excel; schedules, webhooks, Make, Zapier, n8n, Google Sheets, the Apify API and MCP

### What data can you get from the TikTok Ad Library?

<table>
<tr>
<td>🆔 Ad id and ad page (<code>adId</code>, <code>adDetailUrl</code>)</td>
<td>🏢 Advertiser and business id</td>
<td>📝 Ad text (<code>adTitle</code>)</td>
</tr>
<tr>
<td>📅 First and last shown dates</td>
<td>⏱️ Days running</td>
<td>👀 Unique users seen (<code>estimatedAudience</code>)</td>
</tr>
<tr>
<td>🎬 Video, cover and images</td>
<td>🔗 Landing URL and call to action</td>
<td>🎯 Campaign objective</td>
</tr>
<tr>
<td>🌍 Targeted countries, ages, genders</td>
<td>📊 Reach by country × age × gender</td>
<td>💳 Paid for by (<code>adPaidForBy</code>)</td>
</tr>
<tr>
<td>👤 Advertiser's TikTok account and followers</td>
<td>🚫 Removal and restriction notices</td>
<td>📈 Creative Center CTR, likes, budget level</td>
</tr>
<tr>
<td>🏭 Industry and objective names</td>
<td>⏯️ Keyframe CTR, CVR and retention by second</td>
<td>🤝 Creators' paid partnerships</td>
</tr>
</table>

On two 100-ad Zalando runs with Ad Library details on, every row had dates, unique users seen, targeting, reach by country and payer; 87-88% had a call to action, 90-91% an objective, 93-97% a landing URL and 91-92% the advertiser's TikTok account.

### How to scrape the TikTok Ad Library with TikTok Ads Library Scraper

1. [Create a free Apify account](https://console.apify.com/sign-up) — the free plan includes monthly credit.
2. Open [TikTok Ads Library Scraper](https://apify.com/topapi/tiktok-ads-library-scraper) and click **Try for free**.
3. Pick the **Ad sources**, then type a keyword into **Search terms** or a brand into **Advertiser names**, and choose the **Ad Library countries**.
4. Set **Max ads** and switch on **Ad Library details** if you want targeting and reach.
5. Click **Start**. Rows stream into the dataset as they are found.
6. Open the **Storage** tab and **Export** as JSON, CSV or Excel — or save the input as a task and put it on a schedule.

### ⬇️ Input for TikTok Ads Library Scraper

| Parameter | Type | Description |
|---|---|---|
| **🔍 What to scrape** | | |
| `sources` | List | `library` (default), `creative_center`, `spotlight`, `other_commercial_content`. Any combination. |
| `searchTerms` | List | Keywords, e.g. `running shoes`. Put a term in quotes for an exact phrase. For creators' commercial content: creator usernames. For the Creative Center: matched on the ad caption. |
| `advertiserNames` | List | Brands as the Ad Library names them, e.g. `nike`, `Zalando`, looked up in TikTok's own advertiser search box. Pin any entity with `Name|advertiser id`. |
| `advertiserMatch` | Select | `contains` (default: every advertiser whose name starts with the term as a whole word, e.g. Nike Store and Nike, Inc. for `nike`, not NIKELAB LTD or TikTok handles like nike_shop) or `exact` (the name alone, legal form ignored). |
| `adIds` | List | Ad Library ad ids or Creative Center top ad ids. |
| `startUrls` | URLs | Ad Library search or ad URLs, other commercial content URLs, Creative Center top ad URLs. |
| **🎯 Ad Library filters** | | |
| `countries` | List | `all` (default) or any of the 33 countries the library covers. |
| `dateFrom` / `dateTo` | Date | Ads last shown in this window; absolute (`2026-01-31`) or relative (`12 months`). Default: since October 2022. |
| `timezone` | Text | IANA timezone for the dates. Default `UTC`. |
| `sortBy` | Select | Last shown, published date or unique users seen, either direction. Default: last shown, newest first. Advertiser searches follow it. Keyword searches are read one week at a time, newest week first, in TikTok's own order within each week. |
| `adType`, `adStatus`, `ages`, `adReach`, `gender` | Select | Format (video / image / text), active or inactive, target ages, unique-users bucket, target gender. |
| `occSortBy` | Select | Order of creators' commercial posts: posted date or views. |
| **🎯 Creative Center filters** | | |
| `ccCountries` | List | 28 Creative Center countries; empty = all regions. |
| `ccPeriod` | Select | Last 7, 30 (default) or 180 days. |
| `ccIndustries`, `ccObjectives`, `ccAdLanguages` | List | Industry, campaign objective, ad language. |
| `ccAdFormat`, `ccLikes`, `ccSortBy` | Select | Spark / non-Spark Ads, likes percentile, sort (For you, Reach, CTR, 2s and 6s view rate, CVR, Likes). |
| **✂️ Refine results** | | |
| `excludeKeywords` | List | Drop ads whose title, advertiser, brand or creator contains a word. |
| `minLikes` | Integer | Creative Center / Spotlight: minimum likes. |
| `includeRemovedAds` | Boolean | Ad Library ads TikTok removed carry no advertiser or creative. Default `false` (skipped). |
| **➕ Extra data** | | |
| `includeDetails` | Boolean | Ad Library targeting, reach by country × age × gender, landing URL, CTA, objective, payer, advertiser account — event **ad-details**. |
| `maxDetails` | Integer | Ad Library details on at most this many ads, from searches, ad ids and ad URLs alike; the rest come without them and are not charged **ad-details**. 0 = no limit. Top ad details are not counted. |
| `includeTopAdDetails` | Boolean | Creative Center landing page, objectives, comments, shares, countries, creative summary — event **top-ad-details**. |
| `keyframeMetrics` | List | `retain_ctr`, `retain_cvr`, `click_cnt`, `convert_cnt`, `play_retain_cnt` curves. Free. |
| **🔁 Monitoring** | | |
| `monitorMode`, `monitorStoreName` | Boolean, Text | Return only ads not delivered by earlier runs with the same store. |
| `monitorChanges` | Boolean | Also re-deliver known Ad Library ads whose last shown date or reach changed. |
| **📦 Output** | | |
| `maxResults` | Integer | Default `100`; `0` = no limit. |
| `maxResultsPerSearch` | Integer | Cap per search term, advertiser, URL or source. |
| `compact` | Boolean | Core fields only, for AI agents and MCP. An add-on you turn on keeps all its fields and `detailsFetched` on every row, so a compact row never drops a field it is charged for; requested keyframes are kept too. |
| **⚙️ Advanced** | | |
| `proxyConfiguration`, `maxConcurrency` | Proxy, Integer | Optional proxy; parallel sessions (default 4). |

#### Input JSON

```json
{
  "advertiserNames": ["nike"],
  "countries": ["FR"],
  "dateFrom": "12 months",
  "includeDetails": true,
  "maxResults": 100
}
```

#### Search an advertiser by name, not by keyword

A keyword (`searchTerms`) matches the ad text, so `nike` also returns retailers that mention Nike. An advertiser (`advertiserNames`) is looked up in the advertiser search box of TikTok's Ad Library and returns those advertisers' ads only. That box matches the start of a name and shows 5 names at a time, so the actor asks again with longer prefixes (`nike `, `nike,`, `nike a` ...) until it has every advertiser whose name starts with the term as a whole word: in our tests `nike` found 7 (NIKE Retail B.V., NIKE COM SRL, Nike Store, Nike Factory Store, Nike Unite, Nike, Inc. and nike x solana), `zalando` 7 (Zalando SE among them) and `lidl` 33 (LIDL ITALIA SRL, Lidl Schweiz DL AG, LIDL STIFTUNG & CO KG and the other national entities), where the box alone shows 5. Not matched: names where the word runs on (NIKELAB LTD), TikTok handles (nike_shop) and names with the term further in (Air Nike), which the box never shows; pin any of those with `Name|advertiser id`. **Do:** `"advertiserNames": ["nike"]` · **Don't:** `"searchTerms": ["nike ads"]`.

#### Quote a phrase for an exact match

`running shoes` matches ads with either word ranked by relevance; `"running shoes"` (with the quotes) matches the exact phrase, the same as the Ad Library's own quoted search.

#### Pick the source before the filters

Countries (except Switzerland and the UK) and dates also apply to creators' commercial content, ordered by `occSortBy`; `adType`, `adStatus`, `ages`, `adReach`, `gender` and `sortBy` are Ad Library only. Creative Center filters start with `cc`. Both sources can run in one input.

### ⬆️ TikTok ads output

Every ad becomes one dataset item; `source` says which TikTok source it came from. Here is the table view of an advertiser run with Ad Library details on:

<a href="https://console.apify.com/actors/mnLx7IKokiuccMhKh"><img src="https://api.apify.com/v2/key-value-stores/qNQ9zP0xaj2yxGeMY/records/tiktok-ads-library-scraper-output.png" alt="TikTok Ads Library Scraper output table with targeting and reach" style="width:70%"></a>

An Ad Library ad with details, as JSON (shortened):

```json
{
  "source": "library",
  "adId": "1878351002796241",
  "adDetailUrl": "https://library.tiktok.com/ads/detail/?ad_id=1878351002796241",
  "advertiserName": "Zalando Lounge c/o Zalando SE",
  "adTitle": "E un nou sezon! Ia-ți îmbrăcăminte sport de la mărci de top ...",
  "adFormat": "video",
  "firstShownDate": "2026-10-07",
  "lastShownDate": "2026-10-07",
  "estimatedAudience": "0-1K",
  "callToAction": "Apply now",
  "campaignObjective": "Sales",
  "adPaidForBy": "ZALANDO LOUNGE SERVICE GMBH",
  "advertiserCountry": "Germany",
  "targeting": { "countries": ["RO"], "ages": ["18-24", "25-34", "35-44", "45-54", "55+"], "genders": ["female", "male", "unknown"] },
  "targetAudienceSize": "8.2M-10.0M",
  "uniqueUsersSeenByCountry": [{ "region": "RO", "impressions": "0-1K", "breakdowns": [{ "age": "18-24", "gender": "FEMALE", "impressions": "0-1K" }] }]
}
```

A Creative Center top ad (shortened):

```json
{
  "source": "creative_center",
  "adId": "7686346996722745360",
  "adTitle": "Discover the world of Emiriah perfumes. Find the fragrance that speaks to you.",
  "industryName": "Fragrances & Perfumes",
  "objectiveName": "Conversions",
  "ctr": 0.81,
  "likes": 71,
  "videoDuration": 18.8,
  "landingPage": "https://www.emiriah.com?utm_source=tiktok...",
  "countryCodes": ["AE", "MX", "US", "IT"],
  "keyframeMetrics": { "retain_ctr": { "duration": 20, "highlight": [3] } }
}
```

#### TikTok ads fields

| Field | Source | What it is | Fill on test runs |
|---|---|---|---|
| `adId`, `adDetailUrl`, `firstShownDate`, `lastShownDate`, `estimatedAudience` | Ad Library | Id, ad page, shown dates, unique users seen | 100% |
| `advertiserName` | Ad Library | Advertiser | 100% (live ads) |
| `adTitle` | Ad Library | Ad text | 98% on Zalando runs, 63-67% on nike FR runs, 100% on keyword runs (catalog ads print none) |
| `videoUrl` / `imageUrls` | Ad Library | Creative | 38-40% / 36-38% on Zalando runs, 97% / 95% on keyword runs (catalog ads print no creative) |
| `targeting`, `uniqueUsersSeenByCountry`, `targetAudienceSize`, `adPaidForBy` | details | Targeting, reach and payer | 100% |
| `callToAction` / `campaignObjective` | details | Call to action, objective | 87-88% / 90-91% |
| `adLandingUrl` | details | Landing page | 93-97% |
| `advertiserTiktokAccount` | details | Username, followers, verified, profile | 91-92% |
| `ctr`, `likes`, `cost`, `objectiveName`, `videoUrl` | Creative Center | Performance and video | 100% |
| `industryName` | Creative Center | Industry | 96% |
| `landingPage` | top-ad details | Landing page | 75-77% |
| `comments`, `shares`, `countryCodes`, `objectives` | top-ad details | Engagement and reach | 100% |
| `creativePatterns`, `creativeSummary` | top-ad details | TikTok's creative summary | rare on recent ads: none of 200 top ads on two 30-day runs (the default); 13 of 60 on a 180-day run sorted by likes |
| `keyframeMetrics` | Creative Center | Second-by-second curves | 100% when requested |
| `creatorUsername`, `contentLabel`, `postedDate`, `videoViews` | Commercial content | Creator post | 100% |

### How can I use TikTok ads data?

- 🕵️ **Competitive intelligence** — see every ad a competitor ran in Europe, when, how long, and to how many people
- 🎯 **Media planners** — read the targeting (countries, ages, genders, interests) and the reach by country behind a brand's campaigns
- 🎨 **Creative teams** — pull top-performing Creative Center ads by industry with CTR, likes and second-by-second retention
- 🛡️ **Brand safety and compliance** — track removed and restricted ads with TikTok's stated reasons and affected countries
- 🤝 **Influencer marketing** — list creators' paid partnerships and promotional posts by country
- 🤖 **AI and research teams** — feed compact rows to an LLM or a dashboard
- 📈 **Agencies** — schedule a daily run per client and get only new ads

### How much does it cost to scrape TikTok ads?

TikTok Ads Library Scraper is pay-per-result, no start fee:

| Event | Price | Per 1,000 |
|---|---:|---:|
| Ad Library ad or creator commercial post (`ad`) | $0.0016 | $1.60 |
| Ad Library details add-on (`ad-details`) | $0.001 | $1.00 |
| Creative Center top ad or Spotlight case (`top-ad`) | $0.00099 | $0.99 |
| Creative Center details add-on (`top-ad-details`) | $0.001 | $1.00 |

| Ads | Ad Library | Ad Library + details | Creative Center | Creative Center + details |
|---:|---:|---:|---:|---:|
| 10 | $0.016 | $0.026 | $0.0099 | $0.0199 |
| 100 | $0.16 | $0.26 | $0.099 | $0.199 |
| 1,000 | $1.60 | $2.60 | $0.99 | $1.99 |
| 10,000 | $16.00 | $26.00 | $9.90 | $19.90 |

Add-ons are charged only for ads that get them. There is nothing else to pay: Apify platform usage is included in these prices. Measured on the default 256 MB, two runs each: 30 ads in about 10 s, 100 advertiser ads with details in 52-117 s (TikTok's answer times vary), 150 keyword ads in about 28 s, 100 top ads with details and keyframes in 74-100 s.

### Integrations, API, scheduling & MCP

- **Schedules:** run TikTok Ads Library Scraper daily or weekly from the **Schedules** tab; with `monitorMode` each run returns only new ads.
- **Webhooks:** call a URL when a run finishes to push the ads to a CRM, Slack or a sheet.
- **No-code:** Make, Zapier, n8n, Google Sheets, Airtable and Slack through [Apify integrations](https://docs.apify.com/integrations).
- **API:** start runs and read datasets from Node.js or Python with `apify-client` — code on the [API tab](https://apify.com/topapi/tiktok-ads-library-scraper/api/python).
- **MCP / AI agents:** connect Claude, Cursor or any MCP client through the [MCP tab](https://apify.com/topapi/tiktok-ads-library-scraper/api/mcp) and ask for a brand's TikTok ads in plain language; `compact` keeps the rows short.

### More TopApi scrapers

<table>
<tr>
<td>🎵 <a href="https://apify.com/topapi/tiktok-scraper">TikTok Scraper</a> — posts by profile, hashtag, keyword</td>
<td>🎬 <a href="https://apify.com/topapi/tiktok-video-scraper">TikTok Video Scraper</a> — stats by video URL</td>
<td>🔎 <a href="https://apify.com/topapi/tiktok-user-search-scraper">TikTok User Search Scraper</a> — creators by keyword</td>
</tr>
<tr>
<td>💼 <a href="https://apify.com/topapi/linkedin-ad-library-scraper">LinkedIn Ad Library Scraper</a> — LinkedIn ads</td>
<td>📘 <a href="https://apify.com/topapi/facebook-search-posts-scraper">Facebook Search Posts Scraper</a></td>
<td>📄 <a href="https://apify.com/topapi/facebook-page-posts-scraper">Facebook Page Posts Scraper</a></td>
</tr>
<tr>
<td>📸 <a href="https://apify.com/topapi/instagram-scraper">Instagram Scraper</a></td>
<td>▶️ <a href="https://apify.com/topapi/youtube-shorts-scraper">YouTube Shorts Scraper</a></td>
<td>📊 <a href="https://apify.com/topapi/similarweb-scraper">SimilarWeb Scraper</a> — a landing page's traffic</td>
</tr>
<tr>
<td>🌐 <a href="https://apify.com/topapi/website-content-crawler">Website Content Crawler</a> — landing page text</td>
<td>🧭 <a href="https://apify.com/topapi">All TopApi actors</a></td>
<td></td>
</tr>
</table>

### Limits & empty runs

- **Ad Library coverage:** ads shown in the EU, EEA, UK, Switzerland and Turkey (TikTok's transparency library, 33 countries). The Creative Center covers top ads in 28 countries worldwide.
- **TikTok's "5,000" total:** TikTok reports 5,000 as the total of every keyword search, whatever its size (a one-day search too). The actor does not stop there; it reads on until TikTok's last page. Measured: one all-ads search gave 6,300 ads in one run with more left, and an advertiser search passed 5,900 ads with more left.
- **Keyword searches are read one week at a time,** newest week first. Over long date ranges TikTok's keyword search often stops early: "sale" over 12 months ended after 47 ads in one run and 236 in another, while the latest 7 days alone gave over 2,500. An ad shown in two weeks is delivered once. Advertiser searches are read in one pass, newest first.
- **Advertiser searches that TikTok ends early:** TikTok often stops an advertiser search short of the total it reports, on a part-full page marked as the last (measured: 6 times in one 30-day walk of 2,007 ads). The actor then asks TikTok again from where it stopped, on a fresh session token, up to 3 times; the first try recovered 5 of those 6 and a second try the last. If TikTok still ends the search, the run marks it incomplete (`endedEarly` in the run summary) and the status line names the search, the ads read and TikTok's total, and says to re-run it (with `monitorMode` on, the re-run skips the ads already delivered).
- **20 top ads per Creative Center filter set:** for more, the actor also reads the other sorts, countries, industries and objectives (100 unique US top ads took 57-71 filter sets in two runs). Keyword search in the Creative Center needs a TikTok For Business login, so `searchTerms` filters the captions TikTok serves.
- **Not available:** impressions and spend (TikTok prints 0 and blank for every ad measured), and catalog ads' creatives.
- **Video links expire** after some hours; download them soon after the run.
- **Empty dataset:** no ad matched the countries and dates, the advertiser name matched nothing (it is then searched as a keyword), every ad was removed by TikTok (see `includeRemovedAds`), or your filters dropped every ad TikTok returned. The status line names the reason and counts the ads each filter dropped.

### FAQ

#### How many ads can TikTok Ads Library Scraper collect in one run?

As many as you set in `maxResults`. `maxResults` is the total for the whole run; set `maxResultsPerSearch` to cap each advertiser, keyword or URL. TikTok labels every keyword search with a total of 5,000, but the actor keeps reading until TikTok's last page (6,300 ads from one search measured, with more left), and reads keyword searches one week at a time so an early stop by TikTok costs one week, not the whole search.

#### Can I run TikTok Ads Library Scraper on a schedule to get new ads automatically?

Yes. Save the input as a task, add a schedule, and turn on `monitorMode` with a `monitorStoreName`. Each run returns only ads it has not delivered before; a poll with nothing new returns an empty dataset. Once a search has been read to its end, a keyword search re-reads only the ads shown since a week before that run, so a new ad is found wherever TikTok ranks it. An advertiser search stops at the first page with nothing new, because its ads come newest first.

#### Does TikTok Ads Library Scraper show targeting and reach for TikTok ads?

Yes, with `includeDetails` on: targeted countries, ages, genders, interests and audiences, the target audience size, and unique users seen by country, age and gender — the same data the Ad Library shows on each ad's page.

#### Can TikTok Ads Library Scraper get ads outside Europe?

The Ad Library itself covers the EU, EEA, UK, Switzerland and Turkey. For other countries use the `creative_center` source, which covers top ads in 28 countries including the US.

#### Can I integrate TikTok Ads Library Scraper with other apps?

Yes — Make, Zapier, n8n, Google Sheets, Slack and more via [Apify integrations](https://docs.apify.com/integrations), or [webhooks](https://docs.apify.com/integrations/webhooks) when a run finishes.

#### Can I use TikTok Ads Library Scraper with the Apify API?

Yes. Use `apify-client` for [Node.js](https://apify.com/topapi/tiktok-ads-library-scraper/api/javascript) or [Python](https://apify.com/topapi/tiktok-ads-library-scraper/api/python) to start runs and read the dataset.

#### Can I use TikTok Ads Library Scraper through an MCP server?

Yes. Open the [MCP tab](https://apify.com/topapi/tiktok-ads-library-scraper/api/mcp), connect your MCP client and ask for TikTok ads in plain language. Turn on `compact` for shorter rows.

#### Do I need a TikTok account, cookies or an API key for TikTok Ads Library Scraper?

No. It reads what the TikTok Ad Library and Creative Center show to any visitor.

#### Why did my TikTok Ads Library Scraper run return no ads?

Usually the countries and dates leave nothing (widen `dateFrom` or use `all` countries), the keyword only matches ads TikTok removed, or your `excludeKeywords` / `minLikes` filters dropped every ad. The run's status message counts what each filter dropped; the `RUN_SUMMARY` record has the details.

#### Is it legal to scrape TikTok ads?

TikTok Ads Library Scraper extracts only ad data that TikTok publishes publicly in its Ad Library and Creative Center; it does not log in. Results can contain personal data (for example creators' usernames), which is regulated in many countries, so make sure you have a legitimate purpose.

#### Your feedback

Found a bug or missing a field in TikTok Ads Library Scraper? Open an issue on the [Issues tab](https://apify.com/topapi/tiktok-ads-library-scraper/issues/open).

This actor is an independent tool, not affiliated with or endorsed by TikTok or ByteDance.

# Actor input Schema

## `sources` (type: `array`):

Which TikTok ad sources to read. Ad Library = ads shown in the EU, EEA, UK, Switzerland and Turkey, with reach and targeting; Creative Center = global top ads with CTR and likes.

## `searchTerms` (type: `array`):

Keywords, e.g. "running shoes", "nike". Quote a term for an exact phrase. Other commercial content: creator usernames. Creative Center: matched on the ad caption.

## `advertiserNames` (type: `array`):

Advertisers as the Ad Library names them, e.g. "Nike", "Zalando". Looked up in TikTok's own advertiser search box. Pin any entity with "Name|advertiser id".

## `advertiserMatch` (type: `string`):

Default: every advertiser whose name starts with the term as a whole word, e.g. Nike Store, Nike, Inc. for "nike" (not NIKELAB LTD or handles like nike_shop).

## `adIds` (type: `array`):

Ad Library ad ids (e.g. 1876662213746929) or Creative Center top ad ids (e.g. 7686346996722745360). Each id returns that ad.

## `startUrls` (type: `array`):

Ad Library search or ad URLs (library.tiktok.com/ads?...), other commercial content URLs, Creative Center top ad or Top Ads URLs.

## `countries` (type: `array`):

Countries where the ads were shown (Ad Library; also other commercial content, except Switzerland and the UK). All = every country the library covers.

## `dateFrom` (type: `string`):

Ads last shown on or after this date (YYYY-MM-DD or relative, e.g. 12 months). Empty = since October 2022, the library's start.

## `dateTo` (type: `string`):

Ads last shown on or before this date. Empty = today.

## `timezone` (type: `string`):

IANA timezone for the dates above, e.g. Europe/Paris. Default UTC.

## `sortBy` (type: `string`):

Order of Ad Library results. Advertiser searches follow it; keyword searches are read one week at a time, newest week first, in TikTok's order within each week.

## `adType` (type: `string`):

Ad Library format filter.

## `adStatus` (type: `string`):

Active = still being shown.

## `ages` (type: `array`):

Ads targeted at these age groups.

## `adReach` (type: `array`):

Ad Library reach buckets.

## `gender` (type: `string`):

Ads targeted at this gender.

## `occSortBy` (type: `string`):

Order of creators' commercial posts.

## `ccCountries` (type: `array`):

Top ads shown in these countries. Empty = all regions.

## `ccPeriod` (type: `string`):

Top ads of the last 7, 30 or 180 days.

## `ccIndustries` (type: `array`):

Creative Center industries. Empty = all.

## `ccObjectives` (type: `array`):

Empty = all objectives.

## `ccAdLanguages` (type: `array`):

Language of the ad. Empty = all.

## `ccAdFormat` (type: `string`):

Spark Ads boost an organic TikTok post; non-Spark Ads are regular in-feed ads.

## `ccLikes` (type: `array`):

Creative Center likes percentile. Empty = all.

## `ccSortBy` (type: `string`):

TikTok serves 20 top ads per filter set; for more, the actor also reads the other sorts, countries and industries.

## `excludeKeywords` (type: `array`):

Drop ads whose title, advertiser, brand or creator contains any of these words, e.g. "giveaway".

## `minLikes` (type: `integer`):

Creative Center and Spotlight: keep top ads with at least this many likes. 0 = off.

## `includeRemovedAds` (type: `boolean`):

Ad Library ads TikTok removed show no advertiser or creative. Off = skip them (not delivered, not charged).

## `includeDetails` (type: `boolean`):

Adds targeting, unique users seen by country x age x gender, landing URL, CTA, objective, payer and the advertiser's TikTok account. Add-on ad-details.

## `maxDetails` (type: `integer`):

Ad Library details on at most this many ads, from searches, ad ids and ad URLs alike; the rest come without them (no ad-details charge). 0 = no limit. Top ad details are not counted.

## `includeTopAdDetails` (type: `boolean`):

Creative Center: landing page, objectives, voice-over, comments, shares, countries, TikTok's creative summary. Add-on top-ad-details.

## `keyframeMetrics` (type: `array`):

Creative Center second-by-second curves with highlight seconds. Included free.

## `monitorMode` (type: `boolean`):

Return only ads not delivered by earlier runs with the same monitor store. Pairs with a daily schedule.

## `monitorStoreName` (type: `string`):

Named key-value store that remembers delivered ads. One name per watch list. Default tiktok-ads-library-monitor.

## `monitorChanges` (type: `boolean`):

Monitor mode: re-deliver known Ad Library ads whose last shown date or reach changed (charged again).

## `maxResults` (type: `integer`):

Total ads per run. 0 = no limit. TikTok shows 5,000 as the total of any keyword search; the actor reads past it, one week at a time.

## `maxResultsPerSearch` (type: `integer`):

Cap per search term, advertiser, URL or source. 0 = no per-search cap.

## `compact` (type: `boolean`):

Core fields only, sized for AI agents and MCP. An add-on you turn on keeps all its fields and detailsFetched, so no charged field is dropped; keyframes are kept too.

## `proxyConfiguration` (type: `object`):

Optional. By default the actor connects directly and switches to Apify's datacenter, then residential proxy by itself if TikTok refuses.

## `maxConcurrency` (type: `integer`):

TikTok sessions used in parallel (detail pages). 4 is a safe default.

## Actor input object example

```json
{
  "sources": [
    "library"
  ],
  "advertiserNames": [
    "nike"
  ],
  "advertiserMatch": "contains",
  "countries": [
    "FR"
  ],
  "dateFrom": "12 months",
  "timezone": "UTC",
  "sortBy": "last_shown_date,desc",
  "adType": "all",
  "adStatus": "all",
  "ages": [
    "all"
  ],
  "adReach": [
    "all"
  ],
  "gender": "ALL",
  "occSortBy": "posted_date,desc",
  "ccPeriod": "30",
  "ccAdFormat": "all",
  "ccSortBy": "for_you",
  "includeRemovedAds": false,
  "includeDetails": false,
  "includeTopAdDetails": false,
  "monitorMode": false,
  "monitorChanges": false,
  "maxResults": 30,
  "compact": false,
  "maxConcurrency": 4
}
```

# Actor output Schema

## `results` (type: `string`):

One item per TikTok ad: Ad Library ads, creators' commercial content, Creative Center top ads and Spotlight cases.

## `summary` (type: `string`):

Per search: TikTok's ad count, pages, delivered, filtered and duplicate ads; requests, token mints and egress used.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "advertiserNames": [
        "nike"
    ],
    "countries": [
        "FR"
    ],
    "dateFrom": "12 months",
    "maxResults": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/tiktok-ads-library-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "advertiserNames": ["nike"],
    "countries": ["FR"],
    "dateFrom": "12 months",
    "maxResults": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/tiktok-ads-library-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "advertiserNames": [
    "nike"
  ],
  "countries": [
    "FR"
  ],
  "dateFrom": "12 months",
  "maxResults": 30
}' |
apify call topapi/tiktok-ads-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/tiktok-ads-library-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/mnLx7IKokiuccMhKh/builds/nIAkMu0Bj5mDP3kyZ/openapi.json
