About X (Twitter) Trends API
X (Twitter) Trends API is a hosted trend service for applications and agents that need X topic data. It provides weekly history, growth metrics, and live rankings through a remote MCP server.
Key features
- 01Retrieve weekly topic history
- 02Calculate topic growth
- 03Fetch live trend rankings
- 04Provide a REST API
Use cases
- 01Track changes in X discussion volume
- 02Compare topic growth across periods
- 03Check currently trending topics
MCP support
The remote MCP server at `https://api.trendsapi.ai/mcp` exposes `get_trends`, `get_growth`, and `get_top_trends` for history, growth, and live rankings.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://x-twitter.api.trendsapi.ai/mcpclaude mcp add --transport http ai-trendsapi-x-twitter https://x-twitter.api.trendsapi.ai/mcp{"mcpServers":{"ai-trendsapi-x-twitter":{"type":"http","url":"https://x-twitter.api.trendsapi.ai/mcp"}}}Open in Cursor{"servers":{"ai-trendsapi-x-twitter":{"type":"http","url":"https://x-twitter.api.trendsapi.ai/mcp"}}}Open in VS Code{"mcpServers":{"ai-trendsapi-x-twitter":{"type":"http","url":"https://x-twitter.api.trendsapi.ai/mcp"}}}{"mcpServers":{"ai-trendsapi-x-twitter":{"serverUrl":"https://x-twitter.api.trendsapi.ai/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://x-twitter.api.trendsapi.ai/mcpAuth requiredTools
Details
From the project READMERemote MCP server
Hosted MCP at https://api.trendsapi.ai/mcp. Same three operations and catalogs as REST. Token: trendsapi.ai/#get-key.
REST contract: trendsapi-ai/trendsapi.
Tools
| MCP tool | REST mode | Required | Returns |
|---|---|---|---|
get_trends | get_time_series | source, keyword | Weekly history |
get_growth | get_growth | source, keyword | Percent change |
get_top_trends | get_top_trends | type | Live ranked feed |
Sources, feeds, and keyword formats: hub keyword sources and live feeds.
app downloads / app rankings still need an Android bundle ID (com.openai.chatgpt).
Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"trend-feeds": {
"url": "https://api.trendsapi.ai/mcp",
"transport": "http",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}
VS Code
.vscode/mcp.json:
{
"servers": {
"trend-feeds": {
"type": "http",
"url": "https://api.trendsapi.ai/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}
Claude Desktop
{
"mcpServers": {
"trend-feeds": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.trendsapi.ai/mcp", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer YOUR_TOKEN" }
}
}
}
Claude.ai: Settings → Connectors → Add custom connector → https://api.trendsapi.ai/mcp.
No local production server in this repo.
License
MIT. See LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.