# TikTok Trends API

Lets your agent pull hashtag history, growth percentages and a live trending list from TikTok. Handy when you want demand data before committing to a content idea.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 2
- Author: trendsapi-ai
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/trendsapi-ai/tiktok-trends-api
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/mcp/tiktok-trends-api

## What it does

The server talks to trendsapi.ai and returns three kinds of data: a time series for a keyword, growth over chosen windows, and the current hot hashtag feed. Values in the series are a 0-100 index for that hashtag, not view counts. Growth windows come as presets such as `3M`, `12M` or `YTD`, or as custom date pairs. Asking for several windows at once still bills as a single request.

Python and JavaScript clients both exist. Python needs 3.9+ and installs with `pip install trendsapi-tiktok`; the key goes into `TRENDSAPI_KEY`. Sync and async clients are available, and you can drop results into pandas with `asdict`. The JS package is `npm install trendsapi-tiktok` and runs on Node 18+, Deno, Bun and Workers. One key covers both the SDKs and raw HTTP.

Spelling matters: `source` must be lowercase (`tiktok`) while `type` has to match exactly (`TikTok Trending Hashtags`). Get either wrong and the call returns 400. Missing `TRENDSAPI_KEY` gives 401, and a 404 for an unknown keyword is not worth retrying. Publishing videos is out of scope here — this is demand data only.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Remote server: `https://tiktok.api.trendsapi.ai/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http tiktok-trends-api https://tiktok.api.trendsapi.ai/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add tiktok-trends-api --url https://tiktok.api.trendsapi.ai/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "tiktok-trends-api": {
            "url": "https://tiktok.api.trendsapi.ai/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "tiktok-trends-api": {
            "type": "http",
            "url": "https://tiktok.api.trendsapi.ai/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http tiktok-trends-api https://tiktok.api.trendsapi.ai/mcp
```

## When to use it
- chart how interest in a hashtag moved over a year
- compare growth of two topics across windows
- load a series into pandas and average it monthly
- fetch today's hot hashtags
- check demand for a niche before filming

## Example prompts
- Show me the matcha hashtag trend for the last 12 months
- Compare matcha growth over 3M and 12M and tell me the direction
- List the top 10 trending TikTok hashtags

## Similar
- [TikTok Trends MCP](https://affpapa.org/en/nevibecode/mcp/tiktok-trends-mcp.md) — MCP server · ★ 1
- [Reddit Trends API](https://affpapa.org/en/nevibecode/mcp/reddit-trends-api.md) — MCP server
- [App Store Trends API](https://affpapa.org/en/nevibecode/mcp/app-store-trends-api.md) — MCP server
- [News Sentiment Trends MCP](https://affpapa.org/en/nevibecode/mcp/news-sentiment-trends-mcp.md) — MCP server · ★ 1
- [discovering-viral-tiktok-content-trends](https://affpapa.org/en/nevibecode/skills/discovering-viral-tiktok-content-trends.md) — skill · 777 installs
- [finding-tiktok-creators-using-trending-sounds](https://affpapa.org/en/nevibecode/skills/finding-tiktok-creators-using-trending-sounds.md) — skill · 813 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
