# TikTok Ads Library Scraper & Ad Monitor (`valev-lab/tiktok-ads-library`) Actor

Scrape the TikTok Ads Library by keyword, advertiser, URL, or ad ID in 33 European markets. Get advertisers, dates, landing pages, targeting, and reach by country with age and gender splits. Monitor new competitor ads, download ad videos, and export to JSON, CSV, or Excel. No login.

- **URL**: https://apify.com/valev-lab/tiktok-ads-library.md
- **Developed by:** [Daniel Valev](https://apify.com/valev-lab) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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** pulls ads from the public [TikTok Ads Library](https://library.tiktok.com/ads) (TikTok's Commercial Content Library) and returns them as clean, structured data. Search by **keyword**, **advertiser name**, **advertiser business ID**, **ad ID**, or just paste a TikTok Ads Library URL. For each ad you get the advertiser, who paid, dates shown, reach, landing page, and, with details on, **targeting and reach by country broken down by age and gender**.

No TikTok account, login, cookies, or API approval needed. Download results as JSON, CSV, or Excel, or use them through the Apify API.

### Why use this TikTok ad library scraper?

- 🔎 **Competitor ad research:** see every ad a brand ran in Europe, which countries it targeted, and which audiences it reached.
- 🔔 **Ad monitoring:** schedule a run and get **only new ads** each time. Ads you have already seen are skipped and not charged.
- 🎬 **Creative inspiration:** collect video and image ads by keyword, and optionally **download the ad videos and images**.
- 📊 **Market sizing for free:** use **Count only** mode to see how many ads TikTok has for a search before you pay for any ads.
- 🧭 **Agency reporting:** export per-country impressions with age × gender breakdowns for client decks.
- 🤖 **AI agents:** call it as a tool from Claude, Cursor, or any MCP client.

Running on Apify also gives you scheduling, monitoring, API access, webhooks, and integrations with Make, Zapier, n8n, Google Sheets, and more.

### What data can you extract from the TikTok Ads Library?

| Ad | Advertiser | Targeting & reach (with details on) |
| --- | --- | --- |
| Ad ID and detail URL | Advertiser name and business ID | Targeted countries |
| Title, format (video/image/text) | Who paid for the ad | Age groups and genders |
| First shown, last shown, days running | Registry country | Languages, cities, provinces |
| Unique users seen (min/max) | Linked TikTok account and followers | Devices, interests, interactions |
| Objective and call to action | Advertiser summary across the run | Impressions per country by age × gender |
| Landing page, domain, UTM tags | | Target audience size (min/max) |
| Video and image URLs | | |

All reach and audience ranges come as text **and** as numeric `min` / `max` values, so you can sort and chart them directly.

### How to scrape the TikTok Ads Library

1. Click **Try for free**.
2. Enter keywords or advertiser names in **Search terms**, or paste a URL from library.tiktok.com.
3. Pick **Regions** (for example `FR`, `DE`, or `all`) and, if you like, dates and filters.
4. Turn on **Fetch ad details** if you need targeting and reach by country.
5. Click **Start** and download your ads when the run finishes.

To monitor a competitor, turn on **Only new ads**, give the monitor a name, and save the run as a [scheduled task](https://docs.apify.com/platform/schedules), for example every Monday.

### Which countries does the TikTok Ads Library cover?

TikTok publishes ads for **33 markets**: the EU and EEA, the UK, Switzerland, and Turkey (`AT`, `BE`, `BG`, `CH`, `CY`, `CZ`, `DE`, `DK`, `EE`, `ES`, `FI`, `FR`, `GB`, `GR`, `HR`, `HU`, `IE`, `IS`, `IT`, `LI`, `LT`, `LU`, `LV`, `MT`, `NL`, `NO`, `PL`, `PT`, `RO`, `SE`, `SI`, `SK`, `TR`). Use `all` to search them together.

Ads shown only in the USA, Pakistan, the UAE, Saudi Arabia, Malaysia, or other markets outside this list are **not** in TikTok's library, so no scraper can return them from it.

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

You pay per ad saved. Apify platform usage is included in the price.

| Event | Free plan | Bronze | Silver | Gold |
| --- | ---: | ---: | ---: | ---: |
| 1,000 ads (details included) | $1.35 | $1.26 | $1.08 | $0.90 |
| 1,000 media files downloaded | $0.27 | $0.23 | $0.21 | $0.18 |

You are **not** charged for duplicate ads, ads skipped in monitor mode, status rows, or preview images. **Count only** runs charge no ads, only a start fee of $0.00005. Apify gives every account free monthly credit, so you can test on your own searches first.

Examples on the Free plan: 100 ads cost about $0.14; 1,000 ads with their videos cost about $1.62.

### Input example

```json
{
  "searchTerms": ["nike", "adidas"],
  "regions": ["FR", "DE"],
  "startDate": "2026-01-01",
  "adStatus": "all",
  "maxAds": 200,
  "fetchDetails": true,
  "outputFormat": "clean"
}
```

- **Search terms** accept keywords, advertiser names, or pasted library URLs. Wrap a phrase in quotes for an exact match.
- **Search by** switches plain terms between keyword and advertiser name.
- **Ad IDs** fetch specific ads directly.
- Filters match the website: ad status, format, audience age, gender, unique reach, and sort order.

### Output example

With **Output format** set to **Clean**, each ad looks like this (shortened):

```json
{
  "adId": "1873863486261281",
  "adUrl": "https://library.tiktok.com/ads/detail/?ad_id=1873863486261281",
  "advertiserName": "NIKE Retail B.V.",
  "paidBy": "INITIATIVE MEDIA B.V.",
  "title": "Une rentrée signée Nike",
  "format": "video",
  "firstShown": "2026-08-20",
  "lastShown": "2026-09-13",
  "daysShown": 24,
  "uniqueUsersSeen": { "text": "10K-100K", "min": 10000, "max": 100000 },
  "objective": "Sales",
  "callToAction": "Shop now",
  "landingDomain": "nike.com",
  "targeting": {
    "regions": ["FR"],
    "ages": ["18-24", "25-34", "35-44"],
    "genders": ["female", "male", "unknown"]
  },
  "reach": {
    "byCountry": [
      {
        "region": "FR",
        "impressions": { "text": "26K", "min": 26000, "max": 26000 },
        "breakdown": [
          { "age": "18-24", "gender": "FEMALE", "impressions": { "text": "7K", "min": 7000, "max": 7000 } }
        ]
      }
    ]
  }
}
```

The default **Compatible** format uses the Title Case keys common to other TikTok Ads Library tools (`AD ID`, `Ad Title`, `Advertiser Name`, `Ad Reach`, and so on), so you can switch tools without changing your spreadsheet or pipeline.

Every run also stores an `OUTPUT` summary and, if enabled, an `ADVERTISERS` record that totals ads per advertiser.

### Use the TikTok Ads Library API from code

Every run can be started through the [Apify API](https://docs.apify.com/api/v2), and the ads come back as JSON.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("valev-lab/tiktok-ads-library").call(run_input={
    "searchTerms": ["nike"],
    "regions": ["FR"],
    "maxAds": 100,
    "fetchDetails": True,
})
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad)
```

AI assistants can use it as a tool through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp): `https://mcp.apify.com?tools=valev-lab/tiktok-ads-library`.

