Get Trending Topics
Get X Explore trending topics for a given country. Use ‘worldwide’ for account-default trends or a country slug such as ‘united-states’.
Back to API Reference
/Trending Endpoints
GET
/twitter/{country}/trendingAuthorization
AuthorizationBearer token · headerrequiredGlobal API Bearer Token for TwexAPI. Included as: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Path Parameters
countrystringrequiredCountry slug or 'worldwide' for default explore trends
Allowed:
worldwidealgeriaargentinaaustraliaaustriabahrainbelarusbelgiumbrazilcanadachilecolombiadenmarkdominican-republicecuadoregyptfrancegermanyghanagreeceguatemalaindiaindonesiairelandisraelitalyjapanjordankenyakoreakuwaitlatvialebanonmalaysiamexiconetherlandsnew-zealandnigerianorwayomanpakistanpanamaperuphilippinespolandportugalqatarrussiasaudi-arabiasingaporesouth-africaspainswedenswitzerlandthailandturkeyukraineunited-arab-emiratesunited-kingdomunited-statesvenezuelavietnamzimbabweResponses
200Standard response with list of trending topics in data field
codeintegerrequiredHTTP status code
msgstringrequiredResponse message
dataanyResponse data
Show propertiesHide properties
Any of:
any
anyany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobject⚡Interactive ConsoleGET
⚡Interactive Console / Try APIGETLive Console
🌐Target Server:
https://api.twexapi.io● Production Ready
🔍
Public Data Read (TwexAPI Key Only, No Twitter Cookie Required)
This endpoint queries public Twitter data — no Twitter account or Cookie required! Simply enter your TwexAPI Platform Key (Bearer Token) in the "API Authorization" section below to test.
🔑API Authorization
⚙️Parameters (1)
📡
No Response Yet
Configure parameters in the Request tab and click Send Request below.
Request
curl -X GET "https://api.twexapi.io/twitter/worldwide/trending" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.twexapi.io/twitter/worldwide/trending", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.twexapi.io/twitter/worldwide/trending",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"code": 200,
"msg": "success",
"data": {}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}