# TikTok Ads Library Scraper: Top Ads & CTR, from $0.69/1K (`laptime/tiktok-ads-library-scraper`) Actor

$0.69/1K ads, no start fee. No login. TikTok's top-performing ads from the Creative Center Top Ads library by country, period, industry or brand keyword: CTR rank, likes, budget level, objective, video and cover links, landing page. Paste ad links too.

- **URL**: https://apify.com/laptime/tiktok-ads-library-scraper.md
- **Developed by:** [Laptime](https://apify.com/laptime) (community)
- **Categories:** Social media, Agents
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.45 / 1,000 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/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

<p><strong>From Laptime.</strong> We benchmark our scrapers on Apify and date the results.</p>

> **Update, 30 November 2026:** first version: TikTok's top ads by country, period, sort order, industry or keyword, with landing pages, countries, comments and shares on request.

### Why choose TikTok Ads Library Scraper?

<ul>
<li><strong>TikTok's top-performing ads, in seconds.</strong> The 20 top ads of the United States for the last 30 days took about 9 seconds on Apify on 30 Nov 2026, start-up included.</li>
<li><strong>Every ad comes with the numbers that say why it works.</strong> CTR rank, likes, budget level, objective and industry on every row, and with ad details the landing page, every country the ad ran in, comments and shares.</li>
<li><strong>You pay for ads, not runs.</strong> 1,000 ads cost $0.69, with no start fee and no platform usage on top. Ads your filters leave out, and a monitor run that finds nothing new, cost $0.</li>
</ul>

### Try it with one country

[![How to use TikTok Ads Library Scraper without coding: 1. Try for free 2. Keep the country + Start 3. Top ads with CTR and video 4. Export the Overview view to Excel](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-tiktok-ads-library-scraper-steps.jpg?v=77ed18bb)](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-tiktok-ads-library-scraper-steps.jpg?v=77ed18bb)

No code needed: click **Try for free**, keep the example input, click **Start**, then export to Excel. Or paste this into the **JSON** tab of the input:

```json
{
  "countries": ["US"],
  "period": "30",
  "sortBy": "for_you",
  "maxItems": 20
}
```

That's the top ads TikTok shows for the United States over the last 30 days, each with its ad text, advertiser, objective, industry, likes, CTR rank, budget level, cover image and video link. Pick other countries, a period of 7 or 180 days, another sort order, an industry or a brand or product keyword to change the list.

**Apify free plan:** the $5 of monthly credit covers about 7,000 ads with this Actor. No card needed.

### Pick the right ad library tool

#### Using an AI assistant?

Paste this into ChatGPT, Claude, Cursor or any AI agent, then say what you want. It gives the assistant what it needs to run this Actor with your Apify account: inputs, examples, prices and a check of the results.

```text
Help me get data with the Apify Actor laptime/tiktok-ads-library-scraper ("TikTok Ads Library Scraper" by Laptime). $0.69/1K ads, no start fee. No login. TikTok's top-performing ads from the Creative Center Top Ads library by country, period, industry or brand keyword: CTR rank, likes, budget level, objective, video and cover links, landing page. Paste ad links too. Full docs (every input field, pricing): https://apify.com/laptime/tiktok-ads-library-scraper.md; the essentials are below. If I have not said what I want yet, ask me in one question. Before the first run, show me the input and the estimated cost.
Run it: with Apify MCP tools (https://mcp.apify.com), call-actor "laptime/tiktok-ads-library-scraper" with the input, then get-dataset-items with the run's dataset ID. Otherwise, with my Apify token (https://console.apify.com/settings/integrations; keep it in an environment variable, not in a URL or file): POST https://api.apify.com/v2/acts/laptime~tiktok-ads-library-scraper/run-sync-get-dataset-items, header "Authorization: Bearer $APIFY_TOKEN", JSON body = the input; it returns the rows as a JSON array and waits up to 300 s (longer runs: POST /v2/acts/laptime~tiktok-ads-library-scraper/runs, poll the run, then GET /v2/datasets/{defaultDatasetId}/items). No token yet: a free Apify account includes $5 of usage a month, no card.
Input (JSON; other fields in the docs): countries (default ["US"]): Two-letter codes, one search per country. TikTok's Top Ads covers 28 markets: US, GB, CA, AU, DE, FR, IT, ES, NL, SE, RO, TR, AE, SA, ZA, MX, BR, AR, CO, JP, KR, ID…; period (one of 7|30|180): Top ads of the last 7, 30 or 180 days. Default: 30 days; sortBy (one of for_you|like|ctr|impression|cvr|play_6s_rate|play_2s_rate): for_you (default) = TikTok's own mix; like = most likes; ctr = best CTR; impression = most reach; cvr = best conversion rate; play_6s_rate or play_2s_rate = best 6- or…; keywords: Each keyword is its own search in the Top Ads library of each country, as in the site's search box (e.g. "shoes", "skincare", "Temu"); industries: Optional industry ids, one search per industry; maxItems (default 20): Hard cap on ads delivered (and charged) by the whole run; includeDetails (default false): Opens each ad's page for the landing page link and domain, every country the ad ran in, comments, shares and the 720p video; onlyNew (default false): Skip ads this monitor delivered in earlier runs, so a scheduled run returns only new top ads; monitorName: Names the "Only new ads" memory. Runs with the same name share it; aiAnalysis (default false): Adds per ad: ad category, offer type, hook, hook type, persuasion angle, offer, target audience, funnel stage, tone, product category, language and a one-line summary….
Example (the input the Store form opens with): {"countries":["US"],"period":"30","sortBy":"for_you","maxItems":20}
Example (best-CTR TikTok ads in beauty, last 30 days): {"countries":["US"],"period":"30","sortBy":"ctr","industries":["14000000000"],"includeDetails":true,"maxItems":40}
Example (tikTok ad swipe file for a product keyword): {"countries":["US","GB","DE"],"period":"180","sortBy":"like","keywords":["skincare"],"includeDetails":true,"aiAnalysis":true,"maxItems":60}
Cost: pay per result, no start fee (Free-plan prices; paid Apify plans pay less): Ad $0.69 per 1,000, Ad details $0.50 per 1,000, AI creative analysis $1.50 per 1,000. To cap a run's charge, add ?maxTotalChargeUsd=<dollars> to the API URL (MCP: callOptions.maxTotalChargeUsd).
Output: Main fields: coverUrl, advertiserName, body, objective, industry, likes, ctrTopPercent, budgetLevel, videoDurationSec, searchCountry, videoUrl, url.
After the run: tell me how many rows came back and what they cost, then show the first 5 rows as a table (coverUrl, advertiserName, body, objective, industry, likes). If nothing came back, read the run's statusMessage (API: GET /v2/acts/laptime~tiktok-ads-library-scraper/runs/last; MCP: get-actor-run) and suggest one change to the input.
```

### What can TikTok Ads Library Scraper do?

- **Read TikTok's Top Ads library.** The Creative Center's top-performing auction ads in 28 markets, from the last 7, 30 or 180 days. No TikTok account, cookies or API key.
- **Rank them your way.** Sort by TikTok's own mix, likes, CTR, reach, conversion rate or 2- and 6-second view rate, and narrow to any of TikTok's industries.
- **Search by brand or product.** Type a keyword such as "skincare" or "Temu" and get the top ads that match it in each country you pick.
- **Get more than one page.** TikTok shows a logged-out visitor 20 top ads per search, so a bigger Max ads also reads the other sort orders and industries, without duplicates.
- **Open every ad.** **Include ad details** adds the landing page and its domain, every country the ad ran in, comments, shares, keywords and the 720p video.
- **Look up ads you already have.** Paste Creative Center ad links or IDs for one full row each.
- **Keep only what you need.** Filter by campaign objective or minimum likes; ads left out are free.
- **Monitor new top ads.** **Only new ads** remembers what earlier runs delivered, so a weekly schedule returns only new ads.
- **Label the creatives with AI.** Optional: ad category, offer type, hook, angle, offer, audience, funnel stage, tone and a summary per ad, plus your own questions.

### How to scrape the TikTok ads library

Paste one of these into the **JSON** tab of the input, or send it through the API.

#### Find the best-CTR ads in your industry

```json
{
  "countries": ["US"],
  "period": "30",
  "sortBy": "ctr",
  "industries": ["14000000000"],
  "includeDetails": true,
  "maxItems": 40
}
```

The top beauty and personal care ads in the US over the last 30 days, best click-through rate first, with landing pages. 40 ads with details cost about $0.05.

#### Build a swipe file for a product keyword

```json
{
  "countries": ["US", "GB", "DE"],
  "period": "180",
  "sortBy": "like",
  "keywords": ["skincare"],
  "maxItems": 60
}
```

Top ads that match "skincare" in three countries over the last 180 days, most liked first. 60 ads cost about $0.04.

#### Get every top ad you can for one market

```json
{
  "countries": ["DE"],
  "period": "180",
  "maxItems": 300
}
```

Reads each sort order and each industry for Germany and delivers each ad once. A run stops early when TikTok has no more new ads to show.

#### Monitor new top ads every week

```json
{
  "countries": ["US"],
  "period": "7",
  "sortBy": "impression",
  "onlyNew": true,
  "monitorName": "tiktok-us-weekly",
  "maxItems": 100
}
```

Schedule it weekly: each run returns only ads no earlier run delivered, and a week with nothing new costs nothing.

#### Look up ads by link or ID

```json
{
  "adUrls": [
    "https://ads.tiktok.com/business/creativecenter/topads/7634600921591185426/pc/en",
    "7496437480721448976"
  ]
}
```

One full row per ad, landing page and countries included, over plain HTTP in a few seconds.

### Input parameters

Nothing is required: without input the Actor reads the top ads of the United States for the last 30 days. Max ads is per run.

| Parameter | Type | Default | What it does |
|---|---|---|---|
| `countries` | array | `["US"]` | Country codes (28 Top Ads markets), one search each; `ALL` = one search across all of them |
| `period` | string | `"30"` | `7`, `30` or `180` days |
| `sortBy` | string | `"for_you"` | `for_you`, `like`, `ctr`, `impression`, `cvr`, `play_6s_rate` or `play_2s_rate` |
| `keywords` | array | none | Brand or product keywords, one search each per country |
| `industries` | array | none | Industry IDs or names (e.g. `14000000000` or `Beauty & Personal Care`); a sub-industry such as `Haircare` keeps only its own ads |
| `adUrls` | array | none | Creative Center ad links or IDs, one row each (a separate list, not a filter) |
| `objectives` | array | none | Keep only these campaign objectives (free filter) |
| `minLikes` | integer | none | Keep only ads with at least this many likes (free filter) |
| `maxItems` | integer | `20` | Hard cap on ads delivered and charged by the run |
| `includeDetails` | boolean | `false` | Landing page, countries, comments, shares, keywords and 720p video per ad |
| `onlyNew` | boolean | `false` | Skip ads earlier runs of this monitor delivered |
| `monitorName` | string | none | Names the only-new memory; runs with the same name share it |
| `aiAnalysis` | boolean | `false` | AI creative analysis per ad |
| `aiCustomLabels` | array | none | Your own AI questions, as `name: question` |
| `aiContext` | string | none | Context for the AI |
| `aiApiKey`, `aiModel` | string | none | Your own LLM key and model (then AI is not charged) |
| `telemetry` | boolean | `true` | Anonymous error reports (what is sent: see the FAQ) |

Input names from other TikTok ads scrapers work as they are: `countryCode`, `country`, `countryCodes`, `region`, `regions`, `dashboard_region`, `topAdsCountries`, `days`, `periodDays`, `dashboard_period`, `topAdsPeriod`, `orderBy`, `sort_by`, `dashboard_sort_by`, `topAdsSortBy`, `industry`, `industryNames`, `dashboard_industry`, `topAdsIndustries`, `objective`, `objectiveNames`, `dashboard_objective`, `keyword`, `search_query`, `dashboard_search`, `topAdsKeyword`, `searchTerms`, `query`, `adIds`, `startUrls` (Top Ads links), `maxResults`, `maxAds`, `limit`, `resultsLimit`, `extractDetails`, `fetchAdDetails`, `includeAdDetails`, `enrichDetails`, `onlyNewAds`.

### Output

One row per ad, 38 fields (plus AI fields when AI is on), in three views: Overview, Ad details and AI analysis.

[![TikTok Ads Library Scraper output: one row per ad with cover, advertiser, ad text, objective, industry, likes, CTR rank, budget and video link](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-tiktok-ads-library-scraper-output.jpg?v=933ac283)](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-tiktok-ads-library-scraper-output.jpg?v=933ac283)

*The Overview view of the example input (United States, last 30 days), run on Apify on 30 Nov 2026.*

| Group | Fields |
|---|---|
| Ad | `adId`, `url`, `advertiserName`, `body`, `industry`, `parentIndustry`, `objective`, `rank` |
| Performance | `likes`, `ctrTopPercent`, `budgetLevel`, `comments`, `shares` |
| Media | `videoUrl`, `videoUrls`, `coverUrl`, `videoDurationSec`, `videoWidth`, `videoHeight`, `videoId` |
| Ad details | `linkUrl`, `linkDomain`, `targetedOrReachedCountries`, `adKeywords`, `hasVoiceOver`, `detailsStatus` |
| Search | `source`, `searchCountry`, `searchPeriodDays`, `searchSortBy`, `searchIndustry`, `searchKeyword`, `searchTotalResults`, `scrapedAt` |
| AI (optional) | `aiAdCategory`, `aiOfferType`, `aiHook`, `aiHookType`, `aiAngle`, `aiOffer`, `aiTargetAudience`, `aiFunnelStage`, `aiTone`, `aiSummary`, `aiLabels` |

`ctrTopPercent` is TikTok's CTR rank: 11 means the ad is in the top 11% by click-through rate, so lower is better. TikTok's video and cover links expire within about a day: download what you want to keep.

#### Example ad (shortened)

```json
{
  "adId": "7556957745536385041",
  "url": "https://ads.tiktok.com/business/creativecenter/topads/7556957745536385041/pc/en?countryCode=US&period=30",
  "advertiserName": "the beard club",
  "body": "Does your beard need help?🧔‍♂️❓ Save 35% off sitewide with code 35PBF during our Pre Black Friday Sale!",
  "industry": "Beauty & Personal Care",
  "objective": "Conversions",
  "likes": 28,
  "ctrTopPercent": 48,
  "budgetLevel": "Medium",
  "videoDurationSec": 40.5,
  "videoUrl": "https://v16m-default.tiktokcdn.com/149f71a52bbe0a1d3e940b6a2...",
  "coverUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-p-0068c799-...",
  "linkUrl": "https://thebeardclub.com/collections/tt-video-ugc-growth-kits",
  "linkDomain": "thebeardclub.com",
  "targetedOrReachedCountries": ["US"],
  "rank": 16,
  "detailsStatus": "ok",
  "searchCountry": "US",
  "searchPeriodDays": 30,
  "searchSortBy": "for_you",
  "searchTotalResults": 183
}
```

#### Export to Excel or CSV

Open the run's **Export** button and pick a view before you download: the dialog starts on **All fields**, which spreads every video resolution over its own column. **Overview** gives one readable line per ad with its cover and video link. Choose JSON when you want every video resolution and country list as arrays.

### Benchmarks

Measured on Apify. Time is the run's total time as Apify reports it, start-up included.

| Task | TikTok Ads Library Scraper | Date |
|---|---|---|
| The example input: 20 top ads, United States, 30 days | **8.9 s** (median of 6 runs) | 30 Nov 2026 |
| 300 ads, United States, 180 days (19 searches) | **53 s** | 30 Nov 2026 |
| 50 ads with ad details (landing page, countries) | **33 s** | 30 Nov 2026 |
| "skincare" in the US, UK and Germany, 180 days, with ad details | **34 s** for 27 ads | 30 Nov 2026 |
| 2 ads by link | **5.5 s** | 30 Nov 2026 |
| Ads with details found, of 50 asked for | **50** | 30 Nov 2026 |

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

Pay per event. There is no start fee and empty runs are free.

| Event | Price |
|---|---|
| Ad | $0.69 per 1,000 ads |
| Ad details (landing page, countries, comments, shares) | $0.50 per 1,000 ads |
| AI creative analysis (optional) | $1.50 per 1,000 ads |

| Job | Cost |
|---|---|
| The example input (20 ads) | $0.014 |
| 100 ads with details | $0.12 |
| 1,000 ads | $0.69 |

Never charged: ads your filters leave out, duplicates, ads an earlier monitor run delivered, ad details TikTok has no page for, and runs that return nothing. Set **Max ads**, or a maximum cost per run in the run options, to cap a run.

### Integrations

Save your input as a task, schedule it, and send the rows to Google Sheets, Make, n8n, Zapier or Slack. New to schedules? Apify's one-minute video shows how:

https://www.youtube.com/watch?v=1jI7WcVQmwM

- **Slack, Discord or any webhook:** an Apify integration posts when a scheduled monitor run finishes, with a link to its new ads.
- **Google Sheets:** `=IMPORTDATA("https://api.apify.com/v2/actor-tasks/<TASK_ID>/runs/last/dataset/items?format=csv&view=overview&status=SUCCEEDED&token=<API_TOKEN>")` loads the last run. Anyone who can open the sheet sees the token, so use it only in private sheets.
- **n8n, Make, Zapier:** the Apify node or app, "Run an Actor and get dataset", Actor `laptime/tiktok-ads-library-scraper`.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("laptime/tiktok-ads-library-scraper").call(run_input={
    "countries": ["US"],
    "sortBy": "ctr",
    "keywords": ["skincare"],
    "maxItems": 40,
})
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad["ctrTopPercent"], ad["likes"], ad["body"], ad["videoUrl"])
```

#### One HTTP call

```bash
curl -X POST "https://api.apify.com/v2/acts/laptime~tiktok-ads-library-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"countries": ["GB"], "period": "7", "sortBy": "like", "maxItems": 20}'
```

#### Claude, ChatGPT, Cursor and other MCP clients

Add `https://mcp.apify.com?tools=laptime/tiktok-ads-library-scraper` as a remote MCP server, then ask: "Which skincare ads had the best CTR on TikTok in the UK over the last 30 days? Show their hooks and landing pages."