### FAQ

#### Is there an official TikTok Ads Library API?

TikTok offers a Commercial Content API, but you must apply and be approved first. This scraper reads the same public library without an application, an account, or an API key.

#### How long does a run take?

Without details, 50 ads usually take under a minute. With **Fetch ad details** on, plan for about 5 seconds per ad, because each ad's targeting and reach is loaded separately. Turn details off when you only need the ad list. The default run timeout is 1 hour, which fits about 600 ads with details; raise it under **Run options** for bigger jobs.

#### Can I download TikTok ad videos?

Yes. Turn on **Download media files** and the videos and images are saved in the run's storage with direct links in each ad. Files over 30 MB are skipped and not charged.

#### How do I find all ads from one advertiser?

Set **Search by** to **Advertiser name** and enter the name as it appears in the library, or paste the advertiser's library URL. Add the **advertiser business ID** for an exact match.

#### Why did I get fewer ads than I asked for?

TikTok's library only holds ads from the last 12 months and only for the 33 markets above. Narrow filters or a short date range can also return fewer ads. The run summary shows how many ads TikTok reported for each search.

#### Is it legal to scrape the TikTok Ads Library?

The library is public transparency data that TikTok publishes under the EU Digital Services Act. Results can still contain personal data, such as advertiser names, so make sure your use complies with GDPR and your local laws. This is not legal advice.

#### Is this an official TikTok product?

No. This Actor is independent and is not affiliated with, endorsed by, or sponsored by TikTok or ByteDance.

### Other ad library scrapers

Compare TikTok ads with the same brands on other platforms:

