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

Scrape TikTok Trends data. Just add one or more channels and the scraper will extract related videos, posts, authors, music, and channel information. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

- **URL**: https://apify.com/clockworks/tiktok-trends-scraper.md
- **Developed by:** [Clockworks](https://apify.com/clockworks) (Apify)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 3,566 total users, 385 monthly users, 100.0% runs succeeded, 56 bookmarks
- **User rating**: 4.78 out of 5 stars

## Pricing

from $1.70 / 1,000 results

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

## What is TikTok Trends Scraper?

This TikTok Trends Tool gathers data from [TikTok Trend Discovery](https://ads.tiktok.com/business/creativecenter/inspiration/popular/hashtag/pc/en), a site that has information about what is trending on the social media site, including **top trending hashtags, songs, creators, and videos**. This Actor scrapes this data per country and allows you to export it into almost any mainstream format.

Whether you're a content creator, marketer, or influencer, with TikTok Trends Scraper, you can quickly scrape this repository and get an overview of all trending hashtags, songs, videos, and creators. Thanks to that, you can act quickly and stay ahead of the competition.

TikTok Trends Scraper also lets you apply several different filters to further fine-tune your results:

- **Hashtags**: filter by region, time range, and industry
- **Songs**: filter those that are approved for business use and those that are in popular or in a breakout leader board
- **Creators**: sort by number of followers, engagement rate, and popularity, filter them by region and follower range
- **Video ads**: sort them by likes, comments, and shares

### What data can I get with TikTok Trends Scraper?

Our TikTok trends finder can extract the following information for you:

<table>
<tr>
<td>🎵 Audiolink</td>
<td>📝 Author</td>
<td>🖼️ Avatar URL</td>
<td>🌍 Country code</td>
</tr>
<tr>
<td>⏱️ Duration of the videos in seconds</td>
<td>👥 Follower count</td>
<td>🏢 Industry name</td>
<td>🚀 If the video is promoted or not</td>
</tr>
<tr>
<td>👍 Number of likes</td>
<td>🆕 If the video is marked as new or not</td>
<td>👩‍💻 Creator name</td>
<td>📊 Ranking in this hashtag</td>
</tr>
<tr>
<td>#️⃣ Hashtag name </td>
<td>🔈 Sound name</td>
<td>📽️ Video title</td>
<td>👀 Total number of views</td>
</tr>
</table>

### How to see what’s trending on TikTok

Using the TikTok Trends Scraper is just a few steps:

1. [Create](https://console.apify.com/sign-up) a free Apify account.
2. Open [TikTok Trends Scraper](https://apify.com/clockworks/tiktok-trends-scraper)
3. You can run the tool immediately, or add modifiers to your search (more on that below)
4. Click on “start,” and wait while the TikTok Trends Scraper finishes its run
5. Export your data in the format of your choosing, such as CSV, HTML, JSON, or Excel

### 🔼 Input sample

TikTok Trends Scraper allows for customization, letting you adjust it according to your needs.

We recommend you add the number of trending creators, hashtags, videos or sounds (the default is 100). This is to limit the load on the system (and your bill).

Other options are to add region, time range, and the industry hashtag associated with your search. Finally, you can further drill down and use the drop down buttons to scrape trending songs, creators, and videos, each of which will give you more specific options.

<a href="https://console.apify.com/actors/sDvA9jM4WRTDX4Syr/">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/tiktok_trends_input1.png?raw=true" alt="TikTok Trends Scraper input" style="width:70%;">
</a>

### 🔽 Output sample

After running the Actor, you can find the results of your search under the “output” tab. Here is an example of one search:

<a href="https://console.apify.com/actors/sDvA9jM4WRTDX4Syr/">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/tiktok-trends-scraper-output.png?raw=true" alt="TikTok Trends Scraper output" style="width:70%;">
</a>

You can also export results as a CSV, JSON, HTML, or Excel file. You can also filter all results down to hashtag, creators, sounds, and video. For example, here are some sample outputs.

#### Hashtag output

```json
[
    {
        "id": "1686858772679682",
        "name": "выпуск2025",
        "url": "https://www.tiktok.com/tag/выпуск2025",
        "countryCode": "CZ",
        "rank": 1,
        "industryName": "Education",
        "videoCount": 1572,
        "viewCount": 5659920,
        "rankDiff": 0,
        "markedAsNew": true,
        "isPromoted": false
    }
]
```

#### Creators output

```json
[
    {
        "id": "1686858772679682",
        "name": "выпуск2025",
        "url": "https://www.tiktok.com/tag/выпуск2025",
        "countryCode": "CZ",
        "rank": 1
    }
]
```

#### Sounds output

```json
[
    {
        "id": "1686858772679682",
        "name": "выпуск2025",
        "url": "https://www.tiktok.com/tag/выпуск2025",
        "countryCode": "CZ",
        "rank": 1,
        "rankDiff": 0,
        "markedAsNew": true,
        "isPromoted": false
    }
]
```

#### Videos output

```json
[
    {
        "id": "1686858772679682",
        "name": "выпуск2025",
        "url": "https://www.tiktok.com/tag/выпуск2025",
        "countryCode": "CZ",
        "rank": 1
    }
]
```

#### How can I use the data extracted with TikTok Trends Scraper?

TikTok Trends Scraper helps you out when you need to:

- Do **trend analysis** (for sounds, creators, videos…)
- **Discover influencers** for your brand
- **Update your TikTok marketing strategy** with the newest trends
- **Feed the data into AI,** analyze user behavior, and whatever you need.

### Integrate TikTok Trends Scraper and automate your workflow

TikTok Trends Scraper can [be connected](https://console.apify.com/actors/sDvA9jM4WRTDX4Syr/integrations) with almost any cloud service or web app thanks to [integrations](https://apify.com/integrations) on the Apify platform. These include [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), and [Google Drive](https://docs.apify.com/platform/integrations/drive).

Alternatively, you can use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to carry out an action whenever an event occurs, e.g., get a notification whenever TikTok Trends Scraper successfully finishes a run.

### Scrape any TikTok data you need with dedicated scrapers

<table>
<tr>
<td>🧹 TikTok Scraper</td>
<td>📤 TikTok Data Extractor</td>
<td>💬 TikTok Comments Scraper</td>
</tr>
<tr>
<td>👤 TikTok Profile Scraper</td>
<td>#️⃣ TikTok Hashtag Scraper</td>
<td>🎬 TikTok Video Scraper</td>
</tr>
<tr>
<td>🎶 TikTok Sound Scraper</td>
<td>🔍 TikTok User Search Scraper</td>
<td>🧭 TikTok Discover Scraper</td>
</tr>
<tr>
<td>🌐 TikTok Explore Scraper</td>
</tr>
</table>

Furthermore, you can use the power of AI agents to do multiple tasks at one. For example, our [Comments Analyzer Agent](https://apify.com/apify/comments-analyzer-agent) can perform sentiment analysis of TikTok videos, or you could try our [Influencer Discovery Agent](https://apify.com/apify/influencer-discovery-agent) for lead generation on TikTok videos.

### ❓FAQ

#### How much does it cost to use TikTok Trends Scraper?

TikTok Trends Scraper uses [pay-per-event pricing](https://docs.apify.com/platform/actors/running/actors-in-store#actors-paid-per-event) (PPE) model, which makes your costs easy to calculate. For the full breakdown of how it works, check out the [pricing table](https://apify.com/clockworks/tiktok-trends-scraper/pricing).

Assuming you’re on the Free plan, **$5 per month gets you over 800 results**. For more frequent or extensive data scraping, consider upgrading to the **Starter plan, which would get you around 20,000 results** per month. For scalable TikTok scraping, check out our Scale or Business plans, or [reach out to our Sales department](https://apify.com/contact-sales) for tailored solutions.

#### Can I use TikTok Trends Scraper with the Apify API?

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, among other functions.

To access the API using Node.js, use the `apify-client` [NPM package](https://apify.com/clockworks/tiktok-trends-scraper/api/javascript). To access the API using Python, use the `apify-client` [PyPI package](https://apify.com/clockworks/tiktok-trends-scraper/api/python).

Click on the [API tab](https://apify.com/clockworks/tiktok-trends-scraper/api/python) for code examples, or check out the [Apify API reference](https://docs.apify.com/api/v2) docs for all the details.

#### Can I use TikTok Trends Scraper through an MCP Server?

With Apify API, you can use almost any Actor in conjunction with an MCP server. You can connect to the MCP server using clients like ClaudeDesktop and LibreChat, or even build your own. Read all about how you can [set up Apify Actors with MCP](https://blog.apify.com/how-to-use-mcp/).

For the Instagram Hashtag Stats Scraper, go to the [MCP tab](https://apify.com/clockworks/tiktok-trends-scraper/api/mcp) and then go through the following steps:

1. Start a Server-Sent Events (SSE) session to receive a `sessionId`.
2. Send API messages using that `sessionId` to trigger the scraper.
3. The message starts the Instagram Hashtag Stats Scraper with the provided input.
4. The response should be: `Accepted`.

#### Is it legal to scrape trends from TikTok?

Our [TikTok scrapers](https://apify.com/clockworks) do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. Therefore, using TikTok Trends Scraper is perfectly legal.

However, you should be aware that your results could contain personal data. Personal data is protected by the [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) in the European Union and by other regulations around the world. You
should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

#### Your feedback

We’re always working on improving the performance of our Actors. If you have any technical feedback for [TikTok Trends Scraper](https://apify.com/clockworks/tiktok-trends-scraper) or found a bug, please create an issue on the Actor’s [Issues tab](https://apify.com/clockworks/tiktok-trends-scraper/issues/open).

### Error items

When the scraper cannot retrieve data for a given input — for example a profile is private or a post has been deleted — it pushes an **error item** to the dataset instead of silently skipping it. Normal output items are never affected; you can tell them apart by the presence of an `errorCode` field.

#### Error item structure

```json
{
    "url": "https://www.tiktok.com/@someuser",
    "input": "someuser",
    "error": "Profile is private",
    "errorCode": "PROFILE_PRIVATE"
}
```

#### Error codes reference

| `errorCode`                      | Meaning                                                        |
| -------------------------------- | -------------------------------------------------------------- |
| `NOT_FOUND`                      | Profile or hashtag does not exist                              |
| `POST_NOT_FOUND_OR_PRIVATE`      | Post URL is gone or private                                    |
| `POST_SENSITIVE`                 | Post is flagged as sensitive content                           |
| `NO_TRENDING_FOR_HASHTAG`        | No ads found for this hashtag                                  |
| `MUSIC_NOT_FOUND`                | No videos found for the music tag                              |
| `SEARCH_QUERY_NOT_FOUND`         | No videos found for the search query                           |
| `SEARCH_QUERY_PROFILE_NOT_FOUND` | No profiles found for the search query                         |
| `FILTER_NO_PASS`                 | Videos exist but none match the active date/popularity filters |
| `PROFILE_EMPTY`                  | Profile has no videos (or is behind a login wall)              |
| `PROFILE_REPOSTS_EMPTY`          | Profile has no reposts (or is behind a login wall)             |
| `PROFILE_VIDEOS_UNAVAILABLE`     | Profile has videos, but TikTok returned none (login wall)      |
| `PROFILE_FOLLOWING_EMPTY`        | Profile is not following anyone                                |
| `PROFILE_FOLLOWERS_EMPTY`        | Profile has no followers                                       |
| `PROFILE_PRIVATE`                | Profile is private                                             |
| `GOOGLE_RUN_NO_RESULTS`          | Google-assisted run returned no results                        |
| `TRENDING_EMPTY`                 | Trending page returned no results                              |
| `INVALID_INPUT`                  | Actor failed due to bad configuration (run is also terminated) |
| `INVALID_URLS`                   | One or more start URLs were malformed                          |

# Changelog

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

# Actor input Schema

## `adsScrapeHashtags` (type: `boolean`):

No description

## `resultsPerPage` (type: `integer`):

Maximum number of results we can scrape is approximately 100 for hashtags and sounds, and 500 for creators and videos.

## `adsCountryCode` (type: `string`):

Pick the country for which you want to scrape trending hashtags

## `adsTimeRange` (type: `string`):

Ignored for trending creators

## `adsHashtagIndustry` (type: `string`):

Filter trending hashtags by a specific industry. Applies if scraping hashtags from Ads Creative Center.

## `adsNewOnBoard` (type: `boolean`):

No description

## `adsScrapeSounds` (type: `boolean`):

No description

## `adsSoundsCountryCode` (type: `string`):

Pick the country for which you want to scrape trending songs

## `adsRankType` (type: `string`):

No description

## `adsApprovedForBusinessUse` (type: `boolean`):

No description

## `adsScrapeCreators` (type: `boolean`):

No description

## `adsCreatorsCountryCode` (type: `string`):

Pick the country for which you want to scrape trending creators

## `adsSortCreatorsBy` (type: `string`):

No description

## `adsFollowers` (type: `string`):

No description

## `adsAudienceCountry` (type: `string`):

For some regions TikTok might not provide any data, refer to https://ads.tiktok.com/business/creativecenter/inspiration/popular/creator/pc/en to see which regions are supported.

## `adsScrapeVideos` (type: `boolean`):

No description

## `adsVideosCountryCode` (type: `string`):

Pick the country for which you want to scrape trending videos

## `adsSortVideosBy` (type: `string`):

No description

## Actor input object example

```json
{
  "adsScrapeHashtags": true,
  "resultsPerPage": 100,
  "adsCountryCode": "US",
  "adsTimeRange": "7",
  "adsScrapeSounds": false,
  "adsSoundsCountryCode": "US",
  "adsRankType": "popular",
  "adsScrapeCreators": false,
  "adsCreatorsCountryCode": "US",
  "adsSortCreatorsBy": "follower",
  "adsScrapeVideos": false,
  "adsVideosCountryCode": "US",
  "adsSortVideosBy": "vv"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped data

# 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 = {
    "resultsPerPage": 100,
    "adsCountryCode": "US",
    "adsSoundsCountryCode": "US",
    "adsRankType": "popular",
    "adsCreatorsCountryCode": "US",
    "adsSortCreatorsBy": "follower",
    "adsVideosCountryCode": "US",
    "adsSortVideosBy": "vv"
};

// Run the Actor and wait for it to finish
const run = await client.actor("clockworks/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 = {
    "resultsPerPage": 100,
    "adsCountryCode": "US",
    "adsSoundsCountryCode": "US",
    "adsRankType": "popular",
    "adsCreatorsCountryCode": "US",
    "adsSortCreatorsBy": "follower",
    "adsVideosCountryCode": "US",
    "adsSortVideosBy": "vv",
}

# Run the Actor and wait for it to finish
run = client.actor("clockworks/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 '{
  "resultsPerPage": 100,
  "adsCountryCode": "US",
  "adsSoundsCountryCode": "US",
  "adsRankType": "popular",
  "adsCreatorsCountryCode": "US",
  "adsSortCreatorsBy": "follower",
  "adsVideosCountryCode": "US",
  "adsSortVideosBy": "vv"
}' |
apify call clockworks/tiktok-trends-scraper --silent --output-dataset

```

## MCP server setup

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