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

($1/1000) The TikTok Ads Scraper extracts structured ad data from the advertiser details, creatives, audience targeting, impression ranges, and "paid for by" disclosures. It's built for marketers, competitive researchers, agencies, and anyone monitoring TikTok advertising.

- **URL**: https://apify.com/anyxsolutions/tiktok-ads-scraper.md
- **Developed by:** [Anyx Solutions](https://apify.com/anyxsolutions) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

![banner](https://i.ibb.co/HDNBGQqH/Screenshot-2026-06-20-at-10-19-06-PM.png)

## TikTok Ads Scraper

**Unlock the TikTok Ad Library for competitive insights, creative inspiration, and market research within minutes.**

The TikTok Ads Scraper extracts structured ad data from the [TikTok Ad Library](https://library.tiktok.com): advertiser details, creatives, audience targeting, impression ranges, and "paid for by" disclosures. It's built for marketers, competitive researchers, agencies, and anyone monitoring TikTok advertising.

### ⚡ Quick start

Search by keyword:

```json
{
  "query": "skincare sale",
  "maxPages": 1
}
```

Or search by advertiser:

```json
{
  "advertiserName": "Mallows Beauty",
  "maxPages": 1
}
```

### 🧩 Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | array | no | — | TikTok Ad Library search URLs to scrape directly, e.g. `https://library.tiktok.com/ads?region=US&...`. Their parameters take precedence over the fields below. |
| `query` | string | one of `query`/`advertiserName`/`adIds` | — | Keyword phrase to locate ads. Use quotation marks for an exact phrase, or omit them to match words in any order. |
| `advertiserName` | string | one of `query`/`advertiserName`/`adIds` | — | Advertiser name to filter results by. Falls back to keyword search if no advertiser matches. |
| `adIds` | array | one of `query`/`advertiserName`/`adIds` | — | Collect specific ads by Ad Library ID. When set, `query` and `advertiserName` are ignored. |
| `quickSearch` | boolean | no | `false` | Return only what the results list holds, without opening each ad. Much faster, fewer fields. |
| `sortBy` | string | no | `last_shown_date,desc` | Result order: last shown, created, or impressions, each ascending or descending. |
| `maxItems` | integer | no | `5` | Maximum ads per run. Set it high, or clear it, to take every ad across the crawled pages. |
| `maxPages` | integer | no | `1` | Number of result pages to crawl. Each page returns up to 12 ads. |
| `startDate` | string | no | — | Lower bound for the ad date range, `YYYY-MM-DD`. Falls back to one year ago. |
| `endDate` | string | no | — | Upper bound for the ad date range, `YYYY-MM-DD`. Falls back to now. |
| `timezone` | string | no | — | IANA timezone used to read `startDate` and `endDate`, e.g. `America/New_York`. Falls back to UTC. |
| `country` | string | no | — | Country code to filter ads, or `all`. Falls back to `all`. |
| `proxyConfiguration` | object | no | `{"useApifyProxy":true}` | Apify proxy settings. |

When both `query` and `advertiserName` are supplied, the actor prioritizes the advertiser and falls back to the keyword query if no advertiser is found.

### 📤 Output

Each scraped ad is pushed to the dataset as one record.

#### Fields

| Field | Type | Description |
|---|---|---|
| `adId` | string | TikTok ad identifier. |
| `adTitle` | string | null | Ad name/title. |
| `adType` | string | number | null | Ad creative type (`1` text, `2` video, `3` image). |
| `adSpent` | string | number | null | Reported ad spend range. |
| `adVideoUrl` | string | null | Ad video URL. |
| `adVideoCover` | string | null | Ad video cover image URL. |
| `adStartDate` | number | string | null | First shown date. |
| `adEndDate` | number | string | null | Last shown date. |
| `advertiserId` | string | null | Advertiser business ID. |
| `advertiserName` | string | null | Advertiser name. |
| `advertiserCountry` | string | null | Advertiser registry country. |
| `adImpressions` | string | null | Total impressions range. |
| `advertiserPaidForBy` | string | null | "Paid for by" disclosure. |
| `adTotalRegions` | number | null | Number of regions targeted. |
| `adEstimatedAudience` | string | number | null | Estimated audience range. |
| `targetingByLocation` | array | Impressions broken down by location. |
| `targetingByAge` | array | Targeting broken down by age group. |
| `targetingByGender` | array | Targeting broken down by gender. |
| `status` | string | Whether the ad is currently running, as the Ad Library reports it. |
| `auditStatus` | string | null | TikTok's review outcome for the ad. |
| `sorAuditStatus` | string | null | Review outcome under TikTok's statement-of-reasons process. |
| `rejectionInfo` | object | null | Reason given when an ad was rejected. |
| `adImageUrls` | array | Image creative URLs, for image ads. |
| `advertiserTtUser` | string | null | Advertiser's TikTok account handle. |
| `advertiserLocation` | string | null | Advertiser's registered location. |

<details><summary>Example output</summary>

```json
{
  "adId": "1750117232800785",
  "adTitle": "Mallows Beauty",
  "adType": "2",
  "adVideoUrl": "https://v16m.tiktokcdn.com/...",
  "adVideoCover": "https://p19-csp-adlib-site-sign-sg.ibyteimg.com/...",
  "adStartDate": 1668988800000,
  "adEndDate": 1672185600000,
  "advertiserId": "6916504448172819201",
  "advertiserName": "Mallows Beauty",
  "adImpressions": "10K-100K",
  "advertiserPaidForBy": "Wayflyer Limited (GBP)",
  "targetingByLocation": [{ "region": "GB", "impressions": "21K" }],
  "targetingByAge": [{ "region": "GB", "18-24": true, "25-34": true }],
  "targetingByGender": [{ "region": "GB", "female": true }]
}
```

</details>

### 💡 Use cases

- **Marketers** benchmark competitor creatives and messaging.
- **Agencies** research advertiser activity and spend ranges.
- **Researchers** analyze targeting, impressions, and ad trends.
- **Creators** find creative inspiration across brands.

### ❓ FAQ

- **What is the TikTok Ad Library?** A public database of ads served on TikTok, including advertiser, creative, and targeting details.
- **What can be scraped?** Public ads matching a keyword query or advertiser name, optionally filtered by date and region.
- **What if TikTok changes its site?** We maintain the scraper and update it when major changes affect functionality.

### 🔗 More scrapers by Anyx

- [TikTok Trending Hashtag Scraper](https://apify.com/anyxsolutions/tiktok-trending-hashtag-scraper)
- [Google Ads Scraper](https://apify.com/anyxsolutions/tiktok-trending-hashtag-scraper)
- [Youtube Channel Scraper](https://apify.com/anyxsolutions/tiktok-trending-hashtag-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

Email : tantosthor@gmail.com

# Actor input Schema

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

Paste TikTok Ad Library search URLs (for example, a https://library.tiktok.com/ads?... link with region, dates, advertiser, and sort). Each URL is scraped as its own search with its own filters. When provided, the query, advertiser name, country, dates, and sort fields below are ignored.

## `query` (type: `string`):

Keywords to search for in the TikTok Ad Library. Wrap a phrase in quotation marks (for example, "red shoe sale") to match that exact sequence, or leave the quotes off to return ads containing the words in any order. Provide either a search query or an advertiser name.

## `advertiserName` (type: `string`):

Name of the advertiser whose ads you want to collect, for example "Nike". Provide either a search query or an advertiser name.

## `adIds` (type: `array`):

Collect specific ads by their TikTok Ad Library ID, for example 1798123456789012345. When provided, the search query and advertiser name are ignored.

## `quickSearch` (type: `boolean`):

Return only the data available on the search results list (creative, dates, audit status) without fetching each ad's full details. Much faster, but omits advertiser and targeting data.

## `sortBy` (type: `string`):

Order in which results are returned — by last shown date, creation date, or impressions.

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

Maximum number of ads to collect per run. Leave empty to collect every ad across the crawled pages.

## `maxPages` (type: `integer`):

Maximum number of result pages to crawl per run. Each page returns up to 12 ads.

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

Only include ads shown on or after this date, for example 2026-01-31 (format: YYYY-MM-DD). Defaults to one year ago when left empty.

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

Only include ads shown on or before this date, for example 2026-06-30 (format: YYYY-MM-DD). Defaults to today when left empty.

## `timezone` (type: `string`):

IANA timezone (for example, "America/New\_York") used to interpret the start and end dates. Defaults to UTC.

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

Two-letter country code used to filter ads, or "all" to include every supported country. Defaults to "all".

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

Apify proxy settings used for the run, for example { "useApifyProxy": true, "apifyProxyGroups": \["RESIDENTIAL"] }.

## Actor input object example

```json
{
  "query": "skincare sale",
  "quickSearch": false,
  "sortBy": "last_shown_date,desc",
  "maxItems": 5,
  "maxPages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "query": "skincare sale"
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/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 = { "query": "skincare sale" }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,anyxsolutions/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/2XcbqpOh4AxHqGW7V/builds/RfAdVo6geFgbPFReI/openapi.json
