# 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:** 4 total users, 3 monthly users, 85.4% 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Trending Hashtags Scraper",
        "description": "[ 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.",
        "version": "1.0",
        "x-build-id": "AAl2Uy5xwsVarOCTh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ayen-data~tiktok-trending-hashtags-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ayen-data-tiktok-trending-hashtags-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ayen-data~tiktok-trending-hashtags-scraper/runs": {
            "post": {
                "operationId": "runs-sync-ayen-data-tiktok-trending-hashtags-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ayen-data~tiktok-trending-hashtags-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-ayen-data-tiktok-trending-hashtags-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "countryCode"
                ],
                "properties": {
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify proxy settings used for the run. Leave the proxy disabled unless you encounter blocking, since the scraper works without it.",
                        "default": {
                            "useApifyProxy": false,
                            "apifyProxyGroups": []
                        }
                    },
                    "countryCode": {
                        "title": "Country",
                        "enum": [
                            "AR",
                            "AU",
                            "AT",
                            "BH",
                            "BD",
                            "BY",
                            "BE",
                            "BR",
                            "BG",
                            "KH",
                            "CA",
                            "CL",
                            "CO",
                            "HR",
                            "CZ",
                            "DK",
                            "EG",
                            "EE",
                            "FI",
                            "FR",
                            "DE",
                            "GR",
                            "HU",
                            "IS",
                            "ID",
                            "IQ",
                            "IE",
                            "IL",
                            "IT",
                            "JP",
                            "JO",
                            "KZ",
                            "KW",
                            "LV",
                            "LB",
                            "LT",
                            "LU",
                            "MO",
                            "MY",
                            "MX",
                            "MA",
                            "MM",
                            "NL",
                            "NZ",
                            "NG",
                            "NO",
                            "OM",
                            "PK",
                            "PE",
                            "PH",
                            "PL",
                            "PT",
                            "QA",
                            "RO",
                            "SA",
                            "SG",
                            "SK",
                            "ZA",
                            "KR",
                            "ES",
                            "SE",
                            "CH",
                            "TW",
                            "TH",
                            "TR",
                            "UA",
                            "AE",
                            "GB",
                            "US",
                            "UZ",
                            "VN"
                        ],
                        "type": "string",
                        "description": "The country to scrape trending hashtags for.",
                        "default": "US"
                    },
                    "period": {
                        "title": "Time Period",
                        "enum": [
                            "7",
                            "30",
                            "120"
                        ],
                        "type": "string",
                        "description": "The time period over which hashtag trends are measured.",
                        "default": "7"
                    },
                    "maxItems": {
                        "title": "Maximum Items",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "The maximum number of hashtags to scrape per run. TikTok returns at most 100 hashtags for a given search.",
                        "default": 10
                    },
                    "industry": {
                        "title": "Industry",
                        "enum": [
                            "23000000000",
                            "10000000000",
                            "29000000000",
                            "11000000000",
                            "28000000000",
                            "15000000000",
                            "14000000000",
                            "17000000000",
                            "13000000000",
                            "12000000000",
                            "25000000000",
                            "26000000000",
                            "19000000000",
                            "18000000000",
                            "27000000000",
                            "21000000000",
                            "22000000000",
                            "24000000000"
                        ],
                        "type": "string",
                        "description": "Optionally filter trending hashtags by industry. Leave empty to include all industries."
                    },
                    "cookies": {
                        "title": "Session Cookies",
                        "type": "array",
                        "description": "Required to get the full trending list — without a logged-in session TikTok only returns the top 3 hashtags.\n\n1. Install the Cookie-Editor browser extension.\n2. Go to https://ads.tiktok.com and log in.\n3. Open the Cookie-Editor extension and export cookies as JSON.\n4. Paste the exported cookie contents here.\n\nCookies expire periodically and must be re-exported when a run reports an invalid session.",
                        "default": []
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
