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

Scrape TikTok trending data from TikTok Creative Center — trending hashtags, sounds/music, creators, and videos with engagement metrics, rankings, and trend direction. Filter by country (100+ supported) and time period (7, 30, or 120 days). No TikTok account required.

- **URL**: https://apify.com/automation-lab/tiktok-trends-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Social media
- **Stats:** 9 total users, 6 monthly users, 50.9% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## TikTok Trends Scraper

Extract real-time trending data from TikTok Creative Center — including trending hashtags, sounds/music, creators, and videos — with engagement metrics, rankings, and trend direction. No TikTok account required.

### What it does

TikTok Trends Scraper connects to TikTok's Creative Center (the official trend intelligence platform used by advertisers and marketers) and extracts trending data across four categories:

- **Trending Hashtags** — top challenges and hashtags with video counts, view totals, and trend direction (rising/falling/stable)
- **Trending Sounds** — top music tracks and sounds with play URLs, cover art, creator attribution, and usage counts
- **Trending Creators** — fastest-growing creators by follower count, with follower counts, like totals, video counts, and niche categories
- **Trending Videos** — top viral videos with view counts, likes, comments, shares, and direct video URLs

All results include country-specific filtering (100+ countries supported) and time period filtering (7, 30, or 120 days).

### Who is it for

**Content creators and marketers** — find trending hashtags before they peak to ride the wave of viral topics. Identify the sounds your target audience is using right now and create content that gets discovered.

**Brand managers and agencies** — run weekly trend monitoring across multiple countries in your pipeline. Track which hashtags competitors' audiences follow and plan campaigns around real engagement signals.

**Influencer marketing teams** — discover fast-rising creators early, before follower counts (and rates) spike. Filter by country to find regionally relevant talent with genuine audience growth.

**Data journalists and researchers** — track viral diffusion patterns across markets. Correlate trending sounds with cultural events or news cycles. Export structured data into your existing analysis tools.

**E-commerce sellers** — spot product-adjacent trends early. If a hashtag related to your niche is rising, create content or ads timed with the momentum window.

### Why use it

- **No TikTok account needed** — TikTok Creative Center is a public advertiser tool. No login, no API keys, no rate limits from your account.
- **Official data source** — Creative Center is TikTok's own trend intelligence platform, the same data advertisers pay to access.
- **Four data categories in one actor** — hashtags, sounds, creators, and videos from a single configurable run.
- **Country-level granularity** — 100+ countries supported. See what's trending in Japan vs. Brazil vs. Germany.
- **Structured output** — clean JSON ready for Google Sheets, BigQuery, Airtable, or custom dashboards.

### Use cases

- **Content strategy**: Identify trending topics to create content around before they peak
- **Hashtag research**: Find the highest-engagement hashtags for any niche in any country
- **Market research**: Track what sounds and creators are gaining traction in specific markets
- **Influencer discovery**: Find up-and-coming creators before they become expensive to partner with
- **Competitor analysis**: See which trends your competitors' target audience is following
- **Campaign planning**: Discover trending sounds eligible for commercial use in ad campaigns
- **News and journalism**: Track viral content and social media trends for reporting
- **Academic research**: Study viral diffusion patterns and content trends across markets

### How to use it

#### Step 1 — Select trend type

Choose what kind of trending data you need:

| Type | What you get |
|------|-------------|
| `hashtag` | Top trending hashtags with video counts and view totals |
| `sound` | Top trending music/sounds with audio URLs and usage stats |
| `creator` | Top trending creators by follower growth |
| `video` | Top trending videos with engagement metrics |

#### Step 2 — Set your location

Enter a two-letter ISO country code to get country-specific trends:

- `US` — United States (default)
- `GB` — United Kingdom
- `DE` — Germany
- `FR` — France
- `JP` — Japan
- `BR` — Brazil
- `IN` — India
- `AU` — Australia
- Leave as `US` or try `""` for broader results

#### Step 3 — Choose time period

Select the time window for trend measurement:

- `7` — Last 7 days (most current, default)
- `30` — Last 30 days (monthly trends)
- `120` — Last 120 days (quarterly trends)

#### Step 4 — Set max results

Set how many trending items to extract (1–100). TikTok Creative Center typically surfaces up to 100 items per category.

### Input configuration

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `trendType` | string | `hashtag` | Type: `hashtag`, `sound`, `creator`, or `video` |
| `countryCode` | string | `US` | ISO 2-letter country code |
| `period` | integer | `7` | Time period in days: 7, 30, or 120 |
| `maxResults` | integer | `30` | Number of results to extract (1–100) |

#### Example inputs

