# Tiktok Ads Scraper (`socialdataapi/tiktok-ads-scraper`) Actor

Tiktok Ads Scraper collects ads from TikTok's public Commercial Content Library: creative video or image, ad text, advertiser, landing page, objective and targeting by country, age and gender. No login needed. Export as JSON, CSV or Excel, or use the API.

- **URL**: https://apify.com/socialdataapi/tiktok-ads-scraper.md
- **Developed by:** [Social Data API](https://apify.com/socialdataapi) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.67 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Scraper — Creatives, Targeting and Advertiser Data

TikTok Ads Scraper pulls live ads from TikTok's public Commercial Content Library, the EU transparency archive published under the Digital Services Act. Each ad returns its creative video or image, ad text, advertiser and sponsor, landing page, campaign objective, and the full targeting breakdown by country, age and gender. **No TikTok account or login is needed.** Every response is structured JSON, ready to pass directly to an LLM, index into a vector store, or feed a competitive-intelligence pipeline. Start with one advertiser, then track a whole market.

![TikTok Ads Scraper: every ad and its targeting as JSON](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/h-tiktok-ads-hero.webp)

***

### What data can I extract with TikTok Ads Scraper?

Using this TikTok ad library API, you will be able to extract the following TikTok ad data:

| 🆔 Ad ID and text | 👤 Advertiser name | 💰 Sponsor (paid by) | 🔗 Landing page URL |
| --- | --- | --- | --- |
| 🎬 Video and image creative URLs | 🎯 Campaign objective | 📅 First/last shown dates | 📊 Estimated audience and impressions |
| 📍 Per-country impressions | 🎯 Targeting breakdown (age, gender, location, device) | 📱 Linked TikTok account | 🔗 Ad Library detail link |

***

### How to use TikTok Ads Scraper

Anyone who needs to scrape TikTok ads by advertiser name, by keyword, or from a full Ad Library URL points this Actor at a search term and reads typed JSON back.

**Copy to your AI assistant:**

```text
TikTok Ads Scraper (Apify Actor ID: socialdataapi/tiktok-ads-scraper, https://apify.com/socialdataapi/tiktok-ads-scraper) returns ads from TikTok's public Commercial Content Library as structured JSON: ad text, advertiser name, sponsor, landing page URL, call to action, campaign objective, creative URLs, and the full targeting and per-country impressions breakdown. Use it whenever someone needs TikTok ad transparency data without cookies, a login, or a browser - tracking a competitor's TikTok campaigns, building a creative swipe file, or feeding an ad-spend analysis pipeline. Inputs: startUrls (array, a keyword, advertiser name, or Ad Library URL per entry, required), searchType ("keyword" or "advertiser", default "keyword"), region (a supported EU/EEA/UK/CH/TR country code or "all", default "all"), sortOrder ("last_shown_date,desc" or "last_shown_date,asc", default desc), daysBack (integer, default 90), dateFrom/dateTo (explicit date range, overrides daysBack), maxAds (integer, per-entry cap, minimum 1, default 20; free plan: up to 20 ads per run across all search terms together and 200 per month), maxItems (integer, optional global cap across all entries), includeAdDetails (boolean, fetch the full per-ad detail payload, default true), detailConcurrency (integer 1-20, default 12), proxyConfiguration (object, defaults to the residential proxy group). Every row is billed under the same row_result event. A single (query, region, date-window) search plateaus at roughly 84 ads, so wider requests are automatically split into smaller date windows to collect more.
```

#### TikTok Ads Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Connect your AI assistant to Apify's MCP server and it can find and call this Actor on its own — no glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/tiktok-ads-scraper"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [**TikTok Ads Scraper**](https://apify.com/socialdataapi/tiktok-ads-scraper) in the Apify Store.
3. Enter a keyword, an advertiser name, or a full Ad Library URL. To scrape TikTok ads by advertiser instead of a keyword, set Search type to "advertiser".
4. Click **Start** (or send your API request).
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale TikTok Ads Scraper to bulk

Add more entries to the search-term list — each one runs independently in the same call, so 20 advertisers in one run return 20 ad sets without any extra setup. For a recurring competitor watch, schedule the run on Apify's built-in scheduler so the same advertiser list re-scrapes on its own. For a very large advertiser list, split it across a few scheduled runs rather than one giant list, so a block on one search never holds up the rest.

***

### ✨ Features

TikTok Ads Scraper fetches clean, structured ads from TikTok's Commercial Content Library. It's ideal for competitor research, creative swipe files, ad-spend and market analysis, and DSA transparency compliance work — teams often just call it a tiktok ad library scraper for that last use case, since it is pulling tiktok ads transparency library data straight into one dataset.

It extracts, per ad:

- **Ad text and advertiser** – the on-screen ad copy and the registered advertiser name
- **Sponsor** – the agency or business that actually paid for the ad
- **Creative URLs** – direct video or image links for the ad itself
- **Landing page and call to action** – where the ad sends people, and the button text
- **Campaign objective** – reach, traffic, sales, video views, or community interaction
- **Targeting breakdown** – audience size, age, gender, location, device and interest targeting

⚡ A blocked or rate-limited session is retried on a brand-new session automatically, so sustained runs keep working.

***

### Use cases 💡

- **Performance marketer** — benchmark a rival's creative and landing pages by advertiser name.
- **Competitive-intel analyst** — run this tiktok competitor ads scraper on a schedule to catch new campaigns.
- **Agency** — pull every ad an advertiser ran in a region for a pitch deck.
- **Compliance researcher** — audit Digital Services Act transparency data across EU markets.
- **AI agent builder** — feed targeting and creative data into a market-research or ad-spend tool.

Building an AI agent? [Connect TikTok Ads Scraper over MCP](#mcp-integration-for-ai-agents) and let it call the actor on its own.

***

### Why choose this actor?

1. **Every ad, not just a sample.** When a single search plateaus near 84 ads, the actor automatically splits the date range into 30-day then 7-day windows and searches both sort directions to surface the rest.
2. **Full targeting breakdown in the same row.** This doubles as a tiktok ad spend and targeting scraper — per-country impressions, audience size, and age, gender, location and device targeting all come back on the same row as the creative, no second lookup needed.
3. **33 regions, three ways to search.** Search by keyword, advertiser name, or a full Ad Library URL, across the ~33 EU/EEA + UK/CH/TR markets this library actually covers.

***

### ⬇️ Input

![TikTok Ads Scraper input: keywords or advertisers, search type, region and days back](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/h-tiktok-ads-input.webp)

Used as a tiktok ads by keyword scraper by default, TikTok Ads Scraper accepts one or more keywords, advertiser names, or Ad Library URLs; the search-term list is the only required field.

| Parameter | Required | Type | Description | Example value |
| --- | --- | --- | --- | --- |
| `startUrls` | ✅ Yes | array | A keyword, advertiser name, or full `library.tiktok.com/ads?...` URL per entry. | `["nike", "Zalando SE"]` |
| `searchType` | No | string | `keyword` (fuzzy full-text, default) or `advertiser` (match the brand name). Ignored for Ad Library URLs. | `"keyword"` |
| `region` | No | string | A supported EU/EEA + UK/CH/TR country code, or `all`. Default `all`. | `"all"` |
| `sortOrder` | No | string | `last_shown_date,desc` (default) or `last_shown_date,asc`. | `"last_shown_date,desc"` |
| `daysBack` | No | integer | Search ads shown in the last N days. Minimum 1, maximum 1095, default 90. Ignored when `dateFrom`/`dateTo` are both set. | `365` |
| `dateFrom` / `dateTo` | No | string | Explicit date range, e.g. `2025-06-01`. Overrides `daysBack`. | `"2025-06-01"` |
| `maxAds` | No | integer | Hard cap per search term. Minimum 1, maximum 5000, default 20. Free plan: up to 20 ads per run (all search terms together), 200 per month. | `200` |
| `maxItems` | No | integer | Optional global cap across all search terms. Maximum 50000. | `1000` |
| `includeAdDetails` | No | boolean | Fetch the full per-ad detail payload. Default `true`; `false` is faster and returns listing fields only. | `true` |
| `detailConcurrency` | No | integer | Parallel detail-fetch requests, 1-20. Default 12. | `12` |
| `proxyConfiguration` | No | object | Apify Proxy settings. Defaults to the residential group. | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` |

#### Free plan limits

Free plan: up to 20 ads per run (all search terms together) and 200 per month; paid plans have no limit.

#### Example input

```json
{
  "startUrls": ["nike", "Zalando SE"],
  "searchType": "keyword",
  "region": "all",
  "sortOrder": "last_shown_date,desc",
  "daysBack": 365,
  "maxAds": 200,
  "includeAdDetails": true,
  "detailConcurrency": 12,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

***

### ⬆️ Output

![TikTok Ads Scraper output: one row per ad with advertiser, objective and call to action](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/h-tiktok-ads-output.webp)

Every scraped ad becomes one typed, normalized JSON row with the same field set on every run — this tiktok advertiser ads export downloads as JSON, CSV or Excel straight from the Apify Console, or through the API. Every row is billed under the same charged event.

#### Example output

```json
{
  "adId": "1871609495925873",
  "adName": "Zalando SE",
  "adTitle": "Vai su Zalando",
  "adType": "2",
  "auditStatus": "1",
  "adDetailUrl": "https://library.tiktok.com/ads/detail/?ad_id=1871609495925873&region=all",
  "advertiserId": "7169992626543050754",
  "advertiserName": "Zalando SE",
  "advertiserRegistryLocation": "Germany",
  "paidBy": "Zalando SE",
  "landingPageUrl": "https://www.zalando.it/",
  "callToAction": "Shop now",
  "advertisingObjective": "Sales",
  "videos": [{ "url": "https://library.tiktok.com/api/v1/cdn/video123.mp4", "coverImageUrl": "https://library.tiktok.com/api/v1/cdn/cover123.jpg" }],
  "images": [],
  "firstShownDate": 1784505600000,
  "lastShownDate": 1785715200000,
  "firstShownDateIso": "2026-07-18T00:00:00+00:00",
  "lastShownDateIso": "2026-08-02T00:00:00+00:00",
  "estimatedAudience": "100K-200K",
  "impressions": { "lowerBound": 100000, "upperBound": 200000 },
  "regionStats": [{ "regionCode": "IT", "impressions": 150000, "impressionsRaw": "100K-200K" }],
  "targeting": {
    "audienceSizeRaw": "20.6M-25.2M",
    "regions": [{ "regionCode": "IT", "ageRanges": ["18-24", "25-34", "35-44"], "genders": ["female", "male"] }],
    "countries": ["IT"],
    "languages": ["Italian"],
    "operatingSystems": ["ALL"]
  },
  "tiktokUser": { "username": "zalando", "displayName": "Zalando", "followersCount": 1200000, "profileUrl": "https://www.tiktok.com/@zalando" },
  "searchTerm": "Zalando SE",
  "searchType": "advertiser",
  "region": "all",
  "sortOrder": "last_shown_date,desc",
  "hasDetails": true,
  "startUrl": "https://library.tiktok.com/ads?region=all&start_time=1697580800&end_time=1785715200&adv_name=Zalando+SE&adv_biz_ids=7169992626543050754&query_type=2&sort_type=last_shown_date,desc",
  "scrapedAt": "2026-10-18T10:00:00+00:00"
}
```

***

### How does it work?

Built as a tiktok commercial content library scraper from the ground up, TikTok Ads Scraper opens TikTok's public Commercial Content Library in a real browser for every search and detail lookup — no TikTok account or login involved. As an eu tiktok ads scraper, it only ever returns ads delivered in the EU/EEA, UK, Switzerland and Turkey, the roughly 33 markets this transparency library actually publishes; other regions are rejected before any request is made. Requests go through Apify Proxy when it's turned on, and a blocked or rate-limited session is retried on a brand-new session rather than read as "no ads here." Because a single search plateaus near 84 ads, longer date ranges are automatically split into smaller windows and searched in both sort orders to collect the full set. Ad detail lookups run with bounded concurrency so one slow request never stalls the rest, and rows whose detail payload could not be fetched still carry every listing-level field, flagged so you can tell the detail fetch didn't complete.

***

### How do you integrate TikTok Ads Scraper into your stack?

TikTok Ads Scraper works with what you already use: a REST API from any language, MCP for AI agents, and no-code automation tools.

#### MCP integration for AI agents

Connect your AI assistant to Apify's MCP server and it can find and call TikTok Ads Scraper directly, once it's in your account, with no scraping logic written into your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/tiktok-ads-scraper"
```

This registers Apify's MCP server as a tool your agent can call directly, and the agent finds this Actor itself through the server's search and call-actor tools. Works the same way in Claude Code, Cursor, and Windsurf.

#### No-code tools (n8n, Make, LangChain)

In n8n, use the Apify node's "Run an Actor" operation, or the HTTP Request node pointed at the Actor's run-sync endpoint with your Apify token. In Make, use the Apify app's "Run an Actor" module followed by "Get Dataset Items" to pull the rows into your scenario. In LangChain, install `langchain-apify` and call `ApifyActorsTool()` once the Actor is in your account — no ID needs to be hardcoded.

***

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

Collecting from the Commercial Content Library is generally considered legitimate research use: it is a public transparency archive that TikTok is legally required to publish under the EU Digital Services Act, and it contains no private user data. TikTok Ads Scraper returns only what that public archive already shows any visitor. You remain responsible for complying with TikTok's terms and applicable data-protection law in your jurisdiction. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does TikTok Ads Scraper return?

The top fields are the ad text, advertiser name, sponsor, landing page URL, and campaign objective. See [the data fields section](#what-data-can-i-extract-with-tiktok-ads-scraper) for the full list.

#### Does TikTok Ads Scraper require a TikTok account or login?

No. Only public ad-transparency data is extracted. No credentials are needed — the only token you use is your own Apify token.

#### What happens if a search term has no ads?

The run returns zero rows for that entry and logs a warning rather than failing, since the Commercial Content Library only covers ads delivered in the EU/EEA, UK, Switzerland and Turkey within the selected date range. Widening the date range or region is the usual fix.

#### Can I scrape ads for multiple advertisers or keywords at once?

Yes. The search-term list accepts multiple entries, each searched independently in the same run.

#### Does TikTok Ads Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — it is available through Apify's MCP server. Run `claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/tiktok-ads-scraper"` to register it in Claude Code, Cursor, or Windsurf. Any agent that can call an HTTP endpoint can also use the REST API directly.

#### Does TikTok Ads Scraper return data in a format LLMs can use directly?

Yes. Typed, normalized JSON with consistent field names and no HTML parsing or selectors involved — pass it straight to an LLM, index it into a vector store, or feed it to an agent tool with no transformation step.

#### What happens when TikTok changes its Ad Library layout or anti-bot system?

This Actor's maintainers update it when the Commercial Content Library changes — your calls keep returning the same JSON schema with no changes on your end.

#### Can I use TikTok Ads Scraper without managing proxies or browser infrastructure?

Yes. The browser session and proxy rotation both run on the Actor's side. You send one request and get structured JSON back — no proxy accounts, no headless browser setup, no maintenance.

#### Which fields work best for AI training data and RAG indexing?

For RAG, the text-rich fields — ad text, advertiser name, and campaign objective — carry the most context. For training data, the numeric and object fields — impressions, estimated audience, and the targeting breakdown — are typed primitives and structured objects that need no normalization.

***

### Your feedback

Found a bug, or need a field this Actor doesn't return? Open an issue from the Actor's page in Apify Console — reports that include the search term, region, and the run's log output are the quickest to reproduce and fix.

# Actor input Schema

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

One entry per search. Each entry can be:
• a keyword (e.g. `gaming`, `skincare`)
• an advertiser / brand name (e.g. `NVIDIA GmbH`) — set Search type to `advertiser`
• a full TikTok Ad Library URL (e.g. `https://library.tiktok.com/ads?region=all&adv_name=NVIDIA&query_type=1&...`) — region, date range, sort and query type are then read from the URL itself.

## `searchType` (type: `string`):

`keyword` performs a fuzzy full-text search over ad text and advertiser names. `advertiser` matches the advertiser/brand name (TikTok query_type=2). Ignored for entries that are full Ad Library URLs.

## `region` (type: `string`):

Country whose ad delivery you want. `all` covers every supported country. The TikTok Commercial Content Library only publishes EU/EEA + UK, Switzerland and Turkey ads — US and other markets are not available.

## `sortOrder` (type: `string`):

Order in which TikTok returns the ads. Only these two orders are accepted by TikTok's API.

## `daysBack` (type: `integer`):

Search ads shown within the last N days. Ignored when both `dateFrom` and `dateTo` are set.

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

Start of the date range, e.g. `2025-01-01`. Overrides `Look back (days)`.

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

End of the date range, e.g. `2026-01-01`. Defaults to today.

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

Hard cap of ads scraped for each entry above. TikTok returns at most ~84 ads per single query+time-window, so for higher values the date range is automatically split into 30-day and then 7-day windows to collect more unique ads. Free plan: up to 20 ads per run (all search terms together) and 200 per month; paid plans have no limit.

## `maxItems` (type: `integer`):

Global hard cap across all search terms. Leave empty for no global limit. Free plan: up to 20 ads per run (all search terms together) and 200 per month, regardless of this value; paid plans have no limit.

## `includeAdDetails` (type: `boolean`):

Fetch the per-ad detail payload (advertiser identity, paid-by sponsor, landing page URL, CTA, objective, targeting breakdown, linked TikTok account, per-country impressions). Turn off for a much faster, lighter run that only returns the listing fields.

## `detailConcurrency` (type: `integer`):

How many ad detail requests to run in parallel (1-20). This platform's detail endpoint is fragile under heavy load; lower this if you see many retries/blocks in the log.

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

Recommended: keep Apify Proxy ON. This platform rate-limits requests per IP, so the actor rotates a proxy session whenever it gets blocked. Without a proxy you still get results from the actor's own connection, but you are more likely to hit temporary blocks on higher volumes.

## Actor input object example

```json
{
  "startUrls": [
    "nike"
  ],
  "searchType": "keyword",
  "region": "all",
  "sortOrder": "last_shown_date,desc",
  "daysBack": 90,
  "maxAds": 5,
  "maxItems": 5,
  "includeAdDetails": true,
  "detailConcurrency": 12,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped ads, default view.

# 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 = {
    "startUrls": [
        "nike"
    ],
    "maxAds": 5,
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/tiktok-ads-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 = {
    "startUrls": ["nike"],
    "maxAds": 5,
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/tiktok-ads-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 '{
  "startUrls": [
    "nike"
  ],
  "maxAds": 5,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call socialdataapi/tiktok-ads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialdataapi/tiktok-ads-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/p1wzJa9lTkPXaJaTB/builds/DLXYplarqRNMteDF6/openapi.json
