# 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

| Item | What X's docs say |
| --- | --- |
| Trends for a place | `GET /2/trends/by/woeid/:woeid` |
| Which places exist | `GET /2/trends/locations` |
| Your own feed's trends | `GET /2/users/personalized_trends` (user context) |
| Common WOEIDs | Worldwide 1, US 23424977, UK 23424975, Japan 23424856, New York 2459115, London 44418 |
| Rate limit | 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

1. `x.trends.hot` with `country` returns the trend titles for that country.
2. For each trend worth following, `x.posts.search` with the trend as `keyword` returns 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

- [X trends API](https://xtikapi.com/apis/x/trends/hot) ($0.002 a call): X trending topics, worldwide or for one country.
- [X post search API](https://xtikapi.com/apis/x/posts/search) ($0.002 a call): One page of X posts for a search query.

## More about X

- [X API](https://xtikapi.com/apis/x)
- [Agent Reach Twitter/X channel stopped working: what changed?](https://xtikapi.com/answers/agent-reach-twitter-channel-broken)
- [twikit errors (Cloudflare 403, KEY_BYTE, login 399, rate limits, bans): how do I fix them?](https://xtikapi.com/answers/twikit-errors-and-fixes)
- [twscrape errors (404, No account available, XClIdParseError, ct0, bans): how do I fix them?](https://xtikapi.com/answers/twscrape-errors-and-fixes)
- [Nitter is shutting down: how else can I read X accounts without logging in?](https://xtikapi.com/answers/nitter-shut-down-alternative)
- [Is it legal to collect public social media data?](https://xtikapi.com/answers/is-scraping-public-social-media-data-legal)

## Sources

What this page says about other products comes from their own pages and docs, read on 2026-11-21.

- [X API: Trends by WOEID](https://docs.x.com/x-api/trends/introduction)
- [X API rate limits table (Trends)](https://docs.x.com/x-api/fundamentals/rate-limits)
- [Stack Overflow: Twitter trends with Tweepy return 403 / error 453](https://stackoverflow.com/questions/77253411)

## 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.

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/answers/x-trends-by-country-api) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
