# TikTok Ads Scraper (`parsebird/tiktok-ads-scraper`) Actor

Scrape TikTok Top Ads from Creative Center by country, industry, objective, ad format and period. Get ad copy, brand, likes, CTR rank, budget level, objective, industry, video and cover URLs, landing page. Export JSON, CSV, Excel.

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

## Pricing

from $1.19 / 1,000 tiktok ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

### TikTok Ads Scraper

TikTok Ads Scraper pulls the best-performing ads from the [TikTok Creative Center Top Ads library](https://ads.tiktok.com/business/creativecenter/inspiration/topads/pc/en) and returns each ad's copy, brand, likes, CTR rank, budget level, campaign objective, industry, landing page, and video links.

<table><tr>
<td style="border-left:4px solid #FE2C55;padding:12px 16px;font-weight:600">
Filter TikTok Top Ads by market, 7/30/180-day period, 21 industries, 7 campaign objectives, and Spark or Non-Spark format, sort by likes, CTR, reach, or CVR, and get up to 500 ads per run with no TikTok login.
</td>
</tr></table>

<br>

<table>
<tr>
<td colspan="3" style="padding:10px 14px;background:#010101;border:none;border-radius:4px 4px 0 0">
<span style="color:#FFFFFF;font-size:14px;font-weight:700;letter-spacing:0.5px">ParseBird TikTok Suite</span>
<span style="color:#25F4EE;font-size:13px">&nbsp;&nbsp;&bull;&nbsp;&nbsp;Trends, ads, LIVE, shop, stories &amp; slideshows</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/tiktok-trends-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">TikTok Trends Scraper</a><br>
<span style="color:#78716C;font-size:11px">Trending hashtags, sounds, creators</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;vertical-align:top;width:33%;background:#161823">
<a href="https://apify.com/parsebird/tiktok-ads-scraper" style="color:#FFFFFF;text-decoration:none;font-weight:700;font-size:13px">TikTok Ads Scraper</a><br>
<span style="color:#25F4EE;font-size:11px;font-weight:600">You are here</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/tiktok-live-search-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">TikTok Live Search Scraper</a><br>
<span style="color:#78716C;font-size:11px">LIVE rooms broadcasting now</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;border-radius:0 0 0 4px;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/tiktok-shop-reviews-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">TikTok Shop Reviews Scraper</a><br>
<span style="color:#78716C;font-size:11px">Product reviews and ratings</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/tiktok-story-viewer" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">TikTok Story Viewer</a><br>
<span style="color:#78716C;font-size:11px">Active stories, no-watermark video</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;border-radius:0 0 4px 0;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/tiktok-slideshow-downloader" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">TikTok Slideshow Downloader</a><br>
<span style="color:#78716C;font-size:11px">Photo-mode posts as image files</span>
</td>
</tr>
</table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```text
Use Apify Actor parsebird/tiktok-ads-scraper to scrape TikTok Creative Center Top Ads (best-performing TikTok ads). Example with ApifyClient (Python): client.actor("parsebird/tiktok-ads-scraper").call(run_input={"country":"US","period":"30","objective":"Conversions","orderBy":"CTR","maxResults":50}). Inputs (all optional): country string two-letter market code such as US, GB, DE, JP, BR (empty = all markets); period string "7" | "30" | "180" (default "7"); industry string, one of Apparel & Accessories, Apps, Appliances, "Baby, Kids & Maternity", Beauty & Personal Care, Business Services, E-Commerce (Non-app), Education, Financial Services, Food & Beverage, Games, Health, Home Improvement, Household Products, Life Services, News & Entertainment, Pets, Sports & Outdoor, Tech & Electronics, Travel, Vehicle & Transportation; objective string, one of Traffic, App Installs, Conversions, Video Views, Reach, Lead Generation, Product Sales; adFormat "Spark Ads" | "Non-Spark Ads"; keyword string (all words must appear as whole words in the ad copy or brand name); orderBy "For You" | "Likes" | "CTR" | "Impressions" | "CVR" | "2s View Rate" | "6s View Rate" (default For You); maxResults integer 1-500 (default 50); responseFormat "detailed" (default) | "concise". Output: one row per ad with ad_id, ad_title, brand_name, likes, ctr (percentile rank, 0.06 = top 6%), ctr_tier ("Top 6%"), budget (Low/Medium/High), is_spark_ad, industry, objective, market, period_days, video_duration_seconds, video_url, cover_url, source_url, scraped_at; detailed adds industry_group, objectives[], ad_format, cost_tier (0-2), comments, shares, countries[], landing_page, ad_source, keywords[], tags[], video_url_hd, video_width, video_height, video_id. TikTok media links expire after a while. API docs: https://docs.apify.com/api/client/python/ and https://docs.apify.com/api/client/js/. Token: https://console.apify.com/account/integrations.
```

### What is TikTok Ads Scraper?

**TikTok Ads Scraper** is a **TikTok Creative Center API** alternative for the **Top Ads** library. TikTok ranks the ads that performed best on its platform by market, industry, objective, and time window. This actor turns that library into **structured TikTok ad data**: ad copy, brand, likes, CTR rank, budget level, objective, industry, landing page, and downloadable video and cover links.

You don't need a TikTok account, cookies, or an API key. The easiest way to try it is to open the actor, keep the prefilled **US, last 30 days, 20 ads** input, and click **Start**. A run like that takes about 15 seconds.

TikTok Ads Scraper covers the Creative Center **Top Ads** library only. It is not a full TikTok Ad Library (all ads by one advertiser) scraper, and it does not collect regular TikTok videos.

### What can TikTok Ads Scraper do?

- 🏆 **Scrape TikTok Top Ads** ranked by TikTok Creative Center for the last 7, 30, or 180 days.
- 🌍 **Filter by market**: US, GB, DE, FR, JP, BR, and other markets, or all markets at once.
- 🎯 **Filter by campaign setup**: 21 industries, 7 campaign objectives, and Spark Ads or Non-Spark Ads.
- 📊 **Sort the way Creative Center does**: For You, Likes, CTR, Impressions (reach), CVR, 2-second view rate, or 6-second view rate.
- 🔎 **Find ads by keyword** in the ad copy or brand name.
- 🎬 **Get creative files**: video links (up to 1080p when TikTok has it), cover image, duration, and size.
- 🔗 **See where ads send traffic**: landing page URL, all markets the ad ran in, comments, and shares (detailed mode).
- ⏱️ **Monitor ad trends** with [Apify schedules](https://docs.apify.com/platform/schedules), for example a weekly run per market.
- 🔌 **Integrate** with the [Apify API](https://docs.apify.com/api/v2), webhooks, and [integrations](https://apify.com/integrations) such as Google Sheets, Make, Zapier, and Slack.
- 📁 **Export** as JSON, CSV, Excel, HTML, or XML.

### What data can you extract from TikTok Creative Center?

| Field | Description |
|-------|-------------|
| `ad_title` | The ad's copy (caption) |
| `brand_name` | The advertiser's brand, when Creative Center shows one |
| `likes` | Likes on the ad video |
| `ctr`, `ctr_tier` | CTR percentile rank from Creative Center; `0.06` / `Top 6%` means the ad's click-through rate is in the top 6% |
| `budget`, `cost_tier` | Creative Center's budget level: Low (0), Medium (1), or High (2) |
| `objective`, `objectives` | Campaign objective, such as Conversions, Traffic, or Reach |
| `industry`, `industry_group` | Specific industry (such as Skincare) and its top-level group (such as Beauty & Personal Care) |
| `is_spark_ad`, `ad_format` | Whether the ad is a Spark Ad (a boosted post from a TikTok account) |
| `landing_page` | Where the ad sends clicks, when TikTok shows it |
| `countries` | Markets the ad ran in, as listed on its Creative Center page |
| `comments`, `shares` | Comments and shares on the ad |
| `video_url`, `video_url_hd`, `cover_url` | Links to the video (720p and highest available) and cover image; TikTok media links expire after a while |
| `video_duration_seconds`, `video_width`, `video_height` | Creative length and size |
| `market`, `period_days`, `source_url` | Where and over what window the ad was ranked, and its Creative Center page |

### How to scrape TikTok Top Ads

1. Open [TikTok Ads Scraper](https://apify.com/parsebird/tiktok-ads-scraper) and click **Try for free** or **Start**.
2. In **Country**, enter a two-letter market such as `US`, `GB`, or `DE`. Leave it empty for all markets.
3. Choose a **Period**: last 7, 30, or 180 days.
4. Optionally pick an **Industry**, **Campaign objective**, **Ad format**, or type a **Keyword**.
5. Choose **Sort by** and set **Max ads** (1 to 500).
6. Pick **Detailed** for landing pages, markets, comments, and HD video, or **Concise** for the core fields only.
7. Click **Start**, then open the **Output** tab or export the ads as JSON, CSV, or Excel.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `country` | string | No | empty (all markets) | Two-letter market code, such as `US`, `GB`, or `DE`. The form pre-fills `US`. |
| `period` | string | No | `7` | Time window in days: `7`, `30`, or `180`. |
| `industry` | string | No | all | One of 21 Creative Center industries, such as `Beauty & Personal Care`, `Games`, or `E-Commerce (Non-app)`. |
| `objective` | string | No | all | `Traffic`, `App Installs`, `Conversions`, `Video Views`, `Reach`, `Lead Generation`, or `Product Sales`. |
| `adFormat` | string | No | both | `Spark Ads` or `Non-Spark Ads`. |
| `keyword` | string | No | — | Keeps ads whose copy or brand name contains all of these words (whole words, any order). |
| `orderBy` | string | No | `For You` | `For You`, `Likes`, `CTR`, `Impressions`, `CVR`, `2s View Rate`, or `6s View Rate`. |
| `maxResults` | integer | No | 50 | Ads to return, from 1 to 500. The form pre-fills 20. |
| `responseFormat` | string | No | `detailed` | `detailed` or `concise`. |
| `proxyConfiguration` | object | No | no proxy | Network settings. If TikTok blocks a request, the actor switches to Apify Proxy on its own. |

### Input / Output

Example input, top conversion ads in the US over 30 days sorted by CTR:

```json
{
  "country": "US",
  "period": "30",
  "objective": "Conversions",
  "orderBy": "CTR",
  "maxResults": 50
}
```

A real output row from that input (`detailed` format; long video and cover links are shortened):

```json
{
  "ad_id": "7679096403545178120",
  "brand_name": "",
  "ad_title": "Experience an adventure that will live in your heart forever. See Disney’s THE LION KING.",
  "likes": 310,
  "ctr_tier": "Top 7%",
  "ctr": 0.07,
  "budget": "Medium",
  "is_spark_ad": true,
  "industry": "Live Events",
  "objective": "Conversions",
  "market": "US",
  "period_days": 30,
  "video_duration_seconds": 30.016,
  "video_url": "https://v16m-default.tiktokcdn.com/4154fdb918f243dce92ce4277aee30e4/...",
  "cover_url": "https://p19-common-sign.tiktokcdn.com/tos-alisg-p-0051c001-sg/...",
  "industry_group": "News & Entertainment",
  "objectives": ["Conversions", "Traffic"],
  "ad_format": "Spark Ads",
  "cost_tier": 1,
  "comments": 1,
  "shares": 5,
  "countries": ["US", "JP", "BR", "PH", "CL", "CA", "ES", "ID", "MX", "KR", "FR", "AR", "IT"],
  "landing_page": "https://lionking.com/tickets/?utm_source=tiktok&utm_medium=paid&utm_campaign=tlk-30-tv-spot",
  "ad_source": "TikTok Ads Manager",
  "keywords": [],
  "tags": [],
  "video_url_hd": "https://v16m-default.tiktokcdn.com/aafc3d343c2c9eef4f96324649fe880f/...",
  "video_width": 720,
  "video_height": 1280,
  "video_id": "v14033g50000da8qkmvog65nf8mb88ag",
  "source_url": "https://ads.tiktok.com/business/creativecenter/topads/7679096403545178120/pc/en?period=30&countryCode=US",
  "scraped_at": "2026-09-30T12:05:17.040Z"
}
```

With `"responseFormat": "concise"`, each row stops at `cover_url` and adds `source_url` and `scraped_at`. Download results in JSON, CSV, Excel, HTML, or XML.

### Python API example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("parsebird/tiktok-ads-scraper").call(run_input={
    "country": "GB",
    "period": "30",
    "industry": "Beauty & Personal Care",
    "orderBy": "Likes",
    "maxResults": 30,
})

for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad["likes"], ad["ctr_tier"], ad["objective"], ad["ad_title"][:60])
```

### JavaScript API example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('parsebird/tiktok-ads-scraper').call({
    country: 'US',
    period: '7',
    adFormat: 'Spark Ads',
    maxResults: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
const landingPages = items.filter((ad) => ad.landing_page).map((ad) => ad.landing_page);
console.log(`${items.length} ads, ${landingPages.length} with a landing page`);
```

See the [Python client](https://docs.apify.com/api/client/python/) and [JavaScript client](https://docs.apify.com/api/client/js/) docs for more options.

### Use cases

- **Creative research**: collect winning TikTok ad hooks, captions, and video lengths in your industry.
- **Competitor ad monitoring**: track which brands and landing pages appear in Top Ads for your market each week.
- **Media buying benchmarks**: compare CTR rank and budget level by objective, industry, or market.
- **Agency pitch decks**: pull top ads for a client's industry with cover images and video links.
- **Ad creative datasets**: build a library of top-performing ad videos and copy for analysis or AI training.

### How it works

1. The actor asks TikTok Creative Center for Top Ads that match your market, period, industry, objective, ad format, and sort order.
2. Creative Center shows only 20 ads per list to visitors who are not logged in. To return more, the actor also queries narrower slices of the same filters (by ad format, objective, industry, and sort order) and removes duplicates.
3. If you set a keyword, it keeps ads whose copy or brand name contains every word.
4. If TikTok blocks a request, the actor retries through Apify Proxy automatically.
5. In detailed mode, it opens each ad's Creative Center detail record for landing page, markets, comments, and shares, then saves one row per ad.

### How much does it cost to scrape TikTok ads?

**What is the price per TikTok ad?**

The actor uses pay-per-event pricing: you pay per ad saved, and platform usage is included.

| Event | Free plan | Bronze | Silver | Gold |
|-------|-----------|--------|--------|------|
| `ad-scraped` | $0.00179 (**$1.79 / 1,000**) | $0.00159 (**$1.59 / 1,000**) | $0.00139 (**$1.39 / 1,000**) | $0.00119 (**$1.19 / 1,000**) |

One `ad-scraped` event is one ad saved to the dataset. The prefilled 20-ad test costs about $0.04 on the Free plan, and 500 ads cost $0.90. Runs that find no ads are not charged for results. Apify's free plan includes monthly platform credits you can use to try the actor.

### Is it legal to scrape TikTok Creative Center?

**Is scraping TikTok ads data legal?**

The actor reads only the Top Ads data that TikTok Creative Center shows publicly to visitors who are not logged in. Scraping public data is generally legal in many jurisdictions, but ad videos and copy are protected by copyright, so don't republish creatives as your own. Respect [TikTok's Terms of Service](https://www.tiktok.com/legal/page/us/terms-of-service/en) and consult your lawyer if unsure. Read more in Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### Other TikTok scrapers and related Actors

| Actor | Best for |
|-------|----------|
| [TikTok Live Search Scraper](https://apify.com/parsebird/tiktok-live-search-scraper) | TikTok LIVE rooms broadcasting now, with viewers and stream URLs |
| [TikTok Shop Reviews Scraper](https://apify.com/parsebird/tiktok-shop-reviews-scraper) | TikTok Shop product reviews and ratings |
| [TikTok Story Viewer](https://apify.com/parsebird/tiktok-story-viewer) | Active TikTok stories with no-watermark video links |
| [TikTok Slideshow Downloader](https://apify.com/parsebird/tiktok-slideshow-downloader) | Saving every photo from TikTok photo-mode posts |

### FAQ

**How many ads can I get per run?**
Up to 500. Creative Center reports how many Top Ads match your filters (for example about 130 for the US over 30 days, and up to a few hundred for all markets over 180 days). Narrow filters, such as one industry in one market over 7 days, can have only a handful of ads. The run log and status message tell you when Creative Center had fewer ads than you asked for.

**What does `ctr` mean? Is it the real click-through rate?**
No. Creative Center publishes a CTR percentile rank, not the raw rate. `ctr: 0.06` is shown on Creative Center as "Top 6%", so lower values are better. Sorting by `CTR` puts the best-ranked ads first.

**What is `budget` / `cost_tier`?**
Creative Center's budget level for the ad (the money spent running the ad video): Low (0), Medium (1), or High (2). TikTok does not publish exact spend.

**How does the keyword filter work?**
TikTok Creative Center only runs keyword search for logged-in users. The actor instead collects Top Ads for your other filters and keeps ads whose copy or brand name contains all of your keyword's words as whole words, in any order and ignoring case. For example, `free` matches "Free shipping" but not "FreeStyle". A multi-word keyword also matches its hashtag form, so `skincare routine` matches `#skincareroutine`. Broad filters (all markets, 180 days) give a keyword more ads to match.

**Why is `is_spark_ad` null for some ads?**
Creative Center doesn't list the format on each ad. The actor works it out from Spark and Non-Spark filtered lists, and leaves `null` when an ad doesn't appear in either list.

**Why do video links stop working?**
TikTok's media links are signed and expire after a while. Download the videos soon after the run, or run the actor again for fresh links.

**Which countries are supported?**
The Creative Center Top Ads filter lists 28 markets, including US, GB, DE, FR, IT, ES, NL, SE, CA, MX, BR, AU, JP, KR, ID, TH, VN, and AE. Other codes, such as PE, also returned ads in our tests. Codes Creative Center doesn't cover return no ads.

**Can I schedule runs or use the API?**
Yes. Use [Apify schedules](https://docs.apify.com/platform/schedules) for recurring runs, and the **API** tab on the actor page for endpoints and client code.

**Where can I report issues?**
Open the **Issues** tab on the actor page with your input and run ID.

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/tiktok-ads-scraper/changelog.md

# Actor input Schema

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

Enter a two-letter market code such as US, GB, DE, JP or BR. Leave empty to search all markets.

## `period` (type: `string`):

Choose the time window the ads are ranked over.

## `industry` (type: `string`):

Keep only ads from one industry. Leave empty for all industries.

## `objective` (type: `string`):

Keep only ads that ran with this campaign objective. Leave empty for all objectives.

## `adFormat` (type: `string`):

Spark Ads are boosted posts from a real TikTok account. Leave empty for both.

## `keyword` (type: `string`):

Keep only ads whose ad copy or brand name contains all of these words (whole words, any order, case-insensitive). Leave empty to keep every ad.

## `orderBy` (type: `string`):

Choose how Creative Center ranks the ads.

## `maxResults` (type: `integer`):

Save at most this many ads (1 to 500). Creative Center may have fewer ads for narrow filters.

## `responseFormat` (type: `string`):

Detailed adds landing page, comments, shares, all markets, ad format, tags, HD video and size for every ad. Concise returns the core fields only and finishes faster.

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

No proxy is needed for most runs. If TikTok blocks a request, the actor switches to Apify Proxy on its own. Set a proxy here only if you want to control it yourself.

## Actor input object example

```json
{
  "country": "US",
  "period": "30",
  "orderBy": "For You",
  "maxResults": 20,
  "responseFormat": "detailed",
  "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 = {
    "country": "US",
    "period": "30",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "country": "US",
    "period": "30",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/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 '{
  "country": "US",
  "period": "30",
  "maxResults": 20
}' |
apify call parsebird/tiktok-ads-scraper --silent --output-dataset

```

## MCP server setup

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