Notes for agents: `maxItems` caps the run; countries are two-letter codes from the 28 Top Ads markets; a logged-out search shows up to 20 ads, so a Max ads above 20 reads more searches; cost ≈ ads × $0.00069 (+ $0.0005 per ad with details).

### Switch from another TikTok ads scraper

Change only the Actor ID: the input names in the table above are read as other TikTok Top Ads scrapers use them (codebyte, azzouzana, datapeak, doliz, fetch_cat, khadinakbar, hyperbach, memo23), and theirs win over ours when both are set. Output field names follow our Facebook Ad Library Scraper where they mean the same thing (`body`, `linkUrl`, `videoUrls`, `targetedOrReachedCountries`), so one pipeline can read both.

### FAQ

#### Do I need a TikTok account, cookies or an API key?

No. It reads the public Creative Center Top Ads library logged out.

#### Why do I get 20 ads per search?

TikTok shows a logged-out visitor the first 20 top ads of each search and asks to log in for more. With a Max ads above 20 the Actor reads the same search in other sort orders and industries and delivers each ad once, so a run of a few hundred ads per country is possible. Small markets and short periods hold fewer top ads in total; the status message says when TikTok had no more.

#### Does it read TikTok's EU Ad Library (library.tiktok.com)?

No. Since late November 2026 TikTok shows a CAPTCHA to every logged-out search of library.tiktok.com (we checked 25 searches from Apify on 30 Nov 2026), and this Actor does not solve CAPTCHAs. It reads the Creative Center Top Ads library, which includes performance numbers the Ad Library doesn't have. An Ad Library link in the input gets a clear note, and nothing is charged.

