# How do I get X (Twitter) trends for a country?

Call DataXAPI's X (Twitter) trends with the country's two-letter code as region, and you get its top 30 trends with their rank. Ten countries are covered: US, GB, CA, AU, IN, JP, DE, FR, BR and MX; without region the list is worldwide. DataXAPI reads X (Twitter) with 21 endpoints, from $0.0003 a call; a failed call is not charged.

## What a list has

Each trend has its `name` and `rank`, and nothing else: no count of posts, no heat, no ID. A list is a snapshot refreshed every five minutes, and `meta.fetched_at` says when it was taken.

To see what is behind a trend, search X posts with its name.

## Countries not on the list

Only these ten countries and worldwide are offered. Any other code is refused as an invalid parameter and not run.

## Endpoints

- [X trends](https://dataxapi.com/apis/x/trends/list/) ($0.0090 / a call): Get the top 30 of what is trending on X now, with rank: worldwide, or in one country.
- [X post search](https://dataxapi.com/apis/x/posts/search/) ($0.0020 / a call): Find X posts by search terms, most popular or newest first; the terms may use X's own search operators, such as from:handle.

## How-to guides

- [How to get X (Twitter) trending topics by country](https://dataxapi.com/guides/x-trends-by-country/)

## More about X (Twitter)

- [X (Twitter) API](https://dataxapi.com/apis/x/)
- [How to search X (Twitter) posts by keyword](https://dataxapi.com/guides/x-search-posts-by-keyword/)
- [How to get replies to an X (Twitter) post](https://dataxapi.com/guides/x-post-replies/)

---

Catalog revision c48ce454ae6c4c65. [HTML version](https://dataxapi.com/answers/how-to-get-x-trends-for-a-country/)
