X (Twitter) Trending Topics API

Live X trending topics as structured JSON. Pull what's trending on X right now via a single POST endpoint - no X developer account, no paid X API plan required.

X's own API requires a paid developer plan. Even at basic tier, access is limited and the data returned is individual tweets - not an aggregated view of what's actually trending. For most developers, just getting the current trending topics list as clean JSON is harder than it should be.

Trends MCP returns the live X trending feed via a simple POST request. No X developer account needed.

Endpoint

POST https://api.trendsmcp.ai/api
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Get live X trending topics

{
  "mode": "top_trends",
  "type": "X (Twitter)",
  "limit": 25
}

Response shape:

{
  "as_of_ts": "2026-03-30T12:00:00Z",
  "type": "X (Twitter)",
  "limit": 25,
  "count": 25,
  "data": [
    [1, "topic name"],
    [2, "another topic"]
  ]
}

The data array returns [rank, name] pairs. Set limit up to 200.

Code examples

Python

import requests

res = requests.post(
    "https://api.trendsmcp.ai/api",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"mode": "top_trends", "type": "X (Twitter)", "limit": 25}
)
data = res.json()

JavaScript

const res = await fetch("https://api.trendsmcp.ai/api", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ mode: "top_trends", type: "X (Twitter)", limit: 25 })
});
const data = await res.json();

cURL

curl -s -X POST https://api.trendsmcp.ai/api \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"top_trends","type":"X (Twitter)","limit":25}'

Cross-reference with search data

X trending topics tell you what's being talked about right now. To understand whether that topic has been building over months or spiked suddenly, cross-reference with Google Search or Reddit volume:

import requests

headers = {"Authorization": "Bearer YOUR_API_KEY"}
base = "https://api.trendsmcp.ai/api"

trending = requests.post(base, headers=headers,
    json={"mode": "top_trends", "type": "X (Twitter)", "limit": 10}).json()

topic = trending["data"][0][1]
growth = requests.post(base, headers=headers,
    json={"source": "google search", "keyword": topic, "percent_growth": ["7D", "30D"]}).json()

Errors

Status Code Meaning
401 Missing or invalid API key
429 rate_limited Monthly limit reached
500 internal_error Unexpected server error

Common questions

No. X data is available as live trending topics only - what is trending on X right now. Historical time series and growth calculations are not available for this source.
X's API requires a paid developer plan for any meaningful access and returns individual tweets. Trends MCP returns the current X trending topics feed as clean JSON - no X account or paid plan needed.
The feed reflects live trending data at the time of the request.
Get X (Twitter) Trending Topics API in 30 seconds
Free tier includes 100 requests per month. No credit card required. Works with Claude, Cursor, ChatGPT, Raycast, and every MCP client.
Get your free API key