# TikTok Top Ads Scraper - Creative Center Top Ads (`hgservices/tiktok-top-ads-scraper`) Actor

Scrape the top-performing TikTok ads from Creative Center by country, period, industry, objective and sort order. Get ad copy, brand, CTR, likes, budget tier and direct video links. Add ad details: landing page, comments, shares and the countries the ad ran in. No TikTok account. No browser.

- **URL**: https://apify.com/hgservices/tiktok-top-ads-scraper.md
- **Developed by:** [Harish Garg](https://apify.com/hgservices) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 scraped and saved 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 Top Ads Scraper — TikTok Creative Center Top Ads

Scrape the **best-performing TikTok ads** from the [TikTok Creative Center Top Ads](https://ads.tiktok.com/business/creativecenter/inspiration/topads/pc/en) library: TikTok's own showcase of the ads that perform best in each market. Get one clean row per ad, with the **ad copy, brand, CTR rank, likes, budget tier, campaign objective and direct video links up to 1080p**.

**Every ad, not only the first page.** Without a TikTok login, the Creative Center shows you only the top 20 ads of each ranking. TikTok Top Ads Scraper gets **all the ads** of the ranking: about 140 ads for the US over 30 days, and more than 1,000 over 180 days.

Turn on **ad details** to also get the **landing page URL, comment count, share count, the countries the ad ran in and all its campaign objectives**.

Filter by **country** (28 markets), **period** (7, 30 or 180 days), **campaign objective** and **industry** (258 industries and sub-industries). Sort by TikTok's **For You** mix, **CTR**, **likes**, **impressions** or **conversions**.

No TikTok account. No TikTok API key. No proxy setup.

### What does TikTok Top Ads Scraper do?

TikTok Top Ads Scraper is a TikTok ad library scraper. It exports the TikTok Creative Center Top Ads ranking to JSON, CSV, Excel or HTML, with the same filters as the Creative Center page.

- **Top TikTok ads by country** — the ads that TikTok ranks highest in each of its 28 Creative Center markets, for example the US, the UK, Germany, Japan, Indonesia and Brazil.
- **Three ranking periods** — the last 7 days (what works now), 30 days (the monthly top) or 180 days (long-running winners). Get more than one period in one run.
- **Campaign objectives** — get only conversion ads, app install ads, lead generation ads, or any of TikTok's eight objectives.
- **Industries** — get the top ads of your niche, from 21 industries and their sub-industries.
- **All the ads of each ranking** — or only TikTok's top 20 per ranking, for a faster run.
- **Five sort orders** — For You, click-through rate (CTR), likes, impressions or conversions.
- **TikTok ad videos** — direct MP4 links in up to five resolutions, from 360p to 1080p, plus the cover image.
- **Ad details** — landing page, comments, shares, the ad's countries and all its objectives.

### Why scrape TikTok Top Ads?

- **Ad creative research** — collect the ads with the best CTR rank in your market. Study their hooks, video length, format and calls to action.
- **TikTok ad swipe files** — keep the top ads of your industry, with the video links ready to download.
- **Competitor ad monitoring** — see which brands run high-budget TikTok campaigns in each country, and how the ranking changes week to week.
- **Landing page research** — with ad details on, see where each top ad sends its traffic.
- **Market and trend analysis** — compare the top ads across countries, industries and objectives in one dataset.
- **AI and data pipelines** — give TikTok ad data to your dashboards, BI tools or AI agents through the Apify API and MCP server.

### How to scrape TikTok Top Ads

1. Open [TikTok Top Ads Scraper](https://apify.com/HGServices/tiktok-top-ads-scraper) on Apify Store and click **Try for free**. A free Apify account is enough.
2. Select one or more **countries** and **periods**.
3. Optional: select **campaign objectives** or **industries**, and a **sort order**.
4. Optional: turn on **Add ad details**.
5. Set the **maximum ads** for the run.
6. Click **Start**.
7. Open the **Output** tab. View the ads as a table, or download them as JSON, CSV, Excel or HTML.

### Input

All the fields are optional. With an empty input, the scraper gets the top ads of the United States for the last 7 days, sorted by For You, up to 1,000 ads.

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `countries` | array of strings | `["US"]` | Country codes of the markets to scrape. One or more of: `AR`, `AU`, `BR`, `CA`, `CO`, `FR`, `DE`, `ID`, `IT`, `JP`, `MY`, `MX`, `NL`, `PK`, `PH`, `RO`, `SA`, `SG`, `ZA`, `KR`, `ES`, `SE`, `TH`, `TR`, `AE`, `GB`, `US`, `VN` |
| `periods` | array of strings | `["7"]` | Ranking periods in days: `"7"`, `"30"`, `"180"`. The scraper gets every period for every country |
| `objectives` | array of strings | all | Only ads with these campaign objectives: `traffic`, `app_install`, `conversions`, `video_views`, `reach`, `lead_generation`, `product_sales`, `app_promotion` |
| `industries` | array of strings | all | TikTok industry IDs, for example `"27000000000"` for Food & Beverage. A parent industry also includes its sub-industries. See [Industry IDs](#industry-ids) |
| `sortBy` | string | `"for_you"` | `for_you`, `ctr`, `likes`, `impressions` or `conversions` |
| `topAdsOnly` | boolean | `false` | `true`: get only TikTok's top 20 ads per combination of filters. Faster. `false`: get all the ads |
| `includeAdDetails` | boolean | `false` | `true`: add the landing page, comments, shares, countries and all objectives of each ad. Slower |
| `maxItems` | integer | `1000` | Stop after this many ads, for all the combinations together. From 1 to 50,000 |

The scraper gets each combination of country, period, objective and industry. For example, 2 countries and 2 periods make 4 combinations.

#### Input examples

The top TikTok ads in the US this week:

```json
{
    "countries": ["US"],
    "periods": ["7"],
    "sortBy": "for_you",
    "maxItems": 50
}
```

The monthly top ads in three markets, best CTR first:

```json
{
    "countries": ["US", "GB", "DE"],
    "periods": ["30"],
    "sortBy": "ctr",
    "maxItems": 300
}
```

Skincare conversion ads, with landing pages and other ad details:

```json
{
    "countries": ["US"],
    "periods": ["30", "180"],
    "objectives": ["conversions"],
    "industries": ["14103000000"],
    "sortBy": "conversions",
    "includeAdDetails": true,
    "maxItems": 100
}
```

### Output

You get one row per ad. When more than one combination contains the same ad, the scraper outputs it one time only, with the first combination that found it.

Sample output, with ad details on:

```json
{
    "ad_id": "7689628524550946824",
    "ad_title": "TWO DAYS UNTIL TOUGH LOVE🧛🏻‍♀️",
    "brand_name": null,
    "budget_tier": "medium",
    "ctr_top_percent": 10,
    "likes": 140100,
    "objective": "traffic",
    "industry_key": "label_23116000000",
    "video_urls": {
        "720p": "https://v16m-default.tiktokcdn.com/..."
    },
    "video_url": "https://v16m-default.tiktokcdn.com/...",
    "thumbnail_url": "https://p16-common-sign.tiktokcdn.com/...",
    "video_duration_seconds": 30.867,
    "video_width": 720,
    "video_height": 1280,
    "landing_page_url": "https://www.tiktok.com/music/Dracula-7685558823097501697?...",
    "comment_count": 39,
    "share_count": 163,
    "countries": ["US", "ES", "PL", "CH"],
    "objectives": ["reach", "traffic", "video_views"],
    "ad_source": "Others",
    "details_scraped": true,
    "details_error": null,
    "source_url": "https://ads.tiktok.com/business/creativecenter/inspiration/topads/pc/en?period=7&region=US&order_by=like",
    "country": "US",
    "period_days": 7,
    "sort_order": "like",
    "scraped_at": "2026-10-20T02:05:45+00:00"
}
```

#### Output fields

| Field | Description |
|-------|-------------|
| `ad_id` | TikTok's ID of the ad |
| `ad_title` | The ad copy |
| `brand_name` | The brand that runs the ad. `null` when TikTok shows no brand name |
| `budget_tier` | TikTok's budget tier: `low`, `medium` or `high` |
| `ctr_top_percent` | The CTR rank. `10` means that the ad's click-through rate is in the top 10 %. Lower is better |
| `likes` | Likes on the ad video |
| `objective` | The campaign objective, for example `conversions` |
| `industry_key` | TikTok's industry key. `label_23116000000` is industry `23116000000` (News & Entertainment › Culture & Art). See [Industry IDs](#industry-ids) |
| `video_urls` | Video links by resolution, from 360p to 1080p, as TikTok has them |
| `video_url` | The video link with the highest resolution |
| `thumbnail_url` | The video cover image |
| `video_duration_seconds`, `video_width`, `video_height` | The video length in seconds, and its size in pixels |
| `landing_page_url` | The page that the ad links to. Ad details only |
| `comment_count`, `share_count` | Comments and shares on the ad. Ad details only |
| `countries` | The countries that the ad ran in. Ad details only |
| `objectives` | All the campaign objectives of the ad. Ad details only |
| `ad_source` | Where TikTok got the ad from. Ad details only |
| `details_scraped` | `true` when the row has the ad details |
| `details_error` | Why the ad details are missing, when ad details are on |
| `source_url` | The Creative Center page of the combination that found the ad |
| `country`, `period_days` | The country and the period of that combination |
| `sort_order` | The sort order of that combination: `for_you`, `ctr`, `like`, `impression` or `cvr` (conversions) |
| `scraped_at` | When the scraper got the ad (ISO 8601, UTC) |

When ad details are off, the ad detail fields are `null`.

The video and image links come from TikTok and **expire after a few hours**. Download the videos soon after the run to keep them.

The **Output** tab has two views: **Top Ads** (performance and creative) and **Details** (landing page, comments, shares, countries).

The **Source report** (the `SOURCES` record in the key-value store) has one entry per combination. Each entry gives the status (`ok`, `partial`, `no_results`, `failed` or `crashed`), the new ads, the ads found, TikTok's own ad count, the ads whose details failed, `complete` (`false` when the maximum ads or your cost limit stopped the combination) and any error. The status `partial` means that some ads of the combination can be missing.

### How to use TikTok Top Ads Scraper

You can run TikTok Top Ads Scraper from Apify Console, from the Apify API, or from an AI assistant. All the channels take the same input and give the same output.

#### Apify Console

1. Open [TikTok Top Ads Scraper](https://console.apify.com/actors/HGServices~tiktok-top-ads-scraper) in Apify Console.
2. Select the **countries**, the **periods** and the other filters on the **Input** tab.
3. Click **Start**.
4. Open the **Output** tab when the run ends.
5. Click **Export** to download the ads as JSON, CSV, Excel, XML or HTML.

To get new top ads every week, click **Schedule** and set a weekly schedule.

#### API: HTTP

Get your API token in Apify Console, on the [API & Integrations](https://console.apify.com/settings/integrations) page. This request starts a run, waits for it to end and returns the ads:

```bash
curl -X POST "https://api.apify.com/v2/acts/HGServices~tiktok-top-ads-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
        "countries": ["US"],
        "periods": ["7"],
        "sortBy": "ctr",
        "maxItems": 50
      }'
```

This endpoint waits up to 300 seconds. For larger runs, start the run with `POST /v2/acts/HGServices~tiktok-top-ads-scraper/runs`. Then get the ads from `GET /v2/datasets/<defaultDatasetId>/items?format=json`. Use `format=csv` or `format=xlsx` for a spreadsheet.

#### API: JavaScript client

Install the client with `npm install apify-client`.

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });

const run = await client.actor('HGServices/tiktok-top-ads-scraper').call({
    countries: ['US', 'GB'],
    periods: ['30'],
    sortBy: 'likes',
    maxItems: 200,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const ad of items) {
    console.log(ad.brand_name, ad.likes, ad.video_url);
}
```

#### API: Python client

Install the client with `pip install apify-client`.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("HGServices/tiktok-top-ads-scraper").call(run_input={
    "countries": ["US"],
    "periods": ["7", "30"],
    "objectives": ["conversions"],
    "includeAdDetails": True,
    "maxItems": 100,
})

for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad["brand_name"], ad["ctr_top_percent"], ad["landing_page_url"])
```

#### AI assistants: Claude and ChatGPT with the Apify MCP server

The [Apify MCP server](https://mcp.apify.com) lets AI assistants run TikTok Top Ads Scraper and read its results. Use this server URL, which adds only this scraper:

```text
https://mcp.apify.com/?tools=HGServices/tiktok-top-ads-scraper
```

**Claude (claude.ai and Claude Desktop)**

1. Open **Settings** › **Connectors**.
2. Click **Add custom connector**.
3. Type a name, for example `Apify`, and paste the server URL.
4. Click **Add**, then sign in to Apify to approve access.
5. In a new chat, turn on the connector in the tools menu.

**Claude Code**

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=HGServices/tiktok-top-ads-scraper"
```

Then type `/mcp` in Claude Code and sign in to Apify.

**ChatGPT**

1. Turn on **Developer mode** in ChatGPT.
2. Open **Settings** › **Apps & Connectors** and click **Create**.
3. Type a name, paste the server URL and select **OAuth** for authentication.
4. Click **Create**, then sign in to Apify to approve access.
5. In a new chat, click **+**, select **More** and select your Apify connector.

**Other MCP clients** (Cursor, VS Code, Windsurf and more) use the same URL. Add it to the client's MCP configuration:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?tools=HGServices/tiktok-top-ads-scraper"
        }
    }
}
```

**Example prompts**

- "Get the top 30 TikTok ads in the US for the last 7 days, sorted by CTR. Make a table of brand, ad copy, CTR rank and likes."
- "Find the best TikTok conversion ads in the UK and Germany for the last 30 days. Summarize the hooks that they use."
- "Get the top skincare ads on TikTok for the last 180 days, with ad details. List their landing pages."

### Tips

- **Speed** — getting all the ads of a ranking takes about one minute for 140 ads and about 10 minutes for 1,000 ads. Turn on **Only TikTok's top 20** for a fast run.
- **CTR rank** — TikTok does not show the click-through rate itself. It shows a CTR percentile, for example "Top 9%". The scraper gives it as `ctr_top_percent`: `9` means that the ad's CTR is in the top 9 %.
- **Sort order** — the first 20 ads of each combination come in TikTok's order. When you sort by CTR or likes, the other ads also come in that order.
- **Industries** — in Apify Console, select the industries by name. Through the API or MCP, use the IDs from [Industry IDs](#industry-ids).
- **Cost limit** — set a **maximum cost per run** in the run options. The scraper stops at the limit and keeps every ad that it got.

### FAQ

**Is this the TikTok Creative Center data?**
Yes. The scraper gets the same Top Ads ranking that the TikTok Creative Center page shows, with the same filters.

**Do I get all the ads, or only the first page?**
All the ads. TikTok's Top Ads library is a curated showcase, not a full archive of all TikTok ads. For the US, it has about 25 ads for 7 days, 140 for 30 days and more than 1,000 for 180 days. TikTok's own ad count stops at about 400 to 500, so for 180 days the scraper can find more ads than TikTok counts.

**Can I download the TikTok ad videos?**
Yes. Each row has direct video links in up to five resolutions, from 360p to 1080p. The `video_url` field has the highest resolution. The links expire after a few hours, so download the videos soon after the run.

**Do I need a TikTok account or a TikTok API key?**
No. The TikTok Top Ads ranking is public, and the scraper needs no login.

**Can I get the TikTok ad spend or the exact CTR?**
No. TikTok does not publish them. The scraper gives TikTok's budget tier (`low`, `medium` or `high`) and the CTR rank.

**Can I scrape TikTok ads on a schedule?**
Yes. Use an Apify schedule to run the scraper every day or every week, and connect the results to Google Sheets, Slack, Zapier, Make or a webhook.

**Is it legal to scrape TikTok Top Ads?**
The scraper gets only public ad data that TikTok publishes in its Creative Center. It does not get personal data. Make sure that your use of the data obeys TikTok's terms and the laws of your country.

**I found a problem.**
Open an issue on the **Issues** tab. Add the run URL, and we will fix it.

### Industry IDs

The **Industries** input in Apify Console is a list of names. Through the API or MCP, use the industry IDs, as strings:

```json
{ "industries": ["27000000000", "14103000000"] }
```

A parent industry, in **bold**, also includes all its sub-industries. TikTok can change this list. When TikTok no longer has an industry ID, the scraper skips it and writes a warning to the run log.

| Industry ID | Industry |
|-------------|----------|
| `22000000000` | **Apparel & Accessories** (all) |
| `22102000000` | Apparel & Accessories › Bags |
| `22101000000` | Apparel & Accessories › Clothing Accessories |
| `22107000000` | Apparel & Accessories › High-end Jewelry |
| `22108000000` | Apparel & Accessories › Men's Clothing |
| `22109000000` | Apparel & Accessories › Men's Shoes |
| `22106000000` | Apparel & Accessories › Ordinary Jewelry |
| `22999000000` | Apparel & Accessories › Other Apparel & Accessories |
| `22112000000` | Apparel & Accessories › Traditional & Ceremonial Clothing |
| `22105000000` | Apparel & Accessories › Watches |
| `22113000000` | Apparel & Accessories › Wearable Tech Devices |
| `22110000000` | Apparel & Accessories › Women's Clothing |
| `22111000000` | Apparel & Accessories › Women's Shoes |
| `16000000000` | **Appliances** (all) |
| `16105000000` | Appliances › Digital Devices |
| `16104000000` | Appliances › Home Appliances |
| `16101000000` | Appliances › Kitchen & Bathroom Appliances |
| `16102000000` | Appliances › Large Appliances |
| `16999000000` | Appliances › Other Appliances |
| `16100000000` | Appliances › Personal Care Appliances |
| `20000000000` | **Apps** (all) |
| `20101000000` | Apps › Audio & Video Players |
| `20110000000` | Apps › Business & Productivity |
| `20104000000` | Apps › Education |
| `20106000000` | Apps › Financial Services |
| `20109000000` | Apps › Health & Fitness |
| `20107000000` | Apps › Life & Leisure |
| `20102000000` | Apps › News & Reading |
| `20105000000` | Apps › Online Shopping |
| `20999000000` | Apps › Other Apps |
| `20111000000` | Apps › Parenting |
| `20103000000` | Apps › Photography |
| `20100000000` | Apps › Social |
| `20108000000` | Apps › Travel |
| `20112000000` | Apps › Utilities |
| `12000000000` | **Baby, Kids & Maternity** (all) |
| `12104000000` | Baby, Kids & Maternity › Baby Bedding |
| `12108000000` | Baby, Kids & Maternity › Baby Feeding Supplies |
| `12100000000` | Baby, Kids & Maternity › Baby Food |
| `12102000000` | Baby, Kids & Maternity › Baby Formula |
| `12110000000` | Baby, Kids & Maternity › Baby Hygiene Products |
| `12105000000` | Baby, Kids & Maternity › Baby Shoes |
| `12107000000` | Baby, Kids & Maternity › Child Car Seats |
| `12109000000` | Baby, Kids & Maternity › Children's Apparel |
| `12103000000` | Baby, Kids & Maternity › Diapers & Baby Wipes |
| `12999000000` | Baby, Kids & Maternity › Other Baby, Kids & Maternity |
| `12101000000` | Baby, Kids & Maternity › Strollers & Cribs |
| `12106000000` | Baby, Kids & Maternity › Toys for Kids |
| `14000000000` | **Beauty & Personal Care** (all) |
| `14105000000` | Beauty & Personal Care › Aesthetic Medicine |
| `14104000000` | Beauty & Personal Care › Cosmetics |
| `14107000000` | Beauty & Personal Care › Feminine Care |
| `14106000000` | Beauty & Personal Care › Fragrances & Perfumes |
| `14101000000` | Beauty & Personal Care › Haircare |
| `14100000000` | Beauty & Personal Care › Oral Care |
| `14999000000` | Beauty & Personal Care › Other Beauty & Personal Care |
| `14103000000` | Beauty & Personal Care › Skincare |
| `14102000000` | Beauty & Personal Care › Wig & Hair Styling |
| `24000000000` | **Business Services** (all) |
| `24108000000` | Business Services › Agriculture, Forestry, Animal Husbandry & Fishing |
| `24118000000` | Business Services › Auction Services |
| `24105000000` | Business Services › Chemical Materials |
| `24103000000` | Business Services › Constructional Engineering |
| `24104000000` | Business Services › Electronics & Electrical |
| `24109000000` | Business Services › Energy Conservation & Environmental Protection |
| `24114000000` | Business Services › Exhibition Services |
| `24107000000` | Business Services › Franchising |
| `24116000000` | Business Services › IT Services |
| `24120000000` | Business Services › Individual Entrepreneurship |
| `24119000000` | Business Services › Investment Planning & Management |
| `24117000000` | Business Services › Legal Services |
| `24111000000` | Business Services › Logistics |
| `24106000000` | Business Services › Machinery & Equipment |
| `24112000000` | Business Services › Marketing & Advertising |
| `24101000000` | Business Services › Office Equipment & Supplies |
| `24999000000` | Business Services › Other Business Services |
| `24113000000` | Business Services › Professional Consultation |
| `24100000000` | Business Services › Real Estate & Home Rentals |
| `24102000000` | Business Services › Recruitment & Job Searching |
| `24110000000` | Business Services › Safety & Security |
| `24115000000` | Business Services › Service Outsourcing |
| `30000000000` | **E-Commerce (Non-app)** (all) |
| `30100000000` | E-Commerce (Non-app) › Big Box Retailers |
| `30102000000` | E-Commerce (Non-app) › Large E-commerce Platforms |
| `30101000000` | E-Commerce (Non-app) › Small & Medium-sized E-commerce Platforms |
| `10000000000` | **Education** (all) |
| `10100000000` | Education › Early Childhood & Preschool Education |
| `10102000000` | Education › Higher Education |
| `10105000000` | Education › Language Training |
| `10106000000` | Education › Non-academic Training (Hobbies) |
| `10999000000` | Education › Other Education |
| `10103000000` | Education › Overseas Education |
| `10101000000` | Education › Primary & Secondary Education & K-12 |
| `10104000000` | Education › Vocational Training |
| `13000000000` | **Financial Services** (all) |
| `13100000000` | Financial Services › Commercial Banks |
| `13108000000` | Financial Services › Credit Bureaus |
| `13117000000` | Financial Services › Credit Cards |
| `13115000000` | Financial Services › Crowd Funding |
| `13116000000` | Financial Services › Cryptocurrencies |
| `13112000000` | Financial Services › Foreign Exchange Transactions |
| `13107000000` | Financial Services › Funds |
| `13104000000` | Financial Services › Guarantees |
| `13102000000` | Financial Services › Insurance |
| `13110000000` | Financial Services › Investment Advisory |
| `13111000000` | Financial Services › Loan Services |
| `13109000000` | Financial Services › Microfinance Companies |
| `13999000000` | Financial Services › Other Financial Services |
| `13105000000` | Financial Services › Pawn Shops |
| `13113000000` | Financial Services › Precious Metals |
| `13101000000` | Financial Services › Securities |
| `13114000000` | Financial Services › Third-Party Payments |
| `13103000000` | Financial Services › Trusts |
| `27000000000` | **Food & Beverage** (all) |
| `27103000000` | Food & Beverage › Alcoholic Beverages |
| `27104000000` | Food & Beverage › Cooking & Recipes |
| `27100000000` | Food & Beverage › Cuisine |
| `27101000000` | Food & Beverage › Food & Fresh Produce |
| `27102000000` | Food & Beverage › Non-alcoholic Beverages |
| `27999000000` | Food & Beverage › Other Food & Beverage |
| `25000000000` | **Games** (all) |
| `25301000000` | Games › Action |
| `25302000000` | Games › Casino |
| `25300000000` | Games › Hyper-Casual |
| `25313000000` | Games › Kids |
| `25303000000` | Games › Match |
| `25999000000` | Games › Other |
| `25311000000` | Games › Party |
| `25304000000` | Games › Puzzle |
| `25306000000` | Games › RPG |
| `25305000000` | Games › Racing |
| `25307000000` | Games › Shooting |
| `25308000000` | Games › Simulation |
| `25309000000` | Games › Sports |
| `25310000000` | Games › Strategy |
| `25312000000` | Games › Tabletop |
| `29000000000` | **Health** (all) |
| `29102000000` | Health › Dietary Supplements |
| `29101000000` | Health › Medical Information |
| `29100000000` | Health › Medical Services |
| `29103000000` | Health › Medicine |
| `29999000000` | Health › Other Health |
| `21000000000` | **Home Improvement** (all) |
| `21102000000` | Home Improvement › Construction Materials & Lighting |
| `21101000000` | Home Improvement › Furniture |
| `21103000000` | Home Improvement › Hardware & Electrical |
| `21104000000` | Home Improvement › Home Decor |
| `21100000000` | Home Improvement › Interior Design & Decorating Services |
| `21999000000` | Home Improvement › Other Home Improvement |
| `21105000000` | Home Improvement › Power Strips & Socket |
| `18000000000` | **Household Products** (all) |
| `18106000000` | Household Products › Cleaning Appliances |
| `18110000000` | Household Products › Cleaning Supplies |
| `18104000000` | Household Products › Coffee Accessories |
| `18101000000` | Household Products › Daily Essentials |
| `18102000000` | Household Products › Glasses & Drinkware |
| `18105000000` | Household Products › Kitchen Accessories |
| `18108000000` | Household Products › Laundry |
| `18109000000` | Household Products › Leather Care |
| `18999000000` | Household Products › Other Household Products |
| `18112000000` | Household Products › Pest Control |
| `18100000000` | Household Products › Storage Products |
| `18103000000` | Household Products › Tea Sets |
| `18107000000` | Household Products › Tissues & Wet Wipes |
| `18111000000` | Household Products › Toys |
| `26000000000` | **Life Services** (all) |
| `26114000000` | Life Services › Beauty & Personal Care |
| `26112000000` | Life Services › Consumer Services |
| `26102000000` | Life Services › Dating & Matchmaking Services |
| `26113000000` | Life Services › Exercise & Fitness |
| `26108000000` | Life Services › Gardening |
| `26104000000` | Life Services › Gifts & Flowers |
| `26105000000` | Life Services › Housekeeping |
| `26111000000` | Life Services › Internet Services |
| `26999000000` | Life Services › Other Life Services |
| `26101000000` | Life Services › Photography |
| `26106000000` | Life Services › Shopping Services |
| `26107000000` | Life Services › Used Good Sales Platforms |
| `26109000000` | Life Services › Utilities Payments |
| `26103000000` | Life Services › Wedding Celebrations |
| `26100000000` | Life Services › Wedding Photography |
| `23000000000` | **News & Entertainment** (all) |
| `23113000000` | News & Entertainment › Anime |
| `23114000000` | News & Entertainment › Astrology |
| `23122000000` | News & Entertainment › Beauty & Personal Care |
| `23102000000` | News & Entertainment › Business & Economy |
| `23126000000` | News & Entertainment › Car Information |
| `23108000000` | News & Entertainment › Celebrities & Gossip |
| `23105000000` | News & Entertainment › Charity & Public Welfare |
| `23111000000` | News & Entertainment › Collectables & Antiques |
| `23116000000` | News & Entertainment › Culture & Art |
| `23104000000` | News & Entertainment › Culture & History |
| `23128000000` | News & Entertainment › E-commerce Information |
| `23107000000` | News & Entertainment › Environmental Protection |
| `23124000000` | News & Entertainment › Food & Cooking |
| `23125000000` | News & Entertainment › Games & Utility Software |
| `23127000000` | News & Entertainment › General Information |
| `23115000000` | News & Entertainment › Humor |
| `23106000000` | News & Entertainment › Law |
| `23109000000` | News & Entertainment › Lifestyle News |
| `23110000000` | News & Entertainment › Live Events |
| `23100000000` | News & Entertainment › Military |
| `23119000000` | News & Entertainment › Movies |
| `23999000000` | News & Entertainment › Other News & Entertainment |
| `23129000000` | News & Entertainment › Pet Information |
| `23101000000` | News & Entertainment › Politics |
| `23118000000` | News & Entertainment › Reading |
| `23130000000` | News & Entertainment › Real Estate Information |
| `23131000000` | News & Entertainment › Relationship Information |
| `23103000000` | News & Entertainment › Science & Technology |
| `23134000000` | News & Entertainment › Social Media Account Promotion |
| `23123000000` | News & Entertainment › Sports & Fitness |
| `23132000000` | News & Entertainment › Streaming Site |
| `23112000000` | News & Entertainment › TV Drama & Series |
| `23117000000` | News & Entertainment › TV Variety Shows |
| `23133000000` | News & Entertainment › Tourist Information |
| `19000000000` | **Pets** (all) |
| `19999000000` | Pets › Other Pets |
| `19103000000` | Pets › Pet Grooming |
| `19101000000` | Pets › Pet Healthcare |
| `19102000000` | Pets › Pet Household Products |
| `19105000000` | Pets › Pet Toys |
| `19106000000` | Pets › Pet Travel Accessories |
| `19104000000` | Pets › Pet Treats |
| `19100000000` | Pets › Petfood |
| `28000000000` | **Sports & Outdoor** (all) |
| `28100000000` | Sports & Outdoor › Outdoor Equipment |
| `28101000000` | Sports & Outdoor › Sports & Equipment |
| `15000000000` | **Tech & Electronics** (all) |
| `15100000000` | Tech & Electronics › Cell Phones |
| `15105000000` | Tech & Electronics › Computer Accessories |
| `15103000000` | Tech & Electronics › Computer Repair |
| `15101000000` | Tech & Electronics › Computers |
| `15102000000` | Tech & Electronics › Computers Components |
| `15104000000` | Tech & Electronics › Gaming Devices |
| `15106000000` | Tech & Electronics › Network Products |
| `15107000000` | Tech & Electronics › Office Equipment |
| `15999000000` | Tech & Electronics › Other Tech & Electronics |
| `17000000000` | **Travel** (all) |
| `17103000000` | Travel › Hotels & Accommodation |
| `17999000000` | Travel › Other Travel |
| `17105000000` | Travel › Tours & Attractions |
| `17106000000` | Travel › Travel Agencies & Services |
| `11000000000` | **Vehicle & Transportation** (all) |
| `11111000000` | Vehicle & Transportation › Accessories for 2/3-Wheeled Vehicles |
| `11110000000` | Vehicle & Transportation › Airplanes |
| `11101000000` | Vehicle & Transportation › Auto Accessories |
| `11103000000` | Vehicle & Transportation › Auto Parts |
| `11102000000` | Vehicle & Transportation › Auto Services |
| `11100000000` | Vehicle & Transportation › Automobiles |
| `11107000000` | Vehicle & Transportation › Bicycles |
| `11112000000` | Vehicle & Transportation › Car Dealerships |
| `11104000000` | Vehicle & Transportation › Car Rentals |
| `11108000000` | Vehicle & Transportation › Electric Scooters |
| `11106000000` | Vehicle & Transportation › Motorcycles |
| `11999000000` | Vehicle & Transportation › Other Vehicle & Transportation |
| `11105000000` | Vehicle & Transportation › Used Cars |
| `11109000000` | Vehicle & Transportation › Water Vehicles |

# Actor input Schema

## `countries` (type: `array`):

Countries whose Top Ads to read. Leave empty for the United States.

## `periods` (type: `array`):

The ranking windows, in days: 7 for what performs right now, 30 for the monthly top, 180 for long-running winners. Every period selected is read for every country.

## `objectives` (type: `array`):

Read only ads with these campaign objectives. Leave empty for all objectives. Every objective selected is read for every country and period.

## `industries` (type: `array`):

Read only ads from these industries. A parent industry, marked (all), also includes its sub-industries. Every industry selected is read for every country, period and objective. Leave empty for all industries. API users pass the industry IDs, for example "25000000000" for E-commerce & Shopping; the README lists every ID.

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

How TikTok ranks the ads. For You is TikTok's recommended mix, CTR the best click-through rank, Likes the most engaging, Impressions the widest reach, Conversions the best converting. The first 20 ads of each combination come in TikTok's order. The ads after them come in the order of the CTR rank or the likes when you sort by these, and in the order that the Actor found them for the other sorts.

## `topAdsOnly` (type: `boolean`):

Read only the first 20 ads that TikTok ranks for each combination. Faster: one request per combination. Off: the Actor splits each combination by industry and objective and reads all its ads: about one request for each 6 ads, a few seconds each.

## `includeAdDetails` (type: `boolean`):

Fetch the detail page of each ad too: landing page, comments, shares, the countries the ad ran in and all its objectives. Slower: one more request per ad.

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

Stop after this many ads, over all combinations. For example, the US has about 25 ads for 7 days, 140 for 30 days and more than 1,000 for 180 days.

## Actor input object example

```json
{
  "countries": [
    "US"
  ],
  "periods": [
    "7"
  ],
  "sortBy": "for_you",
  "topAdsOnly": false,
  "includeAdDetails": false,
  "maxItems": 1000
}
```

# Actor output Schema

## `ads` (type: `string`):

One row per ad: brand, title, performance and creative.

## `details` (type: `string`):

Landing page, comments, shares and the ad's countries, when details are on.

## `sources` (type: `string`):

One entry per filter combination: status, new ads, ads found, TikTok's ad count and any errors.

# 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 = {
    "countries": [
        "US"
    ],
    "periods": [
        "7"
    ],
    "maxItems": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/tiktok-top-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 = {
    "countries": ["US"],
    "periods": ["7"],
    "maxItems": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("hgservices/tiktok-top-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 '{
  "countries": [
    "US"
  ],
  "periods": [
    "7"
  ],
  "maxItems": 1000
}' |
apify call hgservices/tiktok-top-ads-scraper --silent --output-dataset

```

## MCP server setup

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