# 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
- **Features:** Limited permissions
- **Stats:** 122 total users, 19 monthly users, 82.3% runs succeeded, 0 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TikTok Ads Library 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).

## `queryType` (type: `string`):

Controls what the Ad Library search query matches against. '1' = Advertiser Name, '2' = Keyword / Hashtag, '3' = Ad Content.

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

Use Apify Proxy or custom proxies to avoid IP blocks. Recommended for high-volume scraping.

## Actor input object example

```json
{
  "searchQuery": "adidas",
  "source": "both",
  "region": "US",
  "maxAds": 50,
  "queryType": "1",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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(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 '{}' |
apify call aiscraperdev/tiktok-ads-library-scraper --silent --output-dataset

```

## MCP server setup

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