#### Is it reliable?

Each search is retried on the worker's own connection and then on fresh datacenter IPs, and ad pages switch IPs on any error. A run that finds nothing because of the input ends successfully with the reason; nothing is charged for it.

#### Does it send any data back?

When a run hits an error, the Actor sends us a small anonymous report (the error type, which step failed, the HTTP status and a few counts) so we can fix breakages before you notice them. It never includes your input, your results, URLs, your Apify account or your IP address. To turn it off, untick **Anonymous error reports** in the input (or set `"telemetry": false`).

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

TikTok publishes the Top Ads library for anyone to browse without a login, and this Actor reads only that public data. Ad texts can name creators, so GDPR and similar laws may apply to how you store and use the data. Use it in line with your local law and TikTok's terms; when in doubt, ask a lawyer. Apify's overview: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### More Laptime scrapers

- [Facebook Ad Library Scraper](https://apify.com/laptime/facebook-ad-library-scraper): every Meta ad of a brand or keyword, with EU reach and targeting.
- [Google Ads Transparency Scraper](https://apify.com/laptime/google-ads-transparency-scraper): every Google ad of a company, with ad text and YouTube links.
- [TikTok Transcript Scraper](https://apify.com/laptime/tiktok-transcript-scraper): the words spoken in TikTok videos.

### Support

Found a bug, or missing a field? Open an issue and we'll answer within a day. Fixes and new fields are listed on the **Changelog** tab.

If it saved you time, a short review on the Actor page helps other people find it.

*Unofficial. Not affiliated with, endorsed by or sponsored by TikTok or ByteDance Ltd. TikTok is a trademark of ByteDance Ltd.*

# Changelog

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

# Actor input Schema

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

Two-letter codes, one search per country. TikTok's Top Ads covers 28 markets: US, GB, CA, AU, DE, FR, IT, ES, NL, SE, RO, TR, AE, SA, ZA, MX, BR, AR, CO, JP, KR, ID, MY, PH, SG, TH, VN, PK. ALL = one search across all of them. Default: \["US"].

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

Top ads of the last 7, 30 or 180 days. Default: 30 days.

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

for_you (default) = TikTok's own mix; like = most likes; ctr = best CTR; impression = most reach; cvr = best conversion rate; play_6s_rate or play_2s_rate = best 6- or 2-second view rate. With more than 20 ads wanted, the other orders are read too.

## `keywords` (type: `array`):

Optional. Each keyword is its own search in the Top Ads library of each country, as in the site's search box (e.g. "shoes", "skincare", "Temu"). Empty = the top ads of each country.

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

Optional industry ids, one search per industry. Each id is two digits plus nine zeros (14000000000 = Beauty & Personal Care): 10 Education, 11 Vehicles, 12 Baby & Kids, 13 Finance, 14 Beauty, 15 Tech & Electronics, 16 Appliances, 17 Travel, 18 Household, 19 Pets, 20 Apps, 21 Home Improvement, 22 Apparel, 23 News & Entertainment, 24 Business Services, 25 Games, 26 Life Services, 27 Food & Beverage, 28 Sports & Outdoor, 29 Health, 30 E-commerce. Empty = all.

## `adUrls` (type: `array`):

A separate list, not a filter: Creative Center ad links (ads.tiktok.com/business/creativecenter/topads/<id>/...) or ad IDs. Each gives one row with its landing page, countries, comments and shares. Without other filters, no country search runs.

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

Keep only ads with these campaign objectives: campaign_objective_traffic, campaign_objective_app_install, campaign_objective_conversion, campaign_objective_video_view, campaign_objective_reach, campaign_objective_lead_generation, campaign_objective_product_sales, campaign_objective_app_promotion. Ads left out are not charged. Empty = every objective.

## `minLikes` (type: `integer`):

Keep only ads with at least this many likes. Ads left out are not charged. Empty = no minimum.

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

Hard cap on ads delivered (and charged) by the whole run. TikTok shows a logged-out visitor 20 top ads per search, so above 20 the Actor also reads the other sort orders and industries. Default: 20.

## `includeDetails` (type: `boolean`):

Opens each ad's page for the landing page link and domain, every country the ad ran in, comments, shares and the 720p video. Charged as ad-details per ad where found. Off by default.

## `onlyNew` (type: `boolean`):

Skip ads this monitor delivered in earlier runs, so a scheduled run returns only new top ads. A run with nothing new costs nothing.

## `monitorName` (type: `string`):

Names the "Only new ads" memory. Runs with the same name share it. Empty = one memory per task or input.

## `aiAnalysis` (type: `boolean`):

Adds per ad: ad category, offer type, hook, hook type, persuasion angle, offer, target audience, funnel stage, tone, product category, language and a one-line summary (aiStatus "ok"), from the ad text. Charged as ai-creative-analysis per analysed ad; ads without text are skipped and not charged. Off by default.

## `aiCustomLabels` (type: `array`):

Your own questions per ad, as "name: question" (e.g. "hasDiscount: yes/no: the ad mentions a discount"). Starting with yes/no gives true/false. Answers land in aiLabels. Up to 10.

## `aiContext` (type: `string`):

Optional context for the AI, e.g. "We sell skincare; label competitor ads by angle". Up to 500 characters.

## `aiApiKey` (type: `string`):

Optional: an OpenRouter (sk-or-), OpenAI, Anthropic (sk-ant-) or Gemini (AIza) key. With your own key AI analysis is not charged by us. Empty = our hosted model.

## `aiModel` (type: `string`):

Model name for your own key, e.g. gpt-4.1-mini. Empty = a sensible default for the key.

## `telemetry` (type: `boolean`):

Sends the Actor's author an anonymous report when a run hits an error (error type, failing step, HTTP status, counts). Never your input, results, URLs or account. Untick to turn it off.

## Actor input object example

```json
{
  "countries": [
    "US"
  ],
  "period": "30",
  "sortBy": "for_you",
  "keywords": [
    "skincare",
    "shoes"
  ],
  "adUrls": [
    "https://ads.tiktok.com/business/creativecenter/topads/7634600921591185426/pc/en"
  ],
  "maxItems": 20,
  "includeDetails": false,
  "onlyNew": false,
  "aiAnalysis": false,
  "aiCustomLabels": [
    "hasDiscount: yes/no: the ad mentions a discount"
  ],
  "telemetry": true
}
```

# Actor output Schema

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

Every ad row, in the order scraped.

## `overview` (type: `string`):

Advertiser, ad text, objective, industry, likes, CTR rank, budget, cover and video.

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

The Ad details view: Landing page, countries, comments and shares (Include ad details on).

## `ai` (type: `string`):

The AI analysis view: Hook, angle, offer, audience, funnel stage and summary per ad (AI creative analysis on).

## `runStats` (type: `string`):

RUN_STATS: ads, seconds, every Top Ads search with its counts, and 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"
    ],
    "period": "30",
    "sortBy": "for_you",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("laptime/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 = {
    "countries": ["US"],
    "period": "30",
    "sortBy": "for_you",
    "maxItems": 20,
}

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

```

## MCP server setup

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