X (Twitter) Trends API
X trending topics and discussion volume over time. Free key at trendsapi.ai
Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
claude mcp add --transport http x-twitter-trends-api 'https://x-twitter.api.trendsapi.ai/mcp' --header 'Authorization: <Bearer token. Get your free API key at https://trendsapi.ai>'
{
"mcpServers": {
"x-twitter-trends-api": {
"type": "http",
"url": "https://x-twitter.api.trendsapi.ai/mcp",
"headers": {
"Authorization": "<Bearer token. Get your free API key at https://trendsapi.ai>"
}
}
}
}
Documentation
From the project's README on GitHub, refreshed weekly. Links open on GitHub.
Remote 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.
Frequently asked questions
What is X (Twitter) Trends API?
X trending topics and discussion volume over time. Free key at trendsapi.ai
How do I install X (Twitter) Trends API?
It runs as a remote server. In Claude Code: claude mcp add --transport http x-twitter-trends-api 'https://x-twitter.api.trendsapi.ai/mcp' --header 'Authorization: <Bearer token. Get your free API key at https://trendsapi.ai>'. For other clients, paste the JSON configuration from this page into their MCP settings.
Does X (Twitter) Trends API need an API key?
Yes. It expects Authorization, which you set in its configuration.
Is X (Twitter) Trends API open source?
Yes. Its code is on GitHub under the MIT license.
Who maintains X (Twitter) Trends API?
It is published by trendsapi-ai. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.