# TikTok Ads Library Records Scraper (`automation-lab/tiktok-ads-library-records-scraper`) Actor

Search TikTok Ads Library by advertiser or keyword. Export ad records with advertiser, video and image links, first and last shown dates, and unique-user ranges for ad compliance and competitor monitoring.

- **URL**: https://apify.com/automation-lab/tiktok-ads-library-records-scraper.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Marketing, Social media
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 72.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.98 / 1,000 ad record saveds

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

## TikTok Ads Library Records Scraper

**Search TikTok's Ads Library and export ad records** with the advertiser name, video and image links, first and last shown dates, and the unique-user range TikTok reports. Run one search or schedule a weekly export for compliance and competitor monitoring.

TikTok publishes this library for the European Economic Area, the United Kingdom, Switzerland, Turkey and Brazil. This Actor covers those regions. No TikTok account or cookies are needed.

### What does TikTok Ads Library Records Scraper do?

It runs the searches you would run on [library.tiktok.com](https://library.tiktok.com/ads) and saves every matching ad as one row in an Apify dataset. Each row is a structured record you can download as JSON, CSV or Excel, or send to other tools.

You can search by advertiser name or keyword, match an exact phrase, or paste a search address from the library itself, including an advertiser's **See all ads** link. Filters match the library's own: region, dates, ad status, ad format, target gender, target age, unique-user range and sort order. Sort order applies to exact-phrase and advertiser searches, because TikTok ranks broad keyword searches by relevance, on its own site too.

**Scope:** this Actor exports the library's search records. It does not open each ad's detail page, so it does not include targeting, "paid by" or registered-location fields. See [What this Actor does not include](#what-this-actor-does-not-include).

### Who is TikTok Ads Library Records Scraper for?

- **Compliance and legal teams** keeping dated records of ads shown in EU, UK and other covered markets.
- **Competitive intelligence analysts** tracking how often a rival launches creatives and how long they run.
- **Performance marketers and agencies** collecting competitor video links as creative research.
- **Researchers and journalists** studying advertising activity across countries over time.
- **Data teams** adding TikTok ad activity to a warehouse or dashboard on a schedule.

### Why use this Actor?

- **Every library filter in one form.** Region, dates, status, format, gender, age, reach and sort.
- **Search-page URLs work directly.** Paste what you built in the library, and the Actor keeps its filters.
- **Clean, dated rows.** ISO 8601 dates and a `daysShown` count, ready for spreadsheets.
- **No account needed.** Nothing to log in to, and no cookies to renew.
- **Pay per ad saved.** A small start fee for each finished run, including a search that finds no ads, plus a price for each record. Bad input and failed runs are free. No monthly rental.

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

| Field | Description |
|---|---|
| `adId` | The ad's ID in TikTok's library |
| `adUrl` | Direct link to the ad's page in the library |
| `advertiserName` | Advertiser name as shown in the library |
| `adTitle` | The ad's text as the search results give it, such as `adidas Predator vs. F50 Elite`. Empty when TikTok gives none |
| `adCategory` | TikTok's category for the ad, such as `Sports & Outdoor`. Many ads have none |
| `firstShownAt` | Date the ad was first shown (ISO 8601) |
| `lastShownAt` | Date the ad was last shown (ISO 8601) |
| `daysShown` | Days between first and last shown, inclusive |
| `creativeType` | `video` or `image`, as filed by TikTok. `null` if TikTok gives no format |
| `videoUrls` | Video links for the ad (they expire, see the tips) |
| `coverImageUrl` | Video cover image |
| `imageUrls` | Image links for the ad |
| `uniqueUsersSeen` | Unique-user range reported by TikTok, such as `100K-200K` |
| `auditStatus` | TikTok's moderation code for the record, passed through unchanged |
| `rejectionInfo` | Rejection details, when TikTok lists them |
| `searchType` | `keyword` or `url` |
| `searchQuery` | The search that found this ad |
| `searchRegion` | The region filter used |
| `scrapedAt` | When the row was collected |

### How much does it cost to scrape the TikTok Ads Library?

You pay a small fee per run and a price per ad saved. Prices depend on your Apify plan:

| Event | Free | Bronze | Silver | Gold | Platinum | Diamond |
|---|---|---|---|---|---|---|
| Run started | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 |
| Ad record saved | $0.00122 | $0.00122 | $0.0011 | $0.00098 | $0.00098 | $0.00098 |

Examples on the Gold plan:

- 100 ads: about $0.10
- 1,000 ads: about $0.98

On the Free plan, Apify's $5 monthly credit covers about 4,000 ads. Set a spending limit on any run and the Actor stops when it is reached. A limit too low to cover the start fee and one ad is refused before the run starts, at no charge.

### How to scrape TikTok ads, step by step

1. Open the Actor and sign in to Apify.
2. Add **Search terms**, or paste a **Library URL** from library.tiktok.com/ads.
3. Pick **Regions** and any filters you need.
4. Set **Max results per search**. Start with 20 to check the output.
5. Click **Start**, then download the dataset as JSON, CSV or Excel.

To monitor an advertiser, save the input as an Apify Task and put it on a schedule.

### Input parameters

| Field | Type | Description |
|---|---|---|
| `searchTerms` | array | Advertiser names or keywords, one search each |
| `matchType` | string | `broad` (default) or `exact` for whole phrases |
| `startUrls` | array | Search addresses copied from library.tiktok.com/ads |
| `regions` | array | Country codes, or `all` (default) |
| `dateFrom` | string | Shown on or after this date, UTC. Default is 365 days before `dateTo` |
| `dateTo` | string | Shown on or before this date, UTC. Default is today |
| `adStatus` | string | `all` (default), `active` or `inactive` |
| `adType` | string | `all` (default), `video` or `image` |
| `gender` | string | `all` (default), `female` or `male` |
| `ages` | array | Age ranges such as `18,24`. Empty means all |
| `reach` | array | `0-10K`, `10K-100K`, `100K+`. Empty means all |
| `sort` | string | Result order for exact-phrase and advertiser searches. Default is newest last-shown first. TikTok ignores it on a broad search |
| `maxResults` | integer | Most ads saved per search. Default 50 |

Example input:

```json
{
    "searchTerms": ["coca cola"],
    "matchType": "exact",
    "regions": ["DE", "FR", "ES"],
    "adStatus": "inactive",
    "adType": "video",
    "sort": "mostUniqueUsers",
    "dateFrom": "2026-01-01",
    "maxResults": 40
}
```

Advertiser example, using the library's own link:

```json
{
    "startUrls": [{ "url": "https://library.tiktok.com/ads?adv_name=NIKE%20Retail%20B.V.&region=all&query_type=2&adv_biz_ids=6876453864464188162&sort_type=last_shown_date,desc" }],
    "maxResults": 100
}
```

### Output example

```json
{
    "adId": "1880764388533266",
    "adUrl": "https://library.tiktok.com/ads/detail/?ad_id=1880764388533266",
    "advertiserName": "NIKE Retail B.V.",
    "adTitle": "Get the gear that's up for it all. Any time. Anywhere.",
    "adCategory": "Apparel & Accessories",
    "firstShownAt": "2026-11-02T00:00:00.000Z",
    "lastShownAt": "2026-11-07T00:00:00.000Z",
    "daysShown": 6,
    "creativeType": "video",
    "videoUrls": ["https://library.tiktok.com/api/v1/cdn/..."],
    "coverImageUrl": "https://p16-common-sign.tiktokcdn.com/...",
    "imageUrls": ["https://p16-common-sign.tiktokcdn.com/..."],
    "uniqueUsersSeen": "100K-200K",
    "auditStatus": "1",
    "rejectionInfo": null,
    "searchType": "keyword",
    "searchQuery": "nike",
    "searchRegion": "FR",
    "scrapedAt": "2026-11-08T07:25:43.532Z"
}
```

### What this Actor does not include

TikTok limits how often a visitor can open an ad's detail record, so this Actor exports the search records only. It does **not** include:

- targeting summaries (location, age, gender, audience, interests);
- "paid by" sponsor names, advertiser registered location or advertiser business IDs;
- call to action, landing page or advertising objective, or any ad text beyond `adTitle`.

Each row's `adUrl` opens the full record in your browser, where those fields are shown.

### Tips and limits

- **Coverage is TikTok's.** The United States and other countries outside the listed regions are not in this library, so `regions` rejects them.
- **Broad search is loose.** TikTok's broad matching also returns related advertisers and sometimes unrelated records. Use `exact` or an advertiser link when precision matters.
- **Download media soon.** Video and image links are signed and expire, so save the files promptly if you need them.
- **Run size.** TikTok limits how many search pages one connection can read. Up to about 150 ads per search is quick and reliable. Larger searches keep going through new connections, but they slow down a lot and may stop early, so split big jobs by date range or region.
- **Time limits.** If a run nears its timeout, it stops cleanly and keeps every ad already saved. Give larger jobs a longer timeout.
- **Sorting a broad search.** TikTok returns broad keyword searches by relevance and ignores the sort order, on its own site too, and the run log says so. Use `matchType: exact` or an advertiser's **See all ads** link for sorted results.
- **Ads without media.** TikTok withholds the media of many ads in search results, and on some image searches most rows have none. `videoUrls` and `imageUrls` are then empty while `creativeType` still gives the format. A row with no advertiser name and `auditStatus` `2` is usually an ad TikTok has taken down. It is still a library record, so it counts as a saved ad.
- **Text ads.** TikTok's site lists a Text format, but it returns no ads, so this Actor offers video and image only.
- **Duplicates.** An ad found by more than one search in the same run is saved once.
- **A search that stops early.** If TikTok ends paging early, the Actor keeps everything it collected and says so in the log and status message.
- **Failures.** If the library refuses access after several attempts, the run ends as failed and you are not charged for ads it did not save.

### How do I use this in a workflow?

- **Weekly competitor report:** schedule a Task per advertiser link, then send new rows to Google Sheets.
- **Compliance archive:** export monthly by region with `dateFrom` and `dateTo` and keep the files.
- **Creative library:** take an advertiser link or exact phrase, filter on `adType: video`, sort by unique users, and download `videoUrls`.
- **Data warehouse:** read the dataset through the Apify API into BigQuery or Snowflake after each run.

### Use the API

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~tiktok-ads-library-records-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "searchTerms": ["nike"], "regions": ["FR"], "maxResults": 20 }'
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/tiktok-ads-library-records-scraper').call({
    searchTerms: ['nike'],
    regions: ['FR'],
    maxResults: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("automation-lab/tiktok-ads-library-records-scraper").call(run_input={
    "searchTerms": ["nike"],
    "regions": ["FR"],
    "maxResults": 20,
})
print(list(client.dataset(run["defaultDatasetId"]).iterate_items()))
```

### Use with AI agents through MCP

Add the Actor to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/tiktok-ads-library-records-scraper"
```

Or use this JSON in desktop and editor clients:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com?tools=automation-lab/tiktok-ads-library-records-scraper"
        }
    }
}
```

Claude Desktop setup: open Claude Desktop settings, edit the MCP server configuration, add the JSON above under `mcpServers`, then restart Claude Desktop.

Cursor setup: open **Cursor Settings → MCP**, add a new server, and paste the same JSON.

VS Code setup: open the MCP settings of your AI extension, add a new HTTP server, and paste the same URL.

The URL selects this Actor; Apify also adds its run and dataset tools. Start one run, follow that same run until it finishes, then read a limited number of rows with `get-dataset-items`.

Example prompts:

- "Find the 20 newest TikTok ads from Nike in France and list how long each ran."
- "Export inactive video ads containing the exact phrase coca cola in Germany since January."

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

TikTok publishes this library so the public can review advertising, and the Actor reads only what any visitor can see without logging in. You are responsible for how you use the data. Follow TikTok's terms, privacy law such as GDPR where it applies, and your own legal advice. Advertiser names can identify individuals, so keep only what you need.

This Actor is not affiliated with or endorsed by TikTok.

If a run or operation fails, the Actor sends sanitized diagnostic input, the error and the Actor, build and run IDs to our private GlitchTip error service so we can repair it. Secret fields and URL queries are removed, and reports are kept for 30 days.

### FAQ

**Does it include targeting or sponsor information?**
No. TikTok limits access to individual ad records, so this Actor exports search records only. Open a row's `adUrl` to see the full record.

**Can I get US ads?**
No. TikTok's library does not cover the United States.

**Why did a search return advertisers I did not ask for?**
That is how TikTok's broad search works. Use `exact` matching, or paste an advertiser's See all ads link for one advertiser only.

**How do I get one advertiser's ads?**
Search for them on library.tiktok.com, open an ad, click **See all ads**, and paste that page's address into **Library URLs**.

**My run failed with an access-token message. What should I do?**
The library occasionally refuses access for a while. Retry the run later. You are only charged for ads that were saved.

**Why are my video links no longer working?**
TikTok signs media links and they expire. Download files soon after the run, or run the search again for fresh links.

### Related Actors

- [Facebook Ads Library Scraper](https://apify.com/automation-lab/facebook-ads-library)
- [Google Ads Transparency Center Scraper](https://apify.com/automation-lab/google-ads-transparency-center-scraper)
- [LinkedIn Ad Library Scraper](https://apify.com/automation-lab/linkedin-ad-library-scraper)
- [Pinterest Ads Library Scraper](https://apify.com/automation-lab/pinterest-ads-library-scraper)

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/tiktok-ads-library-records-scraper/changelog.md

# Actor input Schema

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

Advertiser names or keywords to search in TikTok's Ads Library, one per line. Each term is a separate search with its own Max results limit. An ad found by more than one search is saved once, under the first search that found it. For one specific advertiser, use a Library URL instead.

## `matchType` (type: `string`):

How Search terms are matched. Broad uses TikTok's normal matching, which can also return related advertisers. Exact sends the term as a quoted phrase, matching TikTok's own quoted search. Does not apply to Library URLs.

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

Search pages copied from library.tiktok.com/ads, for example the See all ads link of an advertiser. Filters inside an address replace the filters below for that search; anything the address leaves out uses the filters below. Single-ad pages are not supported.

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

Where the ads were shown. TikTok publishes this library for the listed regions only; other countries such as the United States are not available. Choosing several regions runs one search across all of them.

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

Keep ads shown on or after this date (UTC). Leave empty for the 365 days before Shown until.

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

Keep ads shown on or before this date (UTC, the whole day counts). Leave empty for today.

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

Filter by whether TikTok lists the ad as active or inactive.

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

Filter by the ad's creative format.

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

Keep ads TikTok reports as targeted at this gender.

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

Keep ads targeted at any of these age ranges. Leave empty for all ages.

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

Keep ads whose unique-viewer range falls in any of these buckets. Leave empty for all.

## `sort` (type: `string`):

Order of results, which decides which ads you get when a search has more matches than Max results. Works with an exact phrase or an advertiser link. On a broad search TikTok ignores it and returns ads by relevance.

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

Most ads saved from each search term, advertiser or search URL. You are charged per ad saved.

## Actor input object example

```json
{
  "searchTerms": [
    "nike"
  ],
  "matchType": "broad",
  "regions": [
    "all"
  ],
  "adStatus": "all",
  "adType": "all",
  "gender": "all",
  "sort": "lastShownNewest",
  "maxResults": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

Ad records with advertiser, shown dates, creative links and unique-user range.

# 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"
    ],
    "maxResults": 20
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/tiktok-ads-library-records-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/dx6i279wXRpmMEPAM/builds/MTt1cdWYyMx5KX2iD/openapi.json
