# TikTok Trends Scraper | Trending Hashtags & Top Videos (`genial_candlestand/tiktok-trends-scraper`) Actor

Get TikTok Creative Center trends: trending hashtags with rank, posts, views, popularity curve, trend direction and top creators, and top videos with views, engagement rate and author. Hashtags in 27 countries, many lists per run merged into one row per item, no login.

- **URL**: https://apify.com/genial_candlestand/tiktok-trends-scraper.md
- **Developed by:** [Flowo](https://apify.com/genial_candlestand) (community)
- **Categories:** Social media, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.53 / 1,000 trending hashtag or videos

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 Trends Scraper | Trending Hashtags & Top Videos

![TikTok Trends Scraper | Trending Hashtags & Top Videos](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/tiktok-com-trends-and-popularity-rankings-banner-3332febd.png)

Get TikTok's official trend rankings from the TikTok Creative Center: trending hashtags with their rank, post count, view count, popularity curve, trend direction and top creators, and top videos with views, engagement rate, 6-second view rate, caption and author. One run reads many countries, periods and industry lists and merges them, so a hashtag or video found in several lists is one row with every rank it holds.

### What does TikTok Trends Scraper do?

It reads the public rankings of the TikTok Creative Center (ads.tiktok.com) and returns one row per trending hashtag or top video, per country and period. Trending hashtags cover 27 countries, the last 7, 30 or 90 days, the overall list and 16 industry lists. Top videos cover the US, Japan, Vietnam, Thailand and Indonesia: weekly and monthly rankings (with up to 12 past periods) and videos created in the last 7 or 30 days, ranked by views, engagement rate or 6-second view rate. It is built for social media marketers, trend analysts, creators and AI agents that need to know what is trending on TikTok in a given country. No login or TikTok account is needed.

### How to scrape TikTok trends

![How TikTok Trends Scraper works: Reads the public TikTok Creative Center rankings API over plain HTTP; Requests every chosen list: country × period × industry or metric × label; Retries failed request](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/tiktok-com-trends-and-popularity-rankings-how-64df52be.png)

1. Open the actor in Apify Console and click **Try for free**.
2. Choose **What to collect**: trending hashtags, top videos or both.
3. Enter the **Countries** as codes or English names, e.g. `US`, `GB`, `Japan`.
4. Optionally pick hashtag periods and industry lists, and video rankings, metrics, content labels, organic only and history.
5. Click **Start**. With an empty input the run collects US hashtags for the last 7 days and the US weekly top videos.
6. Download the results as JSON, CSV, Excel or HTML, or read them through the API.

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

Price per event by Apify plan:

| Event | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|
| Trending hashtag or video | $1.80 per 1,000 | $1.71 per 1,000 | $1.62 per 1,000 | $1.53 per 1,000 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

A test run with the API example input below returned 13 rows in 9 s.

You pay per saved row: one trending hashtag or one top video for one country and period. A hashtag that ranks in several lists of the same country and period is merged into one row and charged once. Lists that return nothing are not charged. Each run also has a small actor start event ($0.00005 per GB of memory).

| Scenario | Rows (events) | Cost on the Free plan |
|---|---|---|
| Default run: US hashtags, 7 days, all 17 lists + US weekly top videos | 114 | about $0.21 |
| Overall hashtag list in 7 countries | 21 | about $0.04 |
| Videos created in the last 7 days in JP, VN, TH and ID (views, overall) | 16 | about $0.03 |
| A large sweep stopped at the default `maxItems` | 1,000 | about $1.80 |

### Input

![TikTok Trends Scraper input example: What to collect, Countries, Hashtag periods, Hashtag lists (industries), Video rankings, Video ranking metrics, Video lists (content labels)](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/tiktok-com-trends-and-popularity-rankings-input-c0db3252.png)

All fields are optional; an empty input `{}` runs the default US sweep.

- **What to collect** (`dataTypes`) — `hashtags`, `videos` or both (default both).
- **Countries** (`countries`) — ISO codes in any case or English names (`United Kingdom`, `UK`, `Japan`). Hashtags: US, FR, DE, IT, ES, GB, AR, AU, BR, CA, CO, EG, ID, IL, JP, KR, MY, MX, PH, SA, SG, ZA, TW, TH, TR, AE, VN. Videos: only US, JP, VN, TH, ID; other countries get hashtags only. Any other country is an input error. Default `US`.
- **Hashtag periods** (`hashtagPeriods`) — `7`, `30`, `90` days (default 7). Each period is its own ranking with its own rows.
- **Hashtag lists** (`hashtagIndustries`) — `overall` and 16 industries, e.g. `games`, `beauty-personal-care`, `apps`, `travel` (default all 17). Hashtags only.
- **Video rankings** (`videoPeriods`) — `weekly`, `monthly`, `createdLast7Days`, `createdLast30Days` (default weekly).
- **Video ranking metrics** (`videoSortBy`) — `views`, `engagementRate`, `sixSecondViewRate` (default all 3).
- **Video lists** (`videoContentLabels`) — `overall`, `beauty-care`, `fashion`, `food-beverage`, `lifestyle-leisure`, `technology-finance` (default all 6).
- **Organic videos only** (`videoOrganicOnly`) — rank videos by organic (non-promoted) performance only (default false).
- **Video history** (`videoHistoryPeriods`) — 0–12 earlier weekly and monthly rankings to read as well (default 0). It does not apply to the "created in the last 7/30 days" rankings.
- **Max results** (`maxItems`) — stop after this many rows, hashtags and videos together (default 1000).
- **Proxy** (`proxyConfiguration`) — the default Apify datacenter proxy works; a blocked request is retried through a residential proxy.

Example: compare the overall trending hashtags of several countries over 7 and 30 days.

```json
{
  "dataTypes": ["hashtags"],
  "countries": ["US", "GB", "FR", "DE", "JP", "BR", "KR"],
  "hashtagPeriods": ["7", "30"],
  "hashtagIndustries": ["overall"]
}
```

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

![TikTok Trends Scraper output example: Type, Country, Hashtag days, Best rank, Lists](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/tiktok-com-trends-and-popularity-rankings-output-1072e031.png)

Each row has `type` (`hashtag` or `video`), `id`, `url`, `country`, `position` (best rank across its lists), `listCount`, `rankings` (every list and rank) and `scrapedAt`. A row only carries the fields of its own type.

| Hashtag rows | Video rows |
|---|---|
| `title` — hashtag name without `#` | `description` — caption |
| `periodDays` — 7, 30 or 90 | `period`, `periodEnd` (YYYY-MM-DD), `organicOnly` |
| `rankings` — `{list, listId, position}` | `rankings` — `{sortBy, contentLabel, contentLabelId, position}` |
| `industries` | `contentLabels` |
| `postCount`, `viewCount` | `viewCount`, `viewCountLifetime`, `organicViewCount`, `organicViewCountLifetime` |
| `popularityCurve` — `{date, value 0–100}` | `engagementRate`, `engagementRateLifetime` (fractions) |
| `trendDirection` (`rising`, `stable`, `falling`), `trendMomentum`, `peakDate` | `sixSecondViewRate`, `sixSecondViewRateLifetime` (fractions) |
| `topCreators` — `{position, username, nickname, followerCount, userId, url, avatarUrl}` | `publishedAt`, `author`, `authorName`, `authorUrl`, `authorId`, `authorFollowerCount`, `authorBio`, `authorAvatarUrl` |
| | `imageUrl` (cover), `videoUrl` (mp4) |

A hashtag row from a real run (curve and creators shortened):

```json
{
  "type": "hashtag",
  "id": "667655",
  "url": "https://www.tiktok.com/tag/veteransday",
  "title": "veteransday",
  "country": "US",
  "periodDays": 7,
  "position": 1,
  "listCount": 2,
  "rankings": [
    { "list": "Overall", "listId": "overall", "position": 1 },
    { "list": "News & Entertainment", "listId": "news-entertainment", "position": 1 }
  ],
  "industries": ["News & Entertainment"],
  "postCount": 63021,
  "viewCount": 68790053,
  "popularityCurve": [
    { "date": "2026-11-05", "value": 0 },
    { "date": "2026-11-10", "value": 49.12 },
    { "date": "2026-11-11", "value": 100 }
  ],
  "trendMomentum": 68.6,
  "trendDirection": "rising",
  "peakDate": "2026-11-11",
  "topCreators": [
    { "position": 3, "username": "fallontonight", "nickname": "FallonTonight", "followerCount": 30253756, "userId": "6600107989528985606", "url": "https://www.tiktok.com/@fallontonight", "avatarUrl": "https://p16-common-sign.tiktokcdn.com/…" }
  ],
  "scrapedAt": "2026-11-13T20:54:49.657Z"
}
```

A video row from the same run (caption and links shortened):

```json
{
  "type": "video",
  "id": "7678479724896587038",
  "url": "https://www.tiktok.com/@megannco/video/7678479724896587038",
  "description": "Five years ago, I started my small business … #ad #shopifypartner",
  "publishedAt": "2026-08-26T23:03:07.000Z",
  "country": "US",
  "period": "weekly",
  "periodEnd": "2026-11-08",
  "organicOnly": false,
  "position": 1,
  "listCount": 1,
  "rankings": [{ "sortBy": "views", "contentLabel": "Overall", "contentLabelId": "overall", "position": 1 }],
  "viewCount": 42477347,
  "viewCountLifetime": 110068491,
  "organicViewCount": 2445673,
  "organicViewCountLifetime": 9986981,
  "engagementRate": 0.001205819186400695,
  "engagementRateLifetime": 0.0018236281625774264,
  "sixSecondViewRate": 0.026460333303903665,
  "sixSecondViewRateLifetime": 0.0335320398887838,
  "contentLabels": [],
  "author": "megannco",
  "authorName": "Meg Ann Co.",
  "authorUrl": "https://www.tiktok.com/@megannco",
  "authorId": "7070293872819044358",
  "authorFollowerCount": 261484,
  "authorBio": "your favorite hand-drawn crewnecks & tees\n🧸🤍🎨\nentrepreneur & nurse\nShop Below ◡̈",
  "authorAvatarUrl": "https://p19-common-sign.tiktokcdn-us.com/…",
  "imageUrl": "https://p16-common-sign.tiktokcdn-us.com/…",
  "videoUrl": "https://v16m-default.tiktokcdn-us.com/…",
  "scrapedAt": "2026-11-13T20:54:53.446Z"
}
```

### Use cases

- **Campaign hashtags:** marketers and agencies pick hashtags that are rising in a country and industry, with post and view counts.
- **Country comparison:** analysts compare the overall trending hashtags of the US, GB, FR, DE, JP, BR and KR, short term (7 days) against long term (90 days).
- **Industry deep dive:** read the beauty, apparel or games hashtag lists of one market over 7 and 30 days.
- **Content research:** study the top videos of the current and past weeks and months, by views, engagement rate or 6-second view rate.
- **Weekly monitoring:** schedule a run for JP, VN, TH and ID to see the new viral videos of each market every week.

### Limitations

- **3 hashtags / 4 videos per list.** TikTok shows logged-out visitors only the top 3 hashtags and top 4 videos of each list, and paging does not return more. The actor gets more rows by reading more lists (countries, periods, industries, metrics, labels, history) and merging them.
- **Countries.** Hashtags: the 27 countries listed above. Top videos: only US, JP, VN, TH and ID. Other countries (e.g. IN, PK, NG, CN) are not offered by TikTok and are rejected as input errors.
- **No songs, creator rankings or keyword insights.** The Creative Center no longer shows them publicly. Video rows give rates (engagement, 6-second view rate), not like, comment or share counts.
- **Fields that can be empty:** `description` is null when the caption is empty; `industries` and `contentLabels` can be empty arrays; `trendMomentum`, `trendDirection` and `peakDate` are null when a hashtag has no curve points. Video metrics, author fields, `imageUrl` and `videoUrl` can be missing for some videos.
- **Media links expire.** `avatarUrl`, `authorAvatarUrl`, `imageUrl` and `videoUrl` are signed TikTok links that expire after about a day; save the files soon if you need them.
- **History depth.** Video history goes back at most 12 weeks or months.
- TikTok rebuilt the Creative Center recently; endpoints, caps and countries can change.

### Tips and troubleshooting

- **More rows:** add countries, hashtag periods and video history. Leaving the industry, metric and label lists at their defaults already reads every list.
- **Fewer, focused rows:** pick only `overall` in the hashtag lists or video lists, one metric and one period.
- **Industries apply only to hashtags and content labels only to videos;** setting them for the other type has no effect.
- **No videos for a country:** top videos exist only for US, JP, VN, TH and ID. Other countries get hashtags only, with a warning in the log; asking for videos only in such a country is an input error.
- **History with "created in the last 7/30 days" is ignored** — it works for weekly and monthly rankings only.
- **Very large sweeps** (many countries × periods × history) make thousands of requests and can take about an hour; narrow the lists or lower `maxItems`. A failed list is skipped with a warning and the rest of the run is kept.

### API, MCP and integrations

Run the actor from your code with the same JSON input as in Console. Your API token is in [Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("genial_candlestand/tiktok-trends-scraper").call(run_input={
    "countries": ["US"],
    "hashtagIndustries": ["overall", "games", "news-entertainment"],
    "videoSortBy": ["views"],
    "videoContentLabels": ["overall", "beauty-care"],
    "maxItems": 30,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('genial_candlestand/tiktok-trends-scraper').call({
    "countries": ["US"],
    "hashtagIndustries": ["overall", "games", "news-entertainment"],
    "videoSortBy": ["views"],
    "videoContentLabels": ["overall", "beauty-care"],
    "maxItems": 30,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**HTTP** — one request runs the actor and returns the results (runs up to 5 minutes; longer ones: [run asynchronously](https://docs.apify.com/api/v2/act-runs-post)):

```bash
curl -X POST "https://api.apify.com/v2/acts/genial_candlestand~tiktok-trends-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"countries":["US"],"hashtagIndustries":["overall","games","news-entertainment"],"videoSortBy":["views"],"videoContentLabels":["overall","beauty-care"],"maxItems":30}'
```

**AI agents (MCP).** Add the actor as a tool of the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Claude Code:

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

Claude Desktop, Cursor or VS Code: `{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=genial_candlestand/tiktok-trends-scraper"}}}`. Then ask, for example:

- "What hashtags are trending on TikTok in Japan and Brazil over the last 30 days?"
- "Show the top TikTok videos in the US this week ranked by engagement rate"
- "Which Games and Beauty & Personal Care hashtags are rising on TikTok in the US?"

**Integrations.** Run it on a schedule with [Apify Schedules](https://docs.apify.com/platform/schedules) and send the results to Google Sheets, Slack, Zapier, Make, n8n or your webhook — see [Apify integrations](https://docs.apify.com/platform/integrations).

### FAQ

**Do I need a TikTok account or API key?**<br>
No. The actor reads the public Creative Center rankings that anyone can open without logging in.

**Why only 3 hashtags or 4 videos per list?**<br>
That is what TikTok shows to logged-out visitors. The actor reads many lists in one run and merges them: the default US run returns 47 distinct hashtags and 67 distinct videos from 35 lists.

**What do position, listCount and rankings mean?**<br>
`rankings` holds every list the item ranks in with its rank there, `listCount` is how many lists that is, and `position` is the best rank among them.

**How is trendDirection calculated?**<br>
From the popularity curve: `trendMomentum` is the last curve value minus the curve average; the trend is `rising` at 10 or more, `falling` at −10 or less, otherwise `stable`.

**How is it different from other TikTok trends actors?**<br>
One run reads many lists, countries and periods instead of a single list, and a hashtag or video found in several lists is one merged row with all its ranks, charged once. Video rows add lifetime and organic views, engagement and 6-second view rates, and past weekly or monthly rankings.

**Is it legal to scrape TikTok trends?**<br>
The actor collects only rankings that TikTok publishes openly on the Creative Center, with no login. It returns creators' and authors' public profile data as TikTok shows it. You are responsible for how you use the data, including data-protection rules such as GDPR for personal data.

### Also useful

- [TikTok Hashtag, Sound & Place Scraper](https://apify.com/genial_candlestand/tiktok-hashtag-sound-place-scraper) — get the posts behind a trending hashtag: captions, views, likes, shares and authors
- [TikTok Video Details Scraper](https://apify.com/genial_candlestand/tiktok-video-details-scraper) — add likes, comments, shares, saves and a transcript to the top videos you found
- [Google Trends Trending Now Scraper](https://apify.com/genial_candlestand/google-trending-now-scraper) — compare TikTok trends with what people search on Google in the same country
- [Google Trends Scraper](https://apify.com/genial_candlestand/google-trends-scraper) — check search interest over time and by region for a trending hashtag topic
- [Pinterest Scraper](https://apify.com/genial_candlestand/pinterest-scraper) — add Pinterest Trends keywords with weekly history to your social trend research

# Actor input Schema

## `dataTypes` (type: `array`):

Trending hashtags (27 countries) and/or top videos (US, JP, VN, TH, ID only). Default and empty: both.

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

Country codes in any case or English names, one per line, e.g. US, GB, Japan, United Kingdom. Hashtags: US FR DE IT ES GB AR AU BR CA CO EG ID IL JP KR MY MX PH SA SG ZA TW TH TR AE VN. Videos: only US, JP, VN, TH, ID (other countries get hashtags only). Any other country is an input error. Default: US.

## `hashtagPeriods` (type: `array`):

Trending hashtags of the last 7, 30 or 90 days. Each period is its own ranking with its own rows. Hashtags only. Default: 7 days.

## `hashtagIndustries` (type: `array`):

The overall ranking and the 16 industry rankings to read in every country and period. TikTok shows the top 3 of each list, so more lists give more hashtags; a hashtag in several lists is one row with all its ranks. Default and empty: all 17. Hashtags only.

## `videoPeriods` (type: `array`):

Top videos of the last full week or month, or videos created in the last 7 or 30 days. Videos only (US, JP, VN, TH, ID). Default: weekly.

## `videoSortBy` (type: `array`):

Rank top videos by views, engagement rate and/or 6-second view rate. Each metric is its own top 4; a video in several lists is one row with all its ranks. Default and empty: all three. Videos only.

## `videoContentLabels` (type: `array`):

Overall top videos and/or the top videos of Beauty & Care, Fashion, Food & Beverage, Lifestyle & Leisure or Technology & Finance. Each is its own top 4. Default and empty: all 6. Videos only.

## `videoOrganicOnly` (type: `boolean`):

Rank videos by organic (non-promoted) performance only, like the Organic switch on the Creative Center. Videos only.

## `videoHistoryPeriods` (type: `integer`):

Also read this many earlier weekly and monthly video rankings, 0–12, e.g. 4 = the 4 weeks before the current weekly ranking. Ignored for the created-in-the-last-7/30-days rankings. Default: 0 (latest only).

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

Stop after this many rows, hashtags and videos together. Each row is one hashtag or video in one country and period, merged across lists. Default: 1000.

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

The default Apify datacenter proxy works; a blocked request is retried through a residential proxy.

## Actor input object example

```json
{
  "dataTypes": [
    "hashtags",
    "videos"
  ],
  "countries": [
    "US",
    "GB"
  ],
  "hashtagPeriods": [
    "7"
  ],
  "hashtagIndustries": [
    "overall",
    "apparel-accessories",
    "apps",
    "baby-kids-maternity",
    "beauty-personal-care",
    "education",
    "food-beverage",
    "games",
    "health",
    "home-improvement",
    "household-products",
    "news-entertainment",
    "pets",
    "sports-outdoor",
    "tech-electronics",
    "travel",
    "vehicle-transportation"
  ],
  "videoPeriods": [
    "weekly"
  ],
  "videoSortBy": [
    "views",
    "engagementRate",
    "sixSecondViewRate"
  ],
  "videoContentLabels": [
    "overall",
    "beauty-care",
    "fashion",
    "food-beverage",
    "lifestyle-leisure",
    "technology-finance"
  ],
  "videoOrganicOnly": false,
  "videoHistoryPeriods": 0,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All trending hashtags and top videos

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

Table view of hashtags and videos

# 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",
        "GB"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("genial_candlestand/tiktok-trends-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",
        "GB",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("genial_candlestand/tiktok-trends-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",
    "GB"
  ]
}' |
apify call genial_candlestand/tiktok-trends-scraper --silent --output-dataset

```

## MCP server setup

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