# TikTok Ads Scraper (`spectre_scrape/tiktok-ads-scraper-v2`) Actor

Extract TikTok ads from the Tiktok Ads Library -> no browser, no slow crawling. Competitor ad intelligence at $1/1k results.

- **URL**: https://apify.com/spectre\_scrape/tiktok-ads-scraper-v2.md
- **Developed by:** [Spectre](https://apify.com/spectre_scrape) (community)
- **Categories:** Social media, Lead generation, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## TikTok Ad Library Scraper

Scrape ads from the TikTok Commercial Content Library at scale. Search by keyword and filter by country and ad type to automatically extract active ads globally. There is no login, no complex setup, and no brittle DOM scraping. Feed the output into your competitive research workflow, ad monitoring dashboard, or automation pipeline.

### Who is this for?

* **Media buyers and performance marketers** doing competitor research. See what video creatives your competitors are running, their estimated audience sizes, and their publication timelines across global and EU transparency regions.
* **Marketing agencies** automating weekly social intelligence reports. Schedule runs on Apify, export to CSV or JSON, and pipe the data straight into your client dashboards.
* **Developers and automation builders** (n8n, Make, Zapier) who need TikTok ad video data programmatically. Trigger runs via API, process video URLs recursively in your pipeline, and build alerting systems around competitor ad launches.

### How to use it

1. Open **TikTok Ad Library Scraper** on Apify.
2. Enter your desired **Search Keyword** (e.g. "Nike" or a competitor's brand).
3. Set your target filters (e.g., Target Country, Ad Type).
4. Set your **Max ads to scrape** limit and ensure the **Proxy** is set (Residential is highly recommended for TikTok).
5. Click **Start**.
6. When the run finishes, click **Export** to download your data as JSON, CSV, or Excel.

### Input options

| Field | Description | Default |
| --- | --- | --- |
| **Search Keyword** | The term or brand to search for within the Ad Library. | `Nike` |
| **Ad Target Country** | Exact text of the country dropdown to select (e.g. `France`, `United Kingdom`, `All countries`). | `All countries` |
| **Ad Type** | Exact text of the category to isolate (e.g. `All ad types`, `Political and issue ads`). | `All ad types` |
| **Max ads to scrape** | Cap on total ads extracted via algorithmic scrolling. | 20 |
| **Proxy configuration** | Residential proxies strongly recommended to bypass geographic and Cloudflare blocks. | Residential |

### Why this scraper?

* **No login or cookies required.** Works straight out of the box.
* **Fast and Reliable.** Hits TikTok's internal APIs natively for clean, structured data extraction without the headache.
* **Algorithmic Pagination**. Simply give it a `Max Ads` number, and the engine handles fetching subsequent pages automatically.
* **Direct Video Links.** Captures the direct `video_url` and `cover_img` CDN endpoints for seamless creative downloading.
* **JSON, CSV, Excel export.** One click in the Apify console.
* **Proxy support built in.** Residential proxy rotation handled automatically.
* **Scheduled runs.** Set it and forget it. Apify handles cron-style scheduling natively.

### Data fields

The scraper extracts these primary fields for each ad:

* `id`
* `name` (Advertiser Name)
* `title` (Ad Copy / Caption)
* `first_shown_date` & `last_shown_date` (Timestamps)
* `estimated_audience`
* `impression`
* `videos` (Array containing `video_url` and `cover_img`)
* `image_urls`
* `audit_status`

### Sample output

```json
[
  {
    "id": "1868639890571377",
    "name": "NIKE Retail B.V.",
    "audit_status": "1",
    "type": "2",
    "first_shown_date": 1782000000000,
    "last_shown_date": 1782000000000,
    "videos": [
      {
        "video_url": "https://library.tiktok.com/api/v1/cdn/.../video.mp4?...&signature=...",
        "cover_img": "https://p16-common-sign.tiktokcdn.com/.../cover.jpeg"
      }
    ],
    "estimated_audience": "1K-10K",
    "spent": "",
    "impression": 0,
    "show_mode": 1,
    "image_urls": [],
    "title": "Commande l'équipement qui t'aidera à relever tous les défis."
  }
]
````

### API access

Trigger runs programmatically and retrieve results via the Apify API. Works with any HTTP client, cURL, or SDK.

```bash
curl --request POST \
  --url https://api.apify.com/v2/acts/spectre_scrape~tiktok-ads-scraper-v2/runs?token=YOUR_TOKEN \
  --header 'Content-Type: application/json' \
  --data '{
    "keyword": "Nike",
    "targetCountry": "France",
    "adType": "All ad types",
    "maxAds": 50,
    "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
  }'
```

Fetch results after the run completes:

```bash
curl --request GET \
  --url https://api.apify.com/v2/acts/spectre_scrape~tiktok-ads-scraper-v2/runs/last/dataset/items?token=YOUR_TOKEN
```

### Integrations

Connect this scraper to your existing stack:

- **Make (Integromat) and Zapier**: Use the Apify integration to trigger runs and process results automatically.
- **n8n**: Use the HTTP Request node or the Apify node to build custom workflows.
- **Google Sheets**: Export results directly from the Apify console.

### Pricing

This actor runs on Apify's standard compute usage. Because it utilizes a headless Playwright instance and relies heavily on Residential proxies for optimal access to TikTok's geo-fenced Transparency networks, resource consumption will reflect browser-based extraction costs rather than standard HTTP.

### Legal

TikTok's Commercial Content Library is a public transparency tool. This scraper does not extract private user data. It strictly intercepts public intelligence data made openly available by the platform. Please consult local privacy and scraping regulations (such as GDPR) depending on how you utilize the extracted advertiser data.

### Feedback

Found a bug, hitting a new Cloudflare wall, or have a feature request? Open an issue on the actor's Issues tab in the Apify Console. We read every report.

👉 [Launch TikTok Ad Library Scraper](#)

**Keywords:** tiktok ads scraper, tiktok creative center scraper, tiktok ads library scraper, scrape tiktok ads, competitor ad analysis, tiktok intelligence, video ads scraper, tiktok ads API

# Actor input Schema

## `keyword` (type: `string`):

Keyword to search the EU Library API for.

## `targetCountry` (type: `string`):

Exact text of the country to select natively from the UI (e.g. 'France', 'United Kingdom', 'All countries').

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

Exact text of the Ad Type to select (e.g. 'All ad types', 'Political and issue ads').

## `publishedDaysAgo` (type: `integer`):

Sets the predefined date range on the UI (e.g., typically TikTok evaluates last 7, 30 days).

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

Max results to try to fetch.

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

Apify proxies. RESIDENTIAL works best to avoid Cloudflare.

## Actor input object example

```json
{
  "keyword": "Nike",
  "targetCountry": "All countries",
  "adType": "All ad types",
  "publishedDaysAgo": 30,
  "maxAds": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

List of TikTok ads scraped from the Ad Library

# 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 = {
    "keyword": "Nike"
};

// Run the Actor and wait for it to finish
const run = await client.actor("spectre_scrape/tiktok-ads-scraper-v2").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 = { "keyword": "Nike" }

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

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

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

```

## CLI example

```bash
echo '{
  "keyword": "Nike"
}' |
apify call spectre_scrape/tiktok-ads-scraper-v2 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=spectre_scrape/tiktok-ads-scraper-v2",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Ads Scraper",
        "description": "Extract TikTok ads from the Tiktok Ads Library -> no browser, no slow crawling. Competitor ad intelligence at $1/1k results.",
        "version": "1.0",
        "x-build-id": "6QLR2BEqmHr6eYQKw"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/spectre_scrape~tiktok-ads-scraper-v2/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-spectre_scrape-tiktok-ads-scraper-v2",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/spectre_scrape~tiktok-ads-scraper-v2/runs": {
            "post": {
                "operationId": "runs-sync-spectre_scrape-tiktok-ads-scraper-v2",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/spectre_scrape~tiktok-ads-scraper-v2/run-sync": {
            "post": {
                "operationId": "run-sync-spectre_scrape-tiktok-ads-scraper-v2",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "maxAds"
                ],
                "properties": {
                    "keyword": {
                        "title": "Search Keyword",
                        "type": "string",
                        "description": "Keyword to search the EU Library API for."
                    },
                    "targetCountry": {
                        "title": "Ad Target Country",
                        "type": "string",
                        "description": "Exact text of the country to select natively from the UI (e.g. 'France', 'United Kingdom', 'All countries').",
                        "default": "All countries"
                    },
                    "adType": {
                        "title": "Ad Type",
                        "type": "string",
                        "description": "Exact text of the Ad Type to select (e.g. 'All ad types', 'Political and issue ads').",
                        "default": "All ad types"
                    },
                    "publishedDaysAgo": {
                        "title": "Publication Days Limit",
                        "type": "integer",
                        "description": "Sets the predefined date range on the UI (e.g., typically TikTok evaluates last 7, 30 days).",
                        "default": 30
                    },
                    "maxAds": {
                        "title": "Max Ads to Scrape",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Max results to try to fetch.",
                        "default": 20
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify proxies. RESIDENTIAL works best to avoid Cloudflare.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
