# TikTok Ads Library Scraper — Ad Library + Creative Center (`aiscraperdev/tiktok-ads-library-scraper`) Actor

Scrape TikTok Ads Library and Creative Center. Get video URLs,
advertiser names, dates, CTR rankings, and cover images.
Search by keyword, brand, or advertiser. No login required.

- **URL**: https://apify.com/aiscraperdev/tiktok-ads-library-scraper.md
- **Developed by:** [Randeep Dhillon](https://apify.com/aiscraperdev) (community)
- **Categories:** Developer tools, Lead generation, E-commerce
- **Stats:** 5 total users, 0 monthly users, 92.3% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.50 / 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 Ads Library Scraper — Ad Library + Creative Center

Extract structured ad data from **TikTok Ads Library** and **TikTok Creative Center** in one run. Search by keyword, brand name, or advertiser — and get direct video CDN URLs, CTR rankings, cover images, advertiser names, and ad duration data. No TikTok account, no login, no API key required.

> ⚡ **Two sources in one actor** — unlike other TikTok scrapers on Apify that only hit one source, this actor combines the **Ad Library** (`library.tiktok.com`) and the **Creative Center** (`ads.tiktok.com/business/creativecenter`) in a single run, giving you both verified advertiser data AND performance metrics.

---

### What you can do with this scraper

- **Competitor research** — see every ad your competitors are running on TikTok right now
- **Creative intelligence** — build a swipe file of winning video ad creatives
- **Dropshipping & ecommerce** — find products being heavily advertised with real video assets
- **Agency reporting** — pull competitor TikTok ad data for client pitch decks in minutes
- **Market research** — track ad trends by brand, keyword, or region
- **Performance analysis** — use `ad_active_days` and `ctr_ranking` to identify winning creatives

---

### How to use

#### Step 1 — Add your search queries

The `Search Queries` field accepts three types of input (you can mix them):

| Input type | Example |
|---|---|
| Keyword | `nike`, `skincare`, `fitness app` |
| Brand / advertiser name | `adidas AG`, `JD Sports` |
| Advertiser ID | `7123456789012345678` |

You can add multiple queries at once — the actor scrapes all of them in a single run.

#### Step 2 — Set your filters

| Filter | Options | Default |
|---|---|---|
| **Region** | Any 2-letter code: `US`, `GB`, `IN`, `ALL` | `ALL` |
| **Ad Status** | Active / Inactive / All | `All` |
| **Ad Format** | All / Video / Image | `All` |
| **Date Range** | Last 7d / 30d / 90d / Custom | `Last 30d` |
| **Start Date** | `YYYY-MM-DD` e.g. `2026-01-01` | optional |
| **End Date** | `YYYY-MM-DD` e.g. `2026-05-09` | optional |
| **Source** | Ad Library / Creative Center / Both | `Both` |
| **Max Results** | Any number, `-1` for all | `100` |

#### Step 3 — Run and export

Click **Start** and wait for the run to complete. Download your results as **JSON, CSV, or Excel** — ready to use in Google Sheets, Airtable, n8n, Make, or Zapier.

---

### Sample output

#### Ad Library result
```json
{
  "ad_id": "1841597616960689",
  "source": "ad_library",
  "advertiser_name": "JD SPORTS FASHION PLC",
  "advertiser_id": "",
  "video_url": null,
  "cover_image_url": "https://p16-common-sign.tiktokcdn.com/...",
  "ad_text": null,
  "landing_page_url": "https://library.tiktok.com/ads/detail/?ad_id=1841597616960689",
  "first_shown_date": "2025-08-28",
  "last_shown_date": "2026-05-08",
  "ad_active_days": 253,
  "region": "ALL",
  "audit_status": "approved"
}
````

#### Creative Center result

```json
{
  "ad_id": "7626793079400792072",
  "source": "creative_center",
  "advertiser_name": "Oral-B",
  "video_url": {
    "360p": "https://v16m-default.tiktokcdn.com/...",
    "540p": "https://v16m-default.tiktokcdn.com/...",
    "720p": "https://v16m-default.tiktokcdn.com/...",
    "1080p": "https://v16m-default.tiktokcdn.com/..."
  },
  "cover_image_url": "https://p16-common-sign.tiktokcdn.com/...",
  "likes": 5272,
  "ctr_ranking": 0.99,
  "video_duration": 122.774,
  "region": "GB",
  "audit_status": "approved"
}
```

***

### Output fields reference

#### Ad content

| Field | Description | Source |
|---|---|---|
| `ad_id` | Unique TikTok ad ID | Both |
| `source` | `ad_library` or `creative_center` | Both |
| `video_url` | Direct CDN video URLs (360p–1080p) | Creative Center |
| `cover_image_url` | Direct CDN thumbnail/cover image URL | Both |
| `ad_text` | Ad copy text | Coming in v1.2 |
| `cta_text` | Call-to-action button text | Coming in v1.1 |
| `landing_page_url` | TikTok ad detail page link | Ad Library |
| `video_duration` | Video length in seconds | Creative Center |

#### Advertiser info

| Field | Description | Source |
|---|---|---|
| `advertiser_name` | Brand / company name | Both |
| `advertiser_id` | TikTok advertiser ID | Coming in v1.1 |

#### Delivery & performance

| Field | Description | Source |
|---|---|---|
| `first_shown_date` | Date ad first appeared (`YYYY-MM-DD`) | Ad Library |
| `last_shown_date` | Most recent appearance (`YYYY-MM-DD`) | Ad Library |
| `ad_active_days` | Days running — longer = stronger signal | Ad Library |
| `likes` | Total likes on the ad video | Creative Center |
| `ctr_ranking` | CTR percentile 0–1 (0.99 = top 1%) | Creative Center |
| `region` | Target region code e.g. `US`, `GB`, `ALL` | Both |
| `audit_status` | TikTok approval status | Both |

***

### Input schema reference

```json
{
  "searchQueries": ["nike", "adidas AG"],
  "region": "US",
  "adStatus": "active",
  "adFormat": "video",
  "dateRange": "last_30_days",
  "startDate": "2026-01-01",
  "endDate": "2026-05-09",
  "source": "both",
  "maxResults": 200
}
```

***

### Understanding the two sources

| Feature | Ad Library | Creative Center |
|---|---|---|
| Advertiser name | ✅ Always available | 🟡 Sometimes available |
| Video URL | ❌ Not available | ✅ Multi-resolution CDN |
| Cover image | ✅ Available | ✅ Available |
| Ad dates | ✅ First + last shown | ❌ Not available |
| Ad active days | ✅ Calculated | ❌ Not available |
| Likes count | ❌ Not available | ✅ Available |
| CTR ranking | ❌ Not available | ✅ Percentile score |
| Video duration | ❌ Not available | ✅ Precise seconds |

**Use Ad Library** when you need verified advertiser names, ad dates, and campaign duration.
**Use Creative Center** when you need actual video files, performance metrics, and CTR data.
**Use Both** for the most complete picture (recommended).

***

### Who uses this

- **Digital marketers** tracking competitor TikTok campaigns
- **Dropshippers** finding winning video ad creatives before investing in inventory
- **Marketing agencies** building TikTok ad strategies for clients
- **E-commerce brands** analysing competitor creatives before launching campaigns
- **Performance marketers** using `ctr_ranking` and `ad_active_days` to identify what's working
- **Content creators** studying what ad formats and hooks perform best in their niche

***

### Pricing

This actor uses **Pay-Per-Result** pricing — you only pay for ads actually scraped.

**$3.50 per 1,000 ads**

***

### Tips for best results

- An `ad_active_days` value over **90 days** is your strongest signal — ads running that long are almost always profitable
- A `ctr_ranking` above **0.75** means the ad is in the top 25% of all TikTok ads for CTR — gold for creative research
- Use **residential proxies** for maximum coverage — TikTok rate-limits heavily without them
- Run with `source: "ad_library"` when you need real brand names; run with `source: "creative_center"` when you need video files
- Set `maxResults: -1` carefully — popular brands like Nike can return thousands of ads

***

### Known limitations

- **Ad Library video URLs** — TikTok does not expose video files on the Ad Library; only cover images are available. Video URLs come from Creative Center only.
- **`landing_page_url`** — currently returns TikTok's own ad detail page link. Real advertiser destination URLs require an extra per-ad fetch and will be added in v1.1.
- **`advertiser_id`** — not publicly exposed by TikTok in the current library UI.
- **Ad text / CTA** — TikTok does not expose ad copy text in the public library for most ad formats. This will be added in v1.2 where available.
- **Spend and impressions data** — only available for EU-targeted ads under TikTok's transparency requirements.
- **CDN URLs expire** — video and image CDN links are temporary. Download media promptly after scraping.

***

### Roadmap

| Version | Feature |
|---|---|
| **v1.0 (current)** | Ad Library + Creative Center, video URLs, dates, CTR, cover images |
| **v1.1** | Real advertiser destination URLs, CTA text |
| **v1.2** | Ad text extraction where available |
| **v2.0** | EU audience size + spend data for political/issue ads |

***

### Related scrapers

- Facebook & Meta Ads Library Scraper
- Google Ads Transparency Scraper
- LinkedIn Ads Library Scraper

# Actor input Schema

## `searchQuery` (type: `string`):

Brand name, keyword, or URL.

## `source` (type: `string`):

Scrape from Ad Library, Creative Center, or Both.

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

2-letter code (e.g., US, GB, CA). NOTE: Creative Center searches globally. The Ad Library only covers Europe/UK; if you select 'US', the Ad Library will safely default to 'ALL'.

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

Select the start date from the calendar. Defaults to 30 days ago if left blank.

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

Select the end date from the calendar. Defaults to today if left blank.

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

Maximum number of ads to scrape (-1 for all).

## Actor input object example

```json
{
  "searchQuery": "adidas",
  "source": "both",
  "region": "US",
  "maxAds": 50
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("aiscraperdev/tiktok-ads-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("aiscraperdev/tiktok-ads-library-scraper").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 '{}' |
apify call aiscraperdev/tiktok-ads-library-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Ads Library Scraper — Ad Library + Creative Center",
        "description": "Scrape TikTok Ads Library and Creative Center. Get video URLs, \nadvertiser names, dates, CTR rankings, and cover images. \nSearch by keyword, brand, or advertiser. No login required.",
        "version": "0.0",
        "x-build-id": "itiDI59es2RarmCQI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/aiscraperdev~tiktok-ads-library-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-aiscraperdev-tiktok-ads-library-scraper",
                "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/aiscraperdev~tiktok-ads-library-scraper/runs": {
            "post": {
                "operationId": "runs-sync-aiscraperdev-tiktok-ads-library-scraper",
                "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/aiscraperdev~tiktok-ads-library-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-aiscraperdev-tiktok-ads-library-scraper",
                "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": [
                    "searchQuery"
                ],
                "properties": {
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Brand name, keyword, or URL.",
                        "default": "adidas"
                    },
                    "source": {
                        "title": "Data Source",
                        "enum": [
                            "ad_library",
                            "creative_center",
                            "both"
                        ],
                        "type": "string",
                        "description": "Scrape from Ad Library, Creative Center, or Both.",
                        "default": "both"
                    },
                    "region": {
                        "title": "Region / Country",
                        "type": "string",
                        "description": "2-letter code (e.g., US, GB, CA). NOTE: Creative Center searches globally. The Ad Library only covers Europe/UK; if you select 'US', the Ad Library will safely default to 'ALL'.",
                        "default": "US"
                    },
                    "startDate": {
                        "title": "Start Date",
                        "type": "string",
                        "description": "Select the start date from the calendar. Defaults to 30 days ago if left blank."
                    },
                    "endDate": {
                        "title": "End Date",
                        "type": "string",
                        "description": "Select the end date from the calendar. Defaults to today if left blank."
                    },
                    "maxAds": {
                        "title": "Max Ads",
                        "type": "integer",
                        "description": "Maximum number of ads to scrape (-1 for all).",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
