# Tiktok Trending Scraper (`xtracto/tiktok-trending-scraper`) Actor

Discover TikTok trends in real time hashtags, creators, viral videos, and music across 70+ countries with fast HTTP-only extraction - no login or proxy required

- **URL**: https://apify.com/xtracto/tiktok-trending-scraper.md
- **Developed by:** [Xtractoo](https://apify.com/xtracto) (community)
- **Categories:** Lead generation, Social media, Other
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.75 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Creative Center Trending Scraper

Scrapes trending **hashtags**, **creators**, **videos**, and **music** from TikTok using HTTP requests only — no browser, no login required.

### Features

- **4 content types**: hashtags, creators, trending videos, and trending music/sounds
- **Region filter**: Country-specific trends for 70+ countries (US, ID, JP, GB, BR, KR, DE, FR, etc.)
- **Time period**: 7, 30, or 120 days
- **Industry filter**: Filter hashtags by 18 industry verticals
- **Sort options**: Multiple sort modes per content type
- **Full pagination**: Up to 100 items for hashtag/creator, ~99 for music, unlimited for video
- **No login** · **No proxy needed** · **HTTP-only**

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `content_type` | string | `hashtag` | Content type: `hashtag`, `creator`, `video`, or `music` |
| `country_code` | string | _(empty)_ | ISO country code (e.g. `US`, `ID`, `GB`). Empty = global (not supported by `music`) |
| `period` | string | `7` | Trending window: `7`, `30`, or `120` days |
| `industry_id` | string | _(empty)_ | Industry filter ID — hashtag only (see below). Empty = all |
| `sort_by` | string | `popular` | Hashtag: `popular` / `rise`. Creator: `follower` / `engagement` / `avg_views` |
| `limit` | integer | `20` | Max results (hashtag/creator: 1–100; music: 1–99; video: 1–500) |

#### Content Type Details

| Type | Source | Max Items | Country | Period |
|------|--------|-----------|---------|--------|
| `hashtag` | CC Creative Radar API | 100 | ✅ 71 countries | ✅ 7/30/120d |
| `creator` | CC Creative Radar API | 100 | ✅ 24 countries | ✅ 7/30/120d |
| `video` | TikTok Explore API | 500+ | ✅ (region filter) | ❌ |
| `music` | CC Sound Rank API | 99 | ✅ 70+ countries | ✅ 7/30/120d |

#### Industry IDs (hashtag only)

| ID | Industry |
|----|----------|
| `22000000000` | Apparel & Accessories |
| `14000000000` | Food & Beverage |
| `28000000000` | Sports & Outdoor |
| `24000000000` | Beauty & Personal Care |
| `26000000000` | Electronics |
| `16000000000` | Gaming |
| `30000000000` | Home & Garden |
| `20000000000` | Education |
| `13000000000` | Financial Services |
| `17000000000` | Travel |

### Output

Raw JSON from TikTok/Creative Center APIs plus metadata fields:

| Field | Description |
|-------|-------------|
| `_rank` | Rank position (1 = most trending) |
| `_source` | `api`, `html_ssr`, `explore_api`, or `cc_music_api` |
| `_input` | Input parameters used |

#### Hashtag example

```json
{
  "hashtag_id": "18425",
  "hashtag_name": "barcelona",
  "country_info": { "id": "US", "value": "United States" },
  "industry_info": { "id": 28000000000, "value": "Sports & Outdoor" },
  "is_promoted": false,
  "trend": [{ "time": 1775692800, "value": 0.66 }],
  "_rank": 1
}
````

#### Creator example

```json
{
  "nick_name": "Kris HC",
  "avatar_url": "https://...",
  "country_code": "CA",
  "follower_cnt": 50124494,
  "liked_cnt": 2446759288,
  "tt_link": "https://www.tiktok.com/@kallmekris",
  "items": [{ "item_id": "7442381031279201592", "cover_url": "..." }],
  "_rank": 1
}
```

#### Video example

```json
{
  "id": "7627552550065147144",
  "desc": "trending video caption...",
  "author": { "uniqueId": "snapfactsss1", "nickname": "Snap Facts" },
  "stats": { "playCount": 8000000, "diggCount": 1200000, "commentCount": 3400 },
  "music": { "title": "original sound", "authorName": "snapfactsss1" },
  "video": { "playAddr": "https://...", "cover": "https://..." },
  "_rank": 1
}
```

#### Music example

```json
{
  "song_id": "7559027485885302801",
  "clip_id": "7587950153454177041",
  "title": "Ora Urus",
  "author": "Toton Caribo & Justy Aldrin",
  "cover": "https://p16-sg.tiktokcdn.com/...",
  "link": "https://www.tiktok.com/music/x-7587950153454177041",
  "rank": 1,
  "rank_diff": null,
  "trend": [{ "time": 1774051200, "value": 0 }],
  "related_items": [{ "item_id": "...", "cover_uri": "..." }],
  "_rank": 1
}
```

### Example Inputs

**Trending hashtags in Indonesia:**

```json
{ "content_type": "hashtag", "country_code": "ID", "period": "7", "limit": 50 }
```

**Top creators in the US by engagement:**

```json
{ "content_type": "creator", "country_code": "US", "period": "30", "sort_by": "engagement", "limit": 20 }
```

**Trending videos (global):**

```json
{ "content_type": "video", "limit": 30 }
```

**Trending music in Japan (30 days):**

```json
{ "content_type": "music", "country_code": "JP", "period": "30", "limit": 50 }
```

# Actor input Schema

## `content_type` (type: `string`):

Type of trending content to scrape. Hashtag: trending hashtags with industry filters. Creator: trending creators with engagement metrics. Video: trending/explore videos from TikTok. Music: trending sounds/songs from Creative Center.

## `country_code` (type: `string`):

ISO country code to filter trends by region. Leave empty for global. Hashtag supports 71 countries, Creator supports 24. Examples: US, GB, ID, JP, BR, DE, FR, KR, MX, AU.

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

Trending window in days. Used by hashtag, creator, and music content types.

## `industry_id` (type: `string`):

Filter hashtag trends by industry. Leave empty for all. Examples: 22000000000 (Apparel), 28000000000 (Sports & Outdoor), 14000000000 (Food & Beverage), 13000000000 (Financial Services), 17000000000 (Travel).

## `sort_by` (type: `string`):

Hashtag: 'popular' or 'rise'. Creator: 'follower', 'engagement', or 'avg\_views'. Defaults to 'popular' for hashtag and 'follower' for creator. Ignored for video and music.

## `limit` (type: `integer`):

Maximum number of items to return. Hashtag/Creator: up to 100. Video: up to 500. Music: up to 99.

## Actor input object example

```json
{
  "content_type": "hashtag",
  "country_code": "",
  "period": "7",
  "industry_id": "",
  "sort_by": "popular",
  "limit": 20
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/tiktok-trending-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 = {}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tiktok Trending Scraper",
        "description": "Discover TikTok trends in real time hashtags, creators, viral videos, and music across 70+ countries with fast HTTP-only extraction - no login or proxy required",
        "version": "1.0",
        "x-build-id": "aoKYoZknx5CBkS8ie"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xtracto~tiktok-trending-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xtracto-tiktok-trending-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/xtracto~tiktok-trending-scraper/runs": {
            "post": {
                "operationId": "runs-sync-xtracto-tiktok-trending-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/xtracto~tiktok-trending-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-xtracto-tiktok-trending-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",
                "properties": {
                    "content_type": {
                        "title": "Content Type",
                        "enum": [
                            "hashtag",
                            "creator",
                            "video",
                            "music"
                        ],
                        "type": "string",
                        "description": "Type of trending content to scrape. Hashtag: trending hashtags with industry filters. Creator: trending creators with engagement metrics. Video: trending/explore videos from TikTok. Music: trending sounds/songs from Creative Center.",
                        "default": "hashtag"
                    },
                    "country_code": {
                        "title": "Country / Region",
                        "type": "string",
                        "description": "ISO country code to filter trends by region. Leave empty for global. Hashtag supports 71 countries, Creator supports 24. Examples: US, GB, ID, JP, BR, DE, FR, KR, MX, AU.",
                        "default": ""
                    },
                    "period": {
                        "title": "Time Period (days)",
                        "enum": [
                            "7",
                            "30",
                            "120"
                        ],
                        "type": "string",
                        "description": "Trending window in days. Used by hashtag, creator, and music content types.",
                        "default": "7"
                    },
                    "industry_id": {
                        "title": "Industry Filter ID (hashtag only)",
                        "type": "string",
                        "description": "Filter hashtag trends by industry. Leave empty for all. Examples: 22000000000 (Apparel), 28000000000 (Sports & Outdoor), 14000000000 (Food & Beverage), 13000000000 (Financial Services), 17000000000 (Travel).",
                        "default": ""
                    },
                    "sort_by": {
                        "title": "Sort By",
                        "type": "string",
                        "description": "Hashtag: 'popular' or 'rise'. Creator: 'follower', 'engagement', or 'avg_views'. Defaults to 'popular' for hashtag and 'follower' for creator. Ignored for video and music.",
                        "default": "popular"
                    },
                    "limit": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of items to return. Hashtag/Creator: up to 100. Video: up to 500. Music: up to 99.",
                        "default": 20
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