- [Facebook Ads Library Scraper](https://apify.com/valev-lab/facebook-ads-library): Meta ads with creatives, copy, links, and spend when available.
- [Google Ads Transparency Scraper](https://apify.com/valev-lab/google-ads-transparency): Google advertisers, show dates, and ad previews.
- [LinkedIn Ad Library Scraper](https://apify.com/valev-lab/linkedin-ad-library-scraper): LinkedIn ad copy, targeting, and EU impressions.

Missing a field or need a custom version? Open an issue in the **Issues** tab and we will take a look.

# Actor input Schema

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

Keywords, advertiser names, or pasted Ads Library URLs. Wrap a phrase in quotes for exact match. Empty searches all ads for the regions and dates.

## `searchBy` (type: `string`):

How to interpret non-URL search terms.

## `advertiserIds` (type: `array`):

Optional adv_biz_ids. Skips name resolution when set with advertiser search.

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

Ad IDs or library detail URLs to fetch directly. Turn on Fetch ad details to add targeting and reach.

## `regions` (type: `array`):

all or ISO country codes from the Commercial Content Library (33 markets).

## `startDate` (type: `string`):

YYYY-MM-DD. Earlier than ~1 year is clamped with a warning.

## `endDate` (type: `string`):

YYYY-MM-DD. Empty means today.

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

Filter by active, inactive, or all ads.

## `adFormat` (type: `string`):

Filter by video, image, text, or all formats.

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

TikTok buckets such as 18,24 or 55,100. Empty means all.

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

Audience gender filter.

## `reach` (type: `array`):

0-10K, 10K-100K, or 100K+.

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

Order of search results from the Ads Library API.

## `maxAds` (type: `integer`):

Total ads to deliver in this run. Empty-input health check uses 5.

## `maxAdsPerQuery` (type: `integer`):

Optional per-query cap. Empty uses maxAds.

## `fetchDetails` (type: `boolean`):

Adds targeting (countries, ages, genders, languages, interests) and impressions per country by age and gender. Slower: about 5 seconds per ad.

## `downloadMedia` (type: `boolean`):

Save each ad's videos and images in the run storage and link them in the results. Charged per saved file; previews are free and files over 30 MB are skipped.

## `countOnly` (type: `boolean`):

Only report how many ads TikTok has for each search. No ads are saved or charged.

## `onlyNewAds` (type: `boolean`):

Return only ads not seen in earlier runs with the same monitor name. Already seen ads are skipped and not charged. Best with a schedule.

## `monitorName` (type: `string`):

Name for this monitor. Runs with the same name share their seen-ads list.

## `includeAdvertiserSummary` (type: `boolean`):

Save an ADVERTISERS record with ad counts per advertiser in the run storage. Free.

## `outputFormat` (type: `string`):

clean camelCase fields, or compatible Title Case keys used by other Ads Library actors.

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

Timezone label stored on the run summary. Dates remain UTC day boundaries.

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

Reserved. Regions are searched one after another.

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

Advanced, API only. Leave empty. You can pass your own proxyUrls at your own cost; Apify Residential is not supported and runs without a proxy.

## `debug` (type: `boolean`):

Hidden operator flag. Logs COST_ESTIMATE when true.

## Actor input object example

```json
{
  "searchTerms": [
    "nike"
  ],
  "searchBy": "keyword",
  "advertiserIds": [],
  "adIds": [],
  "regions": [
    "FR"
  ],
  "adStatus": "all",
  "adFormat": "all",
  "ages": [],
  "gender": "all",
  "reach": [],
  "sortBy": "last_shown_desc",
  "maxAds": 5,
  "fetchDetails": false,
  "downloadMedia": false,
  "countOnly": false,
  "onlyNewAds": false,
  "monitorName": "default",
  "includeAdvertiserSummary": true,
  "outputFormat": "compatible",
  "timezone": "UTC",
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

Saved ads and free status rows.

## `files` (type: `string`):

Key-value store with OUTPUT and ADVERTISERS.

# 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 = {
    "searchTerms": [
        "nike"
    ],
    "regions": [
        "FR"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("valev-lab/tiktok-ads-library").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 = {
    "searchTerms": ["nike"],
    "regions": ["FR"],
}

# Run the Actor and wait for it to finish
run = client.actor("valev-lab/tiktok-ads-library").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 '{
  "searchTerms": [
    "nike"
  ],
  "regions": [
    "FR"
  ]
}' |
apify call valev-lab/tiktok-ads-library --silent --output-dataset

```

## MCP server setup

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

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/10UxQlI7NbJFcSAjq/builds/FWQsjRW8T7HeWX0Of/openapi.json
