# TikTok Trending Hashtags Scraper (`ayen-data/tiktok-trending-hashtags-scraper`) Actor

\[ Faster + Cheaper] Scrapes trending hashtags from TikTok Creative Center by country, time period, and industry, including rank, post and video-view counts, popularity trend, and top creators.

- **URL**: https://apify.com/ayen-data/tiktok-trending-hashtags-scraper.md
- **Developed by:** [Anyx Solutions](https://apify.com/ayen-data) (community)
- **Categories:** Social media, SEO tools, Developer tools
- **Stats:** 6 total users, 5 monthly users, 75.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![banner](https://i.ibb.co/ksf5fC0C/Screenshot-2026-06-20-at-2-48-37-PM.png)

## TikTok Trending Hashtags Scraper

**Discover what's trending on TikTok — extract trending hashtags by country, time period, and industry at scale.**

The TikTok Trending Hashtags Scraper pulls structured data from TikTok Creative Center: hashtag rank, public post counts, video views, popularity trend over time, and top creators. It's built for marketers, content creators, agencies, and researchers tracking what resonates on TikTok.

### ⚡ Quick start

```json
{
  "countryCode": "FR",
  "period": "7",
  "industry": "23000000000",
  "maxItems": 100,
  "cookies": [{ "name": "sessionid", "value": "<session-value>" }]
}
```

> **Session cookies (optional but recommended):** Without an authenticated session, only the top 3 trending hashtags are returned. To scrape the full list, provide your exported TikTok Creative Center session cookies. Cookies expire periodically — when a run reports an invalid or expired session, re-export and update them.
>
> **How to obtain your cookies:**
>
> 1. Install the [**Cookie-Editor** Chrome extension](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm).
> 2. Log in at [TikTok Creative Center](https://ads.tiktok.com/business/creativecenter/inspiration/popular/hashtag/pc/en).
> 3. Open the **Cookie-Editor** extension and **export your cookies** in **JSON format**.
> 4. Paste the exported cookie data into the **Session Cookies** input field.

### 🧩 Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `countryCode` | string | yes | `US` | ISO country code to scrape trending hashtags for (e.g. `US`, `GB`, `TR`). |
| `period` | string | yes | `7` | Time window in days: `7`, `30`, or `120`. |
| `industry` | string | no | — | Industry ID to filter hashtags (e.g. `23000000000` for News Entertainment). |
| `maxItems` | integer | no | `10` | Maximum hashtags to scrape (TikTok caps results at 100 per search). |
| `cookies` | array | string | no | — | Exported TikTok session cookies (Cookie-Editor JSON). Unlocks the full list. |
| `proxyConfiguration` | object | no | `{ "useApifyProxy": false }` | Apify proxy settings. |

### 📤 Output

Each scraped hashtag is pushed to the dataset as one record.

#### Fields

Each record contains the hashtag data plus the query context
(`countryCode`, `period`) and a direct `url`.

| Field | Type | Description |
|---|---|---|
| `hashtagId` | string | Unique hashtag identifier. |
| `hashtagName` | string | Hashtag name. |
| `industryIds` | array | Industry category IDs the hashtag belongs to. |
| `rank` | number | Popularity rank of the hashtag. |
| `publishCount` | number | Number of public posts using the hashtag. |
| `videoViews` | number | Total views of videos using the hashtag. |
| `popularityCurve` | array | Popularity over time (`{ timestamp, popularity }` points; `popularity` is a 0–100 index). |
| `topCreators` | array | Top creators (`creatorId`, `tiktokUserId`, `handle`, `nickname`, `avatarUrl`, `countryCode`, `rank`, `followerCount`). |
| `countryCode` | string | Country code used for the query. |
| `period` | string | Time window used for the query. |
| `url` | string | null | Direct link to the hashtag on TikTok. |

<details><summary>Example output</summary>

```json
{
  "hashtagId": "36936454",
  "hashtagName": "olivertree",
  "industryIds": [23000000000],
  "rank": 1,
  "publishCount": 100680,
  "videoViews": 1242726485,
  "popularityCurve": [
    { "timestamp": "1781395200", "popularity": 42.18 },
    { "timestamp": "1781481600", "popularity": 100 }
  ],
  "topCreators": [
    {
      "creatorId": "0",
      "tiktokUserId": "6676194683532821509",
      "handle": "olivertree",
      "nickname": "Oliver Tree",
      "avatarUrl": "https://p16-common-sign.tiktokcdn.com/...",
      "countryCode": "US",
      "rank": 1,
      "followerCount": 22255310
    }
  ],
  "countryCode": "US",
  "period": "7",
  "url": "https://www.tiktok.com/tag/olivertree"
}
```

</details>

### 💡 Use cases

- **Marketers** track trending hashtags to inform campaign and content strategy.
- **Creators** find high-momentum hashtags to grow reach in their niche.
- **Agencies** monitor competition and trends across countries and industries.
- **Researchers** analyze popularity trends and creator activity over time.

### ❓ FAQ

- **How do I find trending hashtags on TikTok?** Choose a country, time period, and (optionally) an industry, then run the scraper to get the ranked trending list.
- **Is there a trending hashtags API for TikTok?** This scraper delivers TikTok's trending hashtags as structured, ready-to-use data you can pull on demand.
- **Why do I only get 3 results?** Without session cookies, only the public top 3 hashtags are returned. Add exported cookies to unlock the full list.
- **What if TikTok changes its site?** We maintain the scraper and update it when major changes affect functionality.

### 🔗 More scrapers by Anyx

- [Google Ads Scraper](https://apify.com/anyxsolutions/tiktok-trending-creators-scraper)
- [Tiktok Ads Scraper](https://apify.com/anyxsolutions/tiktok-ads-scraper)
- [Youtube Channel Scraper](https://apify.com/anyxsolutions/tiktok-trending-creators-scraper)

### 🤝 Anyx Solutions

Anyx Solutions is an Apify Partner. We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

# Actor input Schema

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

Apify proxy settings used for the run. Leave the proxy disabled unless you encounter blocking, since the scraper works without it.

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

The country to scrape trending hashtags for.

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

The time period over which hashtag trends are measured.

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

The maximum number of hashtags to scrape per run. TikTok returns at most 100 hashtags for a given search.

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

Optionally filter trending hashtags by industry. Leave empty to include all industries.

## `cookies` (type: `array`):

Required to get the full trending list — without a logged-in session TikTok only returns the top 3 hashtags.

1. Install the Cookie-Editor browser extension.
2. Go to https://ads.tiktok.com and log in.
3. Open the Cookie-Editor extension and export cookies as JSON.
4. Paste the exported cookie contents here.

Cookies expire periodically and must be re-exported when a run reports an invalid session.

## Actor input object example

```json
{
  "proxyConfiguration": {
    "useApifyProxy": false,
    "apifyProxyGroups": []
  },
  "countryCode": "US",
  "period": "7",
  "maxItems": 10,
  "cookies": []
}
```

# Actor output Schema

## `overview` (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 = {
    "countryCode": "US",
    "period": "7",
    "cookies": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("ayen-data/tiktok-trending-hashtags-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 = {
    "countryCode": "US",
    "period": "7",
    "cookies": [],
}

# Run the Actor and wait for it to finish
run = client.actor("ayen-data/tiktok-trending-hashtags-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "countryCode": "US",
  "period": "7",
  "cookies": []
}' |
apify call ayen-data/tiktok-trending-hashtags-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ayen-data/tiktok-trending-hashtags-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/QzB0efn9EPSofahEc/builds/AAl2Uy5xwsVarOCTh/openapi.json