**Get top 50 trending hashtags in the US (last 7 days)**
```json
{
    "trendType": "hashtag",
    "countryCode": "US",
    "period": 7,
    "maxResults": 50
}
````

**Get top 20 trending sounds in the UK (last 30 days)**

```json
{
    "trendType": "sound",
    "countryCode": "GB",
    "period": 30,
    "maxResults": 20
}
```

**Get top 30 trending creators in Brazil**

```json
{
    "trendType": "creator",
    "countryCode": "BR",
    "period": 7,
    "maxResults": 30
}
```

**Get top 25 trending videos in Germany (last month)**

```json
{
    "trendType": "video",
    "countryCode": "DE",
    "period": 30,
    "maxResults": 25
}
```

### Output format

All results are stored in the dataset. Each item includes common fields plus type-specific fields.

#### Common fields (all types)

| Field | Type | Description |
|-------|------|-------------|
| `rank` | number | Position in the trending list (1 = most trending) |
| `type` | string | Trend type: `hashtag`, `sound`, `creator`, or `video` |
| `name` | string | Name/title of the trending item |
| `countryCode` | string | Country code used for the query |
| `period` | number | Time period in days |
| `scrapedAt` | string | ISO timestamp when data was scraped |

#### Hashtag output example

```json
{
    "rank": 1,
    "type": "hashtag",
    "name": "#fyp",
    "publishedVideoCount": 48200000,
    "videoViews": 12800000000,
    "trend": "rising",
    "trendingVideoUrls": [
        "https://www.tiktok.com/@username/video/1234567890"
    ],
    "countryCode": "US",
    "period": 7,
    "scrapedAt": "2025-01-15T10:30:00.000Z"
}
```

#### Sound output example

```json
{
    "rank": 1,
    "type": "sound",
    "name": "Espresso",
    "soundId": "7362164559887052574",
    "soundAuthor": "Sabrina Carpenter",
    "soundCover": "https://p16-sign-va.tiktokcdn.com/...",
    "soundPlayUrl": "https://sf16-ies-music.tiktokcdn.com/...",
    "duration": 179,
    "isOriginal": false,
    "linkedVideoUrl": "https://www.tiktok.com/music/x-7362164559887052574",
    "publishedVideoCount": 2800000,
    "videoViews": 0,
    "trend": "rising",
    "countryCode": "US",
    "period": 7,
    "scrapedAt": "2025-01-15T10:30:00.000Z"
}
```

#### Creator output example

```json
{
    "rank": 1,
    "type": "creator",
    "name": "Creator Name",
    "creatorId": "6784563861129756673",
    "creatorHandle": "@username",
    "creatorAvatarUrl": "https://p16-sign-va.tiktokcdn.com/...",
    "followerCount": 5200000,
    "followerGrowthRate": 0.142,
    "likeCount": 89000000,
    "videoCount": 342,
    "category": "Entertainment",
    "countryCode": "US",
    "period": 7,
    "scrapedAt": "2025-01-15T10:30:00.000Z"
}
```

#### Video output example

```json
{
    "rank": 1,
    "type": "video",
    "name": "Check out this incredible moment...",
    "videoId": "7318423157234567890",
    "videoUrl": "https://www.tiktok.com/@username/video/7318423157234567890",
    "videoCoverUrl": "https://p16-sign-va.tiktokcdn.com/...",
    "videoDesc": "Check out this incredible moment #viral #trending",
    "playCount": 45200000,
    "likeCountVideo": 3800000,
    "commentCount": 124000,
    "shareCount": 892000,
    "authorHandle": "@username",
    "authorName": "Creator Name",
    "hashtags": ["#viral", "#trending"],
    "soundName": "Original Sound",
    "countryCode": "US",
    "period": 7,
    "scrapedAt": "2025-01-15T10:30:00.000Z"
}
```

### Trend direction

The `trend` field indicates momentum based on the trend chart data provided by TikTok Creative Center:

| Value | Meaning |
|-------|---------|
| `rising` | Last data point > first data point by 10%+ |
| `falling` | Last data point < first data point by 10%+ |
| `stable` | Change within ±10% |

### Countries supported

TikTok Creative Center supports 100+ countries. Common country codes:

| Region | Code | Region | Code |
|--------|------|--------|------|
| United States | `US` | Japan | `JP` |
| United Kingdom | `GB` | South Korea | `KR` |
| Germany | `DE` | Brazil | `BR` |
| France | `FR` | Mexico | `MX` |
| Italy | `IT` | Argentina | `AR` |
| Spain | `ES` | Australia | `AU` |
| Netherlands | `NL` | Canada | `CA` |
| India | `IN` | Indonesia | `ID` |
| Thailand | `TH` | Philippines | `PH` |
| Vietnam | `VN` | Saudi Arabia | `SA` |

### Pricing

This actor uses pay-per-event (PPE) pricing — you only pay for results you actually get.

| Event | Price |
|-------|-------|
| Actor start | $0.05 (one-time per run) |
| Per trend item scraped | $0.015 (FREE tier) |

**Tiered discounts** — the more you use the platform, the less you pay per result:

| Tier | Price per item |
|------|---------------|
| FREE | $0.0150 |
| BRONZE | $0.0135 |
| SILVER | $0.0105 |
| GOLD | $0.0082 |
| PLATINUM | $0.0054 |
| DIAMOND | $0.0038 |

#### Cost examples

| Use case | Items | Cost (FREE tier) |
|----------|-------|-----------------|
| Quick trend check | 20 items | ~$0.35 |
| Daily monitoring | 50 items | ~$0.80 |
| Full category scan | 100 items | ~$1.55 |
| 4-category full scan | 400 items | ~$6.05 |

*All prices in USD. Costs decrease at higher subscription tiers.*

### Technical notes

#### How it works

This actor uses a Playwright-based browser automation approach to work around TikTok's ByteDance challenge system:

1. A browser session is established on TikTok Creative Center, which causes ByteDance's JavaScript challenge solver to run and create valid session tokens
2. The actor intercepts the Creative Center page's own API calls and modifies them to request the country, time period, and result count you specified
3. Response data is captured and normalized into structured output

This approach works because TikTok Creative Center is a public-facing tool for advertisers — no login is required.

#### Performance

- Typical run time: 30–90 seconds per run
- Memory: 4096MB (required for Playwright with residential proxy)
- Residential proxies used automatically for reliability

#### Limitations

- Maximum 100 results per category (TikTok Creative Center limit)
- Video trend type uses hashtag data with video-oriented filtering (TikTok does not expose a dedicated trending videos API via Creative Center)
- Trend data reflects TikTok Creative Center's view which may differ slightly from TikTok's main app
- Real-time data: each run fetches the latest data at time of execution

### Frequently asked questions

**Do I need a TikTok account?**
No. TikTok Creative Center is publicly accessible — no login required.

**How fresh is the data?**
Data is fetched live at the time of each run. TikTok updates Creative Center trend data daily.

**Can I monitor trends over time?**
Yes. Schedule the actor to run daily and save results to a dataset or spreadsheet integration. Use Apify's scheduling and Google Sheets integration for automated monitoring.

**What's the difference between period 7, 30, and 120?**
These are the time windows TikTok uses to calculate trend rankings. Period 7 reflects what's trending right now; period 120 shows longer-lasting trends.

**Why does the video type return hashtag-like data?**
TikTok Creative Center does not expose a dedicated trending videos API. The video category page on Creative Center internally uses the hashtag trend endpoint. For dedicated video scraping, consider using TikTok Scraper.

**What proxy type is used?**
Residential proxies are used automatically to ensure the Creative Center loads correctly and serves real trend data.

**Why do some runs return 0 items?**
TikTok's ByteDance challenge system occasionally blocks requests from certain proxy IPs. Retry the run — the actor uses residential proxies with automatic rotation, and most retries succeed. If failures persist, try a different country code.

**Is the data different from TikTok's main app trending page?**
Yes, slightly. Creative Center data is aggregated for advertiser use and may lag the main app by a few hours. It covers broader trends across the full platform rather than your personalized feed.

### Integrations

Connect TikTok trend data to your existing workflows:

- **Google Sheets** — Schedule daily hashtag monitoring runs and auto-export results to a Google Sheet for your content team using Apify's Google Sheets integration
- **Slack alerts** — Trigger a Slack notification when a tracked hashtag crosses a view threshold using Apify webhooks + Zapier
- **Airtable content calendar** — Push trending hashtags and sounds directly into an Airtable content planning database as new records
- **BigQuery / data warehouse** — Export runs to BigQuery for longitudinal trend analysis across weeks or months
- **Make (Integromat)** — Chain scraper output into downstream content scheduling tools or CRM enrichment workflows
- **Custom dashboards** — Use the Apify API to pull results into Grafana, Metabase, or Looker Studio for real-time trend monitoring

### API usage

You can trigger runs and fetch results programmatically using the Apify API.

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('automation-lab/tiktok-trends-scraper').call({
    trendType: 'hashtag',
    countryCode: 'US',
    period: 7,
    maxResults: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log('Trending hashtags:', items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')

run = client.actor('automation-lab/tiktok-trends-scraper').call(run_input={
    'trendType': 'hashtag',
    'countryCode': 'US',
    'period': 7,
    'maxResults': 50,
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print('Trending hashtags:', items)
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~tiktok-trends-scraper/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"trendType":"hashtag","countryCode":"US","period":7,"maxResults":50}'
```

