Trends API

Twitter (X) Trends API: Trending Topics by Country

Prices checked:

Quick Answer

TwexAPI’s trends API returns the trending topics X shows for a country from one request: GET /twitter/{country}/trending. A call returned 30 trends in our test and is billed per trend at 5 Credits, so it costs 150 Credits, about $0.0015, and checking one country every hour comes to about $1.08 a month. The official X API listed Trends at $0.010 per request on December 1, 2026. You need a TwexAPI key, not an X developer account.

Example request and response

Each trend has a rank, the topic text, a category line and a last-updated note. In our test every trend came back with tweet_volume 0, so do not rely on that field for volume.

Request and response
curl https://api.twexapi.io/twitter/united-states/trending \
  -H "Authorization: Bearer $TWEXAPI_KEY"

{
  "code": 200,
  "msg": "success",
  "data": [
    {"rank": "1", "topic": "Baker Mayfield", "tweet_volume": 0, "last_updated": "1 minutes ago", "domain_context": "Sports · Trending"},
    {"rank": "2", "topic": "#WWERaw", "tweet_volume": 0, "last_updated": "1 minutes ago", "domain_context": "Sports · Trending"}
  ]
}

From a trend to the posts behind it

To read what people are saying about a trend, pass its topic to the search endpoint, POST /twitter/advanced_search/page, which returns 20 posts a page at 5 Credits each. For the posts that are trending in a country rather than on one topic, call GET /twitter/global-trending/tweets with a country and, if you want, a topic such as cryptocurrency.

Limits to know before you build

  • Country level only: 62 countries, and no city-level trends.
  • The worldwide slug returns X’s default Explore trends, not a global ranking. In our test most of them were regional, so pass a country slug.
  • Current trends only. There is no history endpoint, so store each call if you need a time series.
  • tweet_volume was 0 for every trend in our test.
  • There is no push or webhook. You check on a schedule.
Start with 20,000 free CreditsSee trending topics now (free tool)

FAQ

Is there a free Twitter trends API?

X’s pricing page lists no free plan and prices Trends at $0.010 per request (read December 1, 2026). TwexAPI gives 20,000 free Credits on signup, enough for about 130 trends calls, without a credit card.

Which countries does the trends API cover?

62 countries, including the United States, the United Kingdom, Japan, India, Brazil, Germany, France, Turkey, Indonesia and Saudi Arabia. The API reference lists every country slug.

Can I get trends for a city?

No. TwexAPI returns trends by country.

Can I get past trending topics?

No. The API returns the trends at the time of the call. To keep a history, call it on a schedule and store the results, as the Python script on this page does.

How much does it cost to check trends every hour?

About $1.08 a month for one country: 720 calls at 150 Credits each. Checking every 10 minutes costs about $6.48 a month.

Do I need an X developer account?

No. You call TwexAPI with a TwexAPI key, which you get by signing up with an email or Google account.

Is TwexAPI affiliated with X?

No. TwexAPI is an independent third-party provider of public social data and is not affiliated with or endorsed by X Corp.

Related Guides

Sources

Prices change. Confirm current rates on each provider’s pricing page before you buy. TwexAPI is an independent provider and is not affiliated with or endorsed by X Corp.