# Tiktok Trending Hashtags Analytics (`codebyte/tiktok-trending-hashtags-analytics`) Actor

Unlock TikTok's trending hashtags with comprehensive analytics and audience insights. Gather data on hashtag performance, audience demographics and related trends to supercharge your TikTok content strategy.

- **URL**: https://apify.com/codebyte/tiktok-trending-hashtags-analytics.md
- **Developed by:** [Codebyte](https://apify.com/codebyte) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 439 total users, 40 monthly users, 100.0% runs succeeded, 24 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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.

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

## TikTok Trending Hashtags Analytics

Discover new trends on TikTok through hashtags.
Get comprehensive analytics and insights for TikTok hashtags. This actor helps you understand hashtag performance, audience demographics, and related trends to optimize your TikTok content strategy.

### Key Features
- Track hashtag popularity and interest over time
- Analyze audience demographics and age distribution
- Discover related interests and regional popularity
- Find trending hashtags, related videos and creators

Perfect for social media managers, content creators, and marketing professionals who want to leverage data-driven insights for their TikTok strategy.

## Input
To start, select the type of result you want to retrieve.

#### Top 100 ranking only
Retrieve the top 100 trending hashtags for a given country and time frame.
```json
{
    "result_type": "top100",
    "country": "US",
    "top100_period": "7"
}
````

#### Example output

```json
[
    {
        "hashtag_id": "73422076",
        "hashtag_name": "lemon8",
        "country_info": {
            "id": "US",
            "value": "United States",
            "label": "US"
        },
        "industry_info": {
            "id": 22000000000,
            "value": "Apparel & Accessories",
            "label": "label_22000000000"
        },
        "is_promoted": false,
        "trend": [
            {
                "time": 1736121600,
                "value": 0.51
            },
            ...
        ],
        "publish_cnt": 33723,
        "video_views": 109725286,
        "rank": 2,
        "rank_diff_type": 4,
        "period": "7",
        "rank_change_readable": "New"
    },
    ...
]

```

#### Top 100 ranking including hashtag analytics

Retrieve the top 100 trending hashtags for a given country and time frame, including hashtag analytics.

```json
{
    "result_type": "top100_with_analytics",
    "country": "US",
    "top100_period": "7"
}
```

#### Example output excerpt

```json
{
    ...
    "analytics": {
            "hashtag_id": "73422076",
            "hashtag_name": "lemon8",
            "video_url": "https://www.tiktok.com/tag/lemon8",
            "country_info": {
                "id": "US",
                "value": "United States",
                "label": "US"
            },
            "industry_info": {
                "id": 22000000000,
                "value": "Apparel & Accessories",
                "label": "label_22000000000"
            },
            "is_promoted": false,
            "trend": [
                {
                    "time": 1736121600,
                    "value": 0.51
                },
                ...
            ],
            "publish_cnt": 33723,
            "video_views": 109725286,
            "publish_cnt_all": 845759,
            "video_views_all": 11525091465,
            "longevity": {
                "popular_days": 0,
                "current_popularity": 0
            },
            "audience_interests": [
                {
                    "interest_info": {
                        "id": "10095",
                        "label": "diversify_10095",
                        "value": "Software & APPs"
                    },
                    "score": 144
                },
                ...
            ],
            "audience_countries": [
                {
                    "country_info": {
                        "id": "1861060",
                        "label": "JP",
                        "value": "Japan"
                    },
                    "score": 687
                },
                {
                    "country_info": {
                        "id": "6252001",
                        "label": "US",
                        "value": "United States"
                    },
                    "score": 587
                },
                ...
            ],
            "related_hashtags": [
                {
                    "hashtag_id": "7215354503279673386",
                    "hashtag_name": "lemon8us",
                    "video_url": "https://www.tiktok.com/tag/lemon8us"
                },
                ...
            ],
            "related_items": [
                {
                    "item_id": 7457131733473955000,
                    "cover_uri": "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068c799-us/o4GfQgAX6QqfbMFAMmi6zegGagGfM86Kof17s6~tplv-noop.image?x-expires=1736792067&x-signature=4zr4A1oDQPJ%2BhjRGSD7Zud5AyO8%3D"
                },
                ...
            ],
            "audience_ages_readable": [
                {
                    "age_range": "18-24",
                    "score": 52
                },
                {
                    "age_range": "35+",
                    "score": 25
                },
                {
                    "age_range": "25-35",
                    "score": 23
                }
            ]
        }
}
```

#### Hashtag analytics only

Retrieve detailed analytics for a custom list of hashtags.

```json
{
    "result_type": "analytics",
    "country": "US",
    "analytics_period": "30",
    "hashtags": ["lemon8", "lemonade", "lemonadechallenge"]
}
```

If a hashtag you provide is not popular enough (in this country and period), TikTok will not return any data for this hashtag.

## Insights that hashtag analytics can provide

### Interest over time

Each data point compares the relative volume against the peak volume of the trend. A value of 100 is the peak popularity for the trend.

### Audience insights

Information about viewers that watch videos associated with this trending hashtag.

#### Age range

The approximate percentage of viewers associated with different age ranges. Only available for age ranges above 18 years old.

#### Related interests

The top interests associated with viewers of this trend. The value represents an index score. Example: If the score is 200, the interest category is 2x as popular with viewers of this trend compared to its average popularity on TikTok worldwide.

#### Regional popularity

The top locations in the world where this term is most popular. The value represents an index score. Example: If the score is 200, the trend is 2x as popular in this market compared to its average popularity on TikTok worldwide.

#### Related videos

Trending videos that use this hashtag in the selected region and time frame.

#### Related hashtags

Trending hashtags that are related to this hashtag.

#### Trending creators

Trending creators who post this hashtag.

# Actor input Schema

## `result_type` (type: `string`):

Select the type of result you want to actor to retrieve.
Top 100 ranking only.
Top 100 ranking including hashtag analytics.
Hashtag analytics for a custom list of hashtags.

## `country` (type: `string`):

Select the country (or All for global) for which you want to retrieve the top 100 ranking / hashtag analytics.

## `top100_period` (type: `string`):

Select the period for which you want to retrieve the top 100 ranking.

## `analytics_period` (type: `string`):

Select the period for which you want to retrieve the hashtag analytics.

## `top100_industry` (type: `string`):

Filter top 100 ranking by industry.

## `top100_new_on_board` (type: `boolean`):

For top 100 ranking, only return entries that are new to the top 100 for this period.

## `hashtag_list` (type: `array`):

List of hashtags for which you want to retrieve analytics.

## Actor input object example

```json
{
  "result_type": "top100",
  "country": "ALL",
  "top100_period": "7",
  "top100_new_on_board": false
}
```

# 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 = {
    "result_type": "top100"
};

// Run the Actor and wait for it to finish
const run = await client.actor("codebyte/tiktok-trending-hashtags-analytics").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 = { "result_type": "top100" }

# Run the Actor and wait for it to finish
run = client.actor("codebyte/tiktok-trending-hashtags-analytics").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 '{
  "result_type": "top100"
}' |
apify call codebyte/tiktok-trending-hashtags-analytics --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tiktok Trending Hashtags Analytics",
        "description": "Unlock TikTok's trending hashtags with comprehensive analytics and audience insights. Gather data on hashtag performance, audience demographics and related trends to supercharge your TikTok content strategy.",
        "version": "0.0",
        "x-build-id": "7u6fAWGPKpe5dkQNa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codebyte~tiktok-trending-hashtags-analytics/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codebyte-tiktok-trending-hashtags-analytics",
                "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/codebyte~tiktok-trending-hashtags-analytics/runs": {
            "post": {
                "operationId": "runs-sync-codebyte-tiktok-trending-hashtags-analytics",
                "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/codebyte~tiktok-trending-hashtags-analytics/run-sync": {
            "post": {
                "operationId": "run-sync-codebyte-tiktok-trending-hashtags-analytics",
                "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": [
                    "result_type"
                ],
                "properties": {
                    "result_type": {
                        "title": "Result type",
                        "enum": [
                            "top100",
                            "top100_with_analytics",
                            "analytics"
                        ],
                        "type": "string",
                        "description": "Select the type of result you want to actor to retrieve. \nTop 100 ranking only. \nTop 100 ranking including hashtag analytics. \nHashtag analytics for a custom list of hashtags."
                    },
                    "country": {
                        "title": "Country",
                        "enum": [
                            "ALL",
                            "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": "Select the country (or All for global) for which you want to retrieve the top 100 ranking / hashtag analytics.",
                        "default": "ALL"
                    },
                    "top100_period": {
                        "title": "Top 100 ranking period in days",
                        "enum": [
                            "7",
                            "30",
                            "120"
                        ],
                        "type": "string",
                        "description": "Select the period for which you want to retrieve the top 100 ranking.",
                        "default": "7"
                    },
                    "analytics_period": {
                        "title": "Hashtag analytics period in days",
                        "enum": [
                            "7",
                            "30",
                            "120",
                            "365",
                            "1095"
                        ],
                        "type": "string",
                        "description": "Select the period for which you want to retrieve the hashtag analytics."
                    },
                    "top100_industry": {
                        "title": "Top 100 industry filter",
                        "enum": [
                            "24000000000",
                            "15000000000",
                            "19000000000",
                            "22000000000",
                            "18000000000",
                            "25000000000",
                            "10000000000",
                            "29000000000",
                            "12000000000",
                            "21000000000",
                            "17000000000",
                            "27000000000",
                            "28000000000",
                            "13000000000",
                            "23000000000",
                            "26000000000",
                            "11000000000",
                            "14000000000"
                        ],
                        "type": "string",
                        "description": "Filter top 100 ranking by industry."
                    },
                    "top100_new_on_board": {
                        "title": "New to top 100 only",
                        "type": "boolean",
                        "description": "For top 100 ranking, only return entries that are new to the top 100 for this period.",
                        "default": false
                    },
                    "hashtag_list": {
                        "title": "List of hashtags (result_type = analytics)",
                        "type": "array",
                        "description": "List of hashtags for which you want to retrieve analytics.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
