X / Twitter Trends API
Get current X (Twitter) trends for worldwide, a country, or a city in X ranking order, including the resolved location.
$0.10/1k req, pay per request, no subscription.
{"rank": 1,"name": "#NBAOpeningNight","isHashtag": true,"query": "%23NBAOpeningNight","promoted": false,"url": "https://x.com/search?q=%23NBAOpeningNight"}
Pricing and providers
X / Twitter Trends API pricing: one API, 2 interchangeable providers
The cheapest provider serves first. If it fails, the next one takes over in the same call.
Try it
Get X / Twitter trends in one request
This sample shows 12 of 13 fields. See every field
{
"found": true,
"data": {
"location": "United States",
"locationId": "23424977",
"asOfUtc": 1727366400,
"items": [
{
"rank": 1,
"name": "#NBAOpeningNight",
"isHashtag": true,
"query": "%23NBAOpeningNight",
"promoted": false,
"url": "https://x.com/search?q=%23NBAOpeningNight"
},
{
"rank": 2,
"name": "Federal Reserve",
"isHashtag": false,
"query": "%22Federal%20Reserve%22",
"promoted": false,
"url": "https://x.com/search?q=%22Federal%20Reserve%22"
},
{
"rank": 3,
"name": "iPhone 18",
"isHashtag": false,
"query": "%22iPhone%2018%22",
"promoted": true,
"url": "https://x.com/search?q=%22iPhone%2018%22"
},
{
"rank": 4,
"name": "#MondayMotivation",
"isHashtag": true,
"query": "%23MondayMotivation",
"promoted": false,
"url": "https://x.com/search?q=%23MondayMotivation"
},
{
"rank": 5,
"name": "Coachella 2027",
"isHashtag": false,
"query": "%22Coachella%202027%22",
"promoted": false,
"url": "https://x.com/search?q=%22Coachella%202027%22"
}
]
}
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
One request, one response shape.
Every field you send and every field you get back, each with a real example.
Last verified 2026-10-31 · uptime and latency measured over 30d
Request body
JSON, posted to this endpoint.
- limitinteger
10
Maximum number of ranked trends to return (1-50, default 50).
- locationstring
United States
Country name, city name, or ISO country code. Omit for worldwide trends.
- requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `promoted`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a trend that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
Response
JSON, one example value per field.
The resolved location and its current ranked trends, or null when unavailable.
- asOfUtcnumber
1727366400
UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. Populated whenever the provider has data for the entity.
- locationstring
United States
Resolved X trend-location name. Populated whenever the provider has data for the entity.
- locationIdstring
23424977
Resolved Yahoo WOEID used by X, exposed as a stable location identifier. Populated whenever the provider has data for the entity.
Current trends in X's own ranking order. Distinct ranks may carry the same trend name. Populated whenever the provider has data for the entity.
- isHashtagbooleancan require
true
Whether the trend text is a hashtag.
- namestring
#NBAOpeningNight
Trend text displayed by X. Populated whenever the provider has data for the entity.
- promotedbooleancan require
false
Whether X marks the trend as promoted.
- querystring
%23NBAOpeningNight
Search query corresponding to the trend. Populated whenever the provider has data for the entity.
- rankinteger
1
One-based position in X's trend ranking. Populated whenever the provider has data for the entity.
- urlstring
https://x.com/search?q=%23NBAOpeningNight
X search URL for the trend.
- foundboolean
true
Whether X trends were resolved for the requested location.
- reason"not_found"
Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.
FAQ
About the X / Twitter Trends API
The AnyAPI X / Twitter Trends API returns X / Twitter trends data as normalized JSON from one POST call to /v1/run/twitter.trends. Get current X (Twitter) trends for worldwide, a country, or a city in X ranking order, including the resolved location. AnyAPI routes each request across 2 sources and falls back automatically when one fails. It costs from $0.10 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 98.9% of X / Twitter trends calls through AnyAPI succeeded, with a median response time of 1.0 seconds across 1,631 measured calls.