How do I get X (Twitter) trending topics for a country through the API?
The official endpoint is GET /2/trends/by/woeid/:woeid, where the location is a Yahoo Where On Earth ID (1 is worldwide, 23424977 the United States, 23424975 the UK); X's rate-limit table allows 75 requests per 15 minutes per app, and you need paid API access. XTikAPI's x.trends.hot returns the current trends for a country, $0.002 a call.
Updated 2026-11-21
The official route
Trends for a place
What X's docs say: GET /2/trends/by/woeid/:woeid
Which places exist
What X's docs say: GET /2/trends/locations
Your own feed's trends
What X's docs say: GET /2/users/personalized_trends (user context)
Common WOEIDs
What X's docs say: Worldwide 1, US 23424977, UK 23424975, Japan 23424856, New York 2459115, London 44418
Rate limit
What X's docs say: 75 per 15 minutes per app for trends by WOEID
A common Stack Overflow case (October 2023): a Tweepy notebook for India's top trends got 403 Forbidden with error 453, "You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints", because that access level didn't include trends.
With XTikAPI
x.trends.hotwithcountryreturns the trend titles for that country.- For each trend worth following,
x.posts.searchwith the trend askeywordreturns the posts behind it.
Cost: trends for 10 countries every hour = 7,200 calls a month × $0.002 = $14.40; every 4 hours, $3.60.
Why XTikAPI
- XTikAPI reads X with 16 endpoints from $0.002 a call, and a failed call is not charged.
- Fewer tokens for AI: across 10 recorded live X calls (2026-11-18), raw platform JSON is ~63k tokens vs ~21k via XTikAPI REST (66.7% fewer) and ~23k via MCP (63.7% fewer).
- See before you pay: 192 of 229 endpoints show a recorded real response on their page (10 of 16 for X).
- Made for AI: hosted OAuth MCP server (/v1/mcp), Markdown twin per page, llms.txt and OpenAPI for ChatGPT, Claude and Cursor.
- Free trial: a verified account gets $0.50, no card.
Endpoints
Each with its price; the endpoint page has parameters, fields and a recorded response.
Sources
What this page says about other products comes from their own pages and docs, read on 2026-11-21.
More about X
- X API
- Agent Reach Twitter/X channel stopped working: what changed?
- twikit errors (Cloudflare 403, KEY_BYTE, login 399, rate limits, bans): how do I fix them?
- twscrape errors (404, No account available, XClIdParseError, ct0, bans): how do I fix them?
- Nitter is shutting down: how else can I read X accounts without logging in?
- Is it legal to collect public social media data?
Questions
Do trends include tweet volume?
The `x.trends.hot` response gives the trend titles; count posts yourself with `x.posts.search` if you need volume.
One key. Start now.
19 platforms, 229 endpoints, from $0.002 a call. Errors and timeouts are free.
Start free