Then fetch results:

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_API_TOKEN"
```

### Use with AI assistants (MCP)

You can use TikTok Trends Scraper directly from Claude, Cursor, VS Code, or any MCP-compatible AI assistant.

#### Claude Code

```bash
claude mcp add --transport http tiktok-trends "https://mcp.apify.com?tools=automation-lab/tiktok-trends-scraper&token=YOUR_API_TOKEN"
```

#### Claude Desktop / Cursor / VS Code

Add to your MCP settings JSON:

```json
{
  "mcpServers": {
    "tiktok-trends": {
      "url": "https://mcp.apify.com?tools=automation-lab/tiktok-trends-scraper&token=YOUR_API_TOKEN"
    }
  }
}
```

#### Example prompts

- *"What are the top 20 trending hashtags in the US right now?"*
- *"Find the top trending sounds in South Korea over the last 30 days"*
- *"Get the 10 fastest-growing TikTok creators in Brazil"*

### Is it legal to scrape TikTok Creative Center?

Yes. TikTok Creative Center is a publicly accessible platform — no authentication is required to view trend data. This actor accesses only public pages intended for advertisers and marketers. No personal user data is collected or processed. The actor does not circumvent paywalls or access private content.

Always review TikTok's terms of service and applicable laws in your jurisdiction before use. This actor is intended for research, marketing analysis, and business intelligence purposes.

### Related scrapers

- [TikTok Scraper](https://apify.com/automation-lab/tiktok-scraper) — Scrape TikTok profiles, videos, comments, and search results
- [TikTok Comments Scraper](https://apify.com/automation-lab/tiktok-comments-scraper) — Extract comments from TikTok videos with author info and engagement metrics
- [Instagram Trends Scraper](https://apify.com/automation-lab/instagram-scraper) — Track trending hashtags and content on Instagram

### Support

For questions or issues, please use the actor's GitHub Issues page or contact the developer through Apify's support channels.

# Actor input Schema

## `trendType` (type: `string`):

What type of trending data to scrape: hashtags, sounds (music), creators, or videos.

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

Country/region to get trending data for. Use ISO 2-letter country codes (US, GB, DE, FR, JP, BR, etc). Leave empty for worldwide.

## `period` (type: `integer`):

Time period for trending data. 7 = last 7 days, 30 = last 30 days, 120 = last 120 days.

## `maxResults` (type: `integer`):

Maximum number of trending items to extract. TikTok Creative Center typically has up to 100 items per category.

## Actor input object example

```json
{
  "trendType": "hashtag",
  "countryCode": "US",
  "period": 7,
  "maxResults": 20
}
```

# Actor output Schema

## `trends` (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 = {
    "trendType": "hashtag",
    "countryCode": "US",
    "period": 7,
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/tiktok-trends-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "trendType": "hashtag",
    "countryCode": "US",
    "period": 7,
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/tiktok-trends-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 '{
  "trendType": "hashtag",
  "countryCode": "US",
  "period": 7,
  "maxResults": 20
}' |
apify call automation-lab/tiktok-trends-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Trends Scraper",
        "description": "Scrape TikTok trending data from TikTok Creative Center — trending hashtags, sounds/music, creators, and videos with engagement metrics, rankings, and trend direction. Filter by country (100+ supported) and time period (7, 30, or 120 days). No TikTok account required.",
        "version": "0.1",
        "x-build-id": "h1XyXfOUuokoNayQT"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~tiktok-trends-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-tiktok-trends-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/automation-lab~tiktok-trends-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-tiktok-trends-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/automation-lab~tiktok-trends-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-tiktok-trends-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": [
                    "trendType"
                ],
                "properties": {
                    "trendType": {
                        "title": "📊 Trend type",
                        "enum": [
                            "hashtag",
                            "sound",
                            "creator",
                            "video"
                        ],
                        "type": "string",
                        "description": "What type of trending data to scrape: hashtags, sounds (music), creators, or videos.",
                        "default": "hashtag"
                    },
                    "countryCode": {
                        "title": "🌍 Country",
                        "type": "string",
                        "description": "Country/region to get trending data for. Use ISO 2-letter country codes (US, GB, DE, FR, JP, BR, etc). Leave empty for worldwide.",
                        "default": "US"
                    },
                    "period": {
                        "title": "📅 Time period (days)",
                        "minimum": 7,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Time period for trending data. 7 = last 7 days, 30 = last 30 days, 120 = last 120 days.",
                        "default": 7
                    },
                    "maxResults": {
                        "title": "🔢 Max results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of trending items to extract. TikTok Creative Center typically has up to 100 items per category.",
                        "default": 30
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
