# TikTok Trends Scraper (`parsebird/tiktok-trends-scraper`) Actor

Scrape TikTok trends: trending hashtags and top videos from TikTok Creative Center, plus sounds, creators and videos from TikTok Explore by country. Views, post counts, trend direction, plays, likes. Export JSON, CSV, Excel.

- **URL**: https://apify.com/parsebird/tiktok-trends-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 $0.49 / 1,000 tiktok trends

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

TikTok Trends Scraper collects what is trending on TikTok in a country: **trending hashtags** and **top videos** ranked by [TikTok Creative Center](https://ads.tiktok.com/creative/creativeCenter/trends), plus **sounds, creators, and videos** surfaced by [TikTok Explore](https://www.tiktok.com/explore) from a session located in that country.

<table><tr>
<td style="border-left:4px solid #FE2C55;padding:12px 16px;font-weight:600">
Pick hashtags, sounds, creators, or videos, choose a country and a 7, 30, or 90-day window, and get up to 100 trends per run with post counts, views, trend direction, plays, likes, and follower counts, plus clear labels showing which rows are formal rankings.
</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:#161823">
<a href="https://apify.com/parsebird/tiktok-trends-scraper" style="color:#FFFFFF;text-decoration:none;font-weight:700;font-size:13px">TikTok Trends 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-right:none;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/tiktok-ads-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">TikTok Ads Scraper</a><br>
<span style="color:#78716C;font-size:11px">Creative Center Top Ads</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-trends-scraper to get TikTok trends by country. Example with ApifyClient (Python): client.actor("parsebird/tiktok-trends-scraper").call(run_input={"trendType":"hashtag","countryCode":"US","period":7,"maxResults":50}). Inputs: trendType "hashtag" | "sound" | "creator" | "video" (default hashtag); countryCode two-letter code (default US; hashtags cover AE, AR, AU, BR, CA, CO, DE, EG, ES, FR, GB, ID, IL, IT, JP, KR, MX, MY, PH, SA, SG, TH, TR, TW, US, VN, ZA); period integer 7 | 30 | 90 days (default 7; 120 is treated as 90; top videos use 7 or 30); maxResults integer 1-100 (default 30). Sources: hashtags = TikTok Creative Center formal ranking; videos = Creative Center ranking for US, JP, VN, TH, ID, TikTok Explore elsewhere; sounds and creators = TikTok Explore via a residential IP in the country. Every row has rank, source (tiktok_creative_center | tiktok_explore), rankingScope (country_period | country_period_industry | country_period_segment | source_order), isFormalRanking, type, name, countryCode, period (null for Explore), scrapedAt. Hashtag rows add hashtagId, publishedVideoCount, videoViews, trend (rising/falling/stable), trendCurve[{date,value}], industry, industries[], sourceRank, topCreators[], hashtagUrl. Video rows add videoId, videoUrl, videoCoverUrl, videoDesc, hashtags[], createdAt, playCount, plus playCountLifetime, organicPlayCount, engagementRate, sixSecondViewRate, authorFollowers, contentCategory, rankedBy for Creative Center, or likeCountVideo, commentCount, shareCount, saveCount, soundName, soundId, durationSeconds for Explore; authorHandle, authorName. Sound rows add soundId, soundAuthor, soundCover, soundPlayUrl, duration, isOriginal, isCommercialMusic, linkedVideoUrl, videosInSample, sampleVideoUrl. Creator rows add creatorId, creatorHandle, creatorAvatarUrl, creatorProfileUrl, verified, bio, followerCount, likeCount, videoCount, videosInSample, sampleVideoUrl. 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 Trends Scraper?

**TikTok Trends Scraper** is a **TikTok trends API** alternative. It returns **trending TikTok hashtags** with post counts, views, and a daily popularity curve, **top TikTok videos** with plays and engagement, and the **sounds and creators** TikTok Explore is showing people in a country right now.

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 **hashtags, US, last 7 days** input, and click **Start**. A hashtag run takes a few seconds.

Every row says where it came from. `isFormalRanking: true` rows come from TikTok Creative Center's country and period rankings. `isFormalRanking: false` rows come from the TikTok Explore feed, in the order TikTok showed them, which is a discovery feed rather than a ranked chart.

### What can TikTok Trends Scraper do?

- \#️⃣ **Scrape trending TikTok hashtags** for 27 countries over the last 7, 30, or 90 days, with posts, views, and trend direction.
- 🎬 **Scrape top TikTok videos** ranked by Creative Center for the US, Japan, Vietnam, Thailand, and Indonesia, with views, engagement rate, and 6-second view rate.
- 🎵 **Find trending sounds** in TikTok Explore for a country, with the audio file link, author, duration, and whether it is an original sound.
- 👤 **Discover creators** TikTok Explore is surfacing, with follower, like, and video counts.
- 🌍 **See videos from any TikTok market**: outside the five Creative Center video markets, videos come from TikTok Explore through a residential IP in that country.
- 🏷️ **Know what each rank means** with `source`, `rankingScope`, and `isFormalRanking` on every row.
- ⏱️ **Track trends over time** with [Apify schedules](https://docs.apify.com/platform/schedules), for example a daily hashtag 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 trends?

| Field | Description |
|-------|-------------|
| `rank`, `source`, `rankingScope`, `isFormalRanking` | Position in this run, where the row came from, and whether it is a formal Creative Center ranking |
| `type`, `name`, `countryCode`, `period` | Trend type, hashtag/sound/creator name or video caption, country, and days in the ranking window |
| `publishedVideoCount`, `videoViews` | Hashtag posts and views in the period |
| `trend`, `trendCurve` | Hashtag direction (`rising`, `falling`, `stable`) and the daily popularity curve behind it |
| `topCreators` | Creators Creative Center lists for the hashtag, with followers |
| `playCount`, `engagementRate`, `sixSecondViewRate` | Top-video views in the period and engagement (Creative Center videos) |
| `likeCountVideo`, `commentCount`, `shareCount`, `saveCount` | Video engagement (Explore videos) |
| `videoUrl`, `videoCoverUrl`, `videoDesc`, `hashtags`, `authorHandle` | Video link, cover, caption, hashtags, and author |
| `soundAuthor`, `soundPlayUrl`, `duration`, `isOriginal`, `linkedVideoUrl` | Sound details and its TikTok music page |
| `creatorHandle`, `followerCount`, `likeCount`, `videoCount`, `verified` | Creator profile stats |

### How to scrape TikTok trends

1. Open [TikTok Trends Scraper](https://apify.com/parsebird/tiktok-trends-scraper) and click **Try for free** or **Start**.
2. Pick a **Trend type**: Hashtags, Sounds, Creators, or Videos.
3. Enter a **Country** code such as `US`, `GB`, `DE`, `JP`, or `BR`.
4. Enter a **Period** of 7, 30, or 90 days.
5. Set **Max results** (1 to 100) and click **Start**.
6. Open the **Output** tab, or export the trends as JSON, CSV, or Excel.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `trendType` | string | No | `hashtag` | `hashtag`, `sound`, `creator`, or `video` |
| `countryCode` | string | No | `US` | Two-letter country code |
| `period` | integer | No | 7 | 7, 30, or 90 days. `120` is treated as 90. Top videos use 7 or 30 (90 uses 30). Explore rows have no time window. |
| `maxResults` | integer | No | 30 | 1 to 100. The form pre-fills 20. |
| `proxyConfiguration` | object | No | automatic | Leave empty; Explore runs use an Apify residential proxy in your country automatically |

### Input / Output

Example input, the top 50 trending hashtags in the US over the last 7 days:

```json
{
  "trendType": "hashtag",
  "countryCode": "US",
  "period": 7,
  "maxResults": 50
}
```

Real hashtag row (shortened `trendCurve` and `topCreators`):

```json
{
  "rank": 1,
  "source": "tiktok_creative_center",
  "rankingScope": "country_period",
  "isFormalRanking": true,
  "type": "hashtag",
  "name": "#citytastetest",
  "hashtagId": "7675592944980033556",
  "publishedVideoCount": 805308,
  "videoViews": 666868302,
  "trend": "rising",
  "trendCurve": [
    { "date": "2026-09-21", "value": 0.0 },
    { "date": "2026-09-22", "value": 89.48 },
    { "date": "2026-09-27", "value": 100.0 }
  ],
  "industry": null,
  "industries": [],
  "sourceRank": 1,
  "topCreators": [
    { "handle": "@funny27clips", "nickname": "luki", "followers": 121500, "avatarUrl": "https://p16-common-sign.tiktokcdn.com/...", "profileUrl": "https://www.tiktok.com/@funny27clips" }
  ],
  "hashtagUrl": "https://www.tiktok.com/tag/citytastetest",
  "countryCode": "US",
  "period": 7,
  "scrapedAt": "2026-09-30T13:01:26.964Z"
}
```

Real sound row from a UK-located Explore session:

```json
{
  "rank": 5,
  "source": "tiktok_explore",
  "rankingScope": "source_order",
  "isFormalRanking": false,
  "type": "sound",
  "name": "original sound - VYRMA",
  "soundId": "7680568775888636694",
  "soundAuthor": "VYRMA",
  "soundCover": "https://p19-common-sign.tiktokcdn-eu.com/...",
  "soundPlayUrl": "https://v45.tiktokcdn-eu.com/...",
  "duration": 17,
  "isOriginal": true,
  "isCommercialMusic": true,
  "linkedVideoUrl": "https://www.tiktok.com/music/original-sound-VYRMA-7680568775888636694",
  "videosInSample": 1,
  "sampleVideoUrl": "https://www.tiktok.com/@vyrmamusic/video/7680568753444179222",
  "countryCode": "GB",
  "period": null,
  "scrapedAt": "2026-09-30T13:07:48.338Z"
}
```

Real creator row from a Brazil-located Explore session:

```json
{
  "rank": 1,
  "source": "tiktok_explore",
  "rankingScope": "source_order",
  "isFormalRanking": false,
  "type": "creator",
  "name": "saopedr8",
  "creatorId": "6630013713222090757",
  "creatorHandle": "@saopedr8",
  "creatorAvatarUrl": "https://p16-common-sign.tiktokcdn.com/...",
  "creatorProfileUrl": "https://www.tiktok.com/@saopedr8",
  "verified": false,
  "bio": null,
  "followerCount": 154300,
  "likeCount": 3700000,
  "videoCount": 24,
  "videosInSample": 1,
  "sampleVideoUrl": "https://www.tiktok.com/@saopedr8/video/7689120549695507733",
  "countryCode": "BR",
  "period": null,
  "scrapedAt": "2026-09-30T13:07:57.827Z"
}
```

Real top-video row from Creative Center (US, 7 days; long caption and links shortened):

```json
{
  "rank": 1,
  "source": "tiktok_creative_center",
  "rankingScope": "country_period",
  "isFormalRanking": true,
  "type": "video",
  "name": "3 NEW Gemini Live Features That Should Not Be This Good ✨ @googlegemini ...",
  "videoId": "7680342145466780941",
  "videoUrl": "https://www.tiktok.com/@renz.sadiwa/video/7680342145466780941",
  "videoCoverUrl": "https://p16-common-sign.tiktokcdn-us.com/...",
  "videoPlayUrl": "https://v16m-default.tiktokcdn-us.com/...",
  "videoDesc": "3 NEW Gemini Live Features That Should Not Be This Good ✨ ...",
  "hashtags": ["#googlepartner", "#geminilive", "#googlegemini", "#aitools", "#smallbusiness"],
  "createdAt": "2026-08-31T23:30:28Z",
  "playCount": 39218761,
  "playCountLifetime": 52968271,
  "organicPlayCount": 489679,
  "engagementRate": 0.0003919297705503751,
  "sixSecondViewRate": 0.01256855922043099,
  "authorHandle": "@renz.sadiwa",
  "authorName": "Renz Sadiwa",
  "authorFollowers": 208772,
  "authorAvatarUrl": "https://p19-common-sign.tiktokcdn-us.com/...",
  "contentCategory": null,
  "rankedBy": "video_views",
  "organicOnly": false,
  "countryCode": "US",
  "period": 7,
  "scrapedAt": "2026-09-30T13:08:03.691Z"
}
```

Videos from Explore (outside US, JP, VN, TH, ID) have `likeCountVideo`, `commentCount`, `shareCount`, `saveCount`, `durationSeconds`, `soundName`, and `soundId` instead of the Creative Center metrics. 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-trends-scraper").call(run_input={
    "trendType": "hashtag",
    "countryCode": "GB",
    "period": 30,
    "maxResults": 50,
})

for tag in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(tag["rank"], tag["name"], tag["trend"], tag["videoViews"], tag.get("industry"))
```

### JavaScript API example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('parsebird/tiktok-trends-scraper').call({
    trendType: 'sound',
    countryCode: 'US',
    maxResults: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
const licensed = items.filter((s) => !s.isOriginal);
console.log(licensed.map((s) => `${s.name} by ${s.soundAuthor}`));
```

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

- **Content planning**: pick rising hashtags in your market before they peak.
- **Market research**: compare trending hashtags and top videos across countries and industries.
- **Influencer discovery**: collect creators TikTok is surfacing in a country, with follower counts.
- **Sound research**: find which sounds are showing up in a country's Explore feed.
- **Trend dashboards**: schedule daily runs and send results to Google Sheets or your database.

### How it works

1. **Hashtags**: the actor reads TikTok Creative Center's hashtag ranking for your country and period. Creative Center shows 3 hashtags per list to visitors who aren't logged in, so the actor also reads the ranking for each of Creative Center's industries and removes duplicates. The first 3 rows are the overall ranking (`country_period`); the rest are industry rankings (`country_period_industry`, with `industry` set).
2. **Top videos** (US, JP, VN, TH, ID): the actor reads Creative Center's top-video ranking by views, engagement rate, and 6-second view rate, overall and for organic videos (`country_period`), and then by content category (`country_period_segment`, with `contentCategory` set).
3. **Sounds, creators, and other videos**: the actor opens TikTok Explore through an Apify residential IP in your country and reads the feed until it has enough unique results. Sounds and creators are taken from the videos in the feed. `videosInSample` shows how many feed videos used that sound or creator.

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

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

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

| Event | Free plan | Bronze | Silver | Gold |
|-------|-----------|--------|--------|------|
| `trend-scraped` | $0.00099 (**$0.99 / 1,000**) | $0.00089 (**$0.89 / 1,000**) | $0.00069 (**$0.69 / 1,000**) | $0.00049 (**$0.49 / 1,000**) |

One `trend-scraped` event is one hashtag, sound, creator, or video saved to the dataset. The prefilled 20-hashtag test costs about $0.02 on the Free plan, and 100 trends cost about $0.10. Apify's free plan includes monthly platform credits you can use to try the actor.

### Is it legal to scrape TikTok trends?

**Is scraping TikTok trend data legal?**

The actor reads only data that TikTok Creative Center and TikTok Explore show publicly to visitors who aren't logged in. Scraping public data is generally legal in many jurisdictions, but creator profiles contain personal data protected by laws such as GDPR and CCPA, and videos and sounds are protected by copyright. Collect only what you need, 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 Ads Scraper](https://apify.com/parsebird/tiktok-ads-scraper) | Top-performing TikTok ads from Creative Center |
| [TikTok Live Search Scraper](https://apify.com/parsebird/tiktok-live-search-scraper) | TikTok LIVE rooms broadcasting now |
| [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 hashtags can I get?**
About 55 to 60 per country and period in our tests. Creative Center shows 3 hashtags per list without login; the actor combines the overall list with 21 industry lists. If you ask for more, the status message tells you how many TikTok returned.

**Which countries are supported?**
Hashtags: AE, AR, AU, BR, CA, CO, DE, EG, ES, FR, GB, ID, IL, IT, JP, KR, MX, MY, PH, SA, SG, TH, TR, TW, US, VN, and ZA, which is Creative Center's hashtag list. Top videos from Creative Center: US, JP, VN, TH, and ID. Sounds, creators, and other videos come from TikTok Explore and work for countries where TikTok is available. TikTok isn't available in India, so Explore runs for `IN` fail with a clear message.

**Why are sounds and creators not a formal ranking?**
TikTok Creative Center no longer publishes sound or creator charts. The actor uses the TikTok Explore feed instead and marks those rows `rankingScope: "source_order"` and `isFormalRanking: false`. Explore is personalized and shaped by location, and it also mixes in popular videos from other countries, so two runs can return different results.

**Why are so many sounds called "original sound"?**
Most videos in TikTok Explore use the creator's own audio, which TikTok names "original sound". Filter on `isOriginal: false` to keep licensed tracks only.

**Why is `period` null for some rows?**
Explore has no time window, so rows from Explore have `period: null`. Creative Center rows show the window the ranking covers.

**Can I use period 120?**
Creative Center now offers 7, 30, and 90 days for hashtags, so `120` is treated as 90. Top videos offer 7 and 30 days, so 90 uses 30. The run log says when this happens.

**How is `trend` calculated?**
From Creative Center's daily popularity curve for the hashtag: `rising` if the last day is at least 10% above the first, `falling` if at least 10% below, otherwise `stable`. A curve that starts at 0 and ends above 0 counts as `rising`.

**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-trends-scraper/changelog.md

# Actor input Schema

## `trendType` (type: `string`):

Hashtags come from TikTok Creative Center's ranking. Videos come from Creative Center for US, JP, VN, TH and ID, and from TikTok Explore elsewhere. Sounds and creators come from TikTok Explore.

## `countryCode` (type: `string`):

Enter a two-letter country code such as US, GB, DE, JP or BR.

## `period` (type: `integer`):

Enter 7, 30 or 90 days. Hashtags support all three; Creative Center top videos support 7 and 30 days (90 uses 30). Explore results (sounds, creators, videos outside US/JP/VN/TH/ID) have no time window.

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

Save at most this many trends (1 to 100). TikTok may return fewer.

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

Leave empty. For Explore results the actor automatically uses an Apify residential proxy in your chosen country, because TikTok picks Explore videos by visitor location. Set a proxy here only if you want to control it yourself.

## Actor input object example

```json
{
  "trendType": "hashtag",
  "countryCode": "US",
  "period": 7,
  "maxResults": 20
}
```

# 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 = {
    "trendType": "hashtag",
    "countryCode": "US",
    "period": 7,
    "maxResults": 20
};

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

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

```

## MCP server setup

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