# TikTok Ad Library Scraper: Ads, Dates & Reach (`tacps126/tiktok-ad-library-scraper`) Actor

Scrape the TikTok Ad Library (Europe, UK, Switzerland, Turkey, Brazil): ads by advertiser or keyword with caption, video, cover, first and last date shown, days running, reach range and topic. Only-new monitoring.

- **URL**: https://apify.com/tacps126/tiktok-ad-library-scraper.md
- **Developed by:** [Tapaswai Choudhary](https://apify.com/tacps126) (community)
- **Categories:** Marketing, Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 90.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.37 / 1,000 tiktok 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

## TikTok Ad Library Scraper: Ads, Dates & Reach

Get the ads shown on TikTok in Europe, the UK, Switzerland, Turkey and Brazil from the TikTok Ad Library, by
advertiser or keyword: advertiser, caption, video and cover image, first and last date shown, running or
stopped, days running, reach range and topic. No TikTok account needed.

### At a glance

- **Find ads your way:** advertiser name as TikTok shows it, website domain, a link copied from the Ad
  Library, or keywords.
- **Ad creative:** caption, video link and cover image.
- **Timing and reach:** first and last date shown, running now or stopped, days running, and the range of
  people reached. Long-running ads (the ones that work) stand out.
- **Filters:** country, running now or all, date range, ad type (video, image).
- **Monitoring:** turn on *Only new ads* and schedule the run to get each new ad once.
- **Price:** $0.40 per 1,000 ads, below the usual Store price. A small start fee per run; lower prices on
  higher Apify plans.

### Input

```json
{
  "keywords": ["adidas"],
  "country": "DE",
  "mediaType": "video",
  "dateFrom": "3 months",
  "maxAdsPerAdvertiser": 100
}
```

### Output

One row per ad.

```json
{
  "source": "tiktok",
  "query": "adidas",
  "advertiserName": "Unisport A/S",
  "adId": "1866247411299586",
  "adUrl": "https://library.tiktok.com/ads/detail/?ad_id=1866247411299586",
  "format": "video",
  "firstShown": "2026-05-26",
  "lastShown": "2026-07-02",
  "isActive": false,
  "daysRunning": 38,
  "text": "Neuer adidas F50: Ultraleicht",
  "impressions": "1K-10K",
  "videoUrls": ["https://library.tiktok.com/api/v1/cdn/..."],
  "previewImageUrl": "https://p16-common-sign.tiktokcdn.com/...",
  "platforms": ["TikTok"],
  "regions": ["DE"]
}
```

### Questions

**Which countries?** The TikTok Ad Library covers ads shown in the EU and EEA, Switzerland, the UK, Turkey and
Brazil. Pick one of them, or `ALL` for all.

**Do the video links last?** TikTok's media links expire after some days. Download the files you want to keep
soon after the run.

**Need Google, Meta or LinkedIn ads too?** Competitor Ads (tacps126/competitor-ads) reads all four libraries in
one run, in the same row shape.

# Actor input Schema

## `advertisers` (type: `array`):

Advertisers to read, one per line: an advertiser name as TikTok shows it (Unisport A/S), a website domain, or a link copied from the TikTok Ad Library.

## `keywords` (type: `array`):

Words to find in ads, from any advertiser (adidas, running shoes).

## `country` (type: `string`):

Where the ads ran: a two-letter code of a country the TikTok Ad Library covers (the EU and EEA, CH, GB, TR, BR), or ALL for all of them.

## `activeStatus` (type: `string`):

Running now, or every ad in the library.

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

Only ads shown on or after this date (2026-10-01) or within a period (30 days, 2 weeks, 3 months).

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

Only ads shown on or before this date (2026-11-14).

## `mediaType` (type: `string`):

Only ads of this kind. Text means text-only ads (no image or video).

## `maxAdsPerAdvertiser` (type: `integer`):

Most ads to return for each advertiser or keyword, in each library.

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

Most ads per run, both libraries together.

## `onlyNew` (type: `boolean`):

Schedule the Actor and each run returns only ads that earlier runs did not deliver, tracked per advertiser: adding a brand later does not reset the others.

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

Optional name for the "only new" history, so several monitors can run side by side.

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

Apify proxy on by default. Leave it as is unless you want to use your own proxy.

## `tenantId` (type: `string`):

Optional label used to keep separate histories for different clients or teams.

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

Verbose logs.

## `delivery` (type: `object`):

Webhook: {"webhookUrl": "https://...", "format": "json" | "slack" | "discord", "onlyWhenResults": true, "includeItems": 10}. Google Sheets: {"spreadsheetId": "<id from the sheet URL>", "sheetName": "Sheet1"} plus the service account key below; share the sheet with the service account's e-mail first. Leave empty to only save results in the dataset.

## `googleServiceAccountJson` (type: `string`):

Only for Google Sheets delivery: paste the service account's JSON key. Stored encrypted; the account sees only sheets you share with it.

## Actor input object example

```json
{
  "keywords": [
    "adidas"
  ],
  "country": "DE",
  "activeStatus": "active",
  "mediaType": "all",
  "maxAdsPerAdvertiser": 10,
  "maxItems": 200,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debug": false
}
```

# Actor output Schema

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

One row per ad; the source field says which library it came from.

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

Counts per library, warnings, and whether the run stopped early.

# 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 = {
    "keywords": [
        "adidas"
    ],
    "country": "DE",
    "maxAdsPerAdvertiser": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "keywords": ["adidas"],
    "country": "DE",
    "maxAdsPerAdvertiser": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

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

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "adidas"
  ],
  "country": "DE",
  "maxAdsPerAdvertiser": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tacps126/tiktok-ad-library-scraper --silent --output-dataset

```

## MCP server setup

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

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

## OpenAPI specification

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