Trends
Trend Locations
List every location X/Twitter offers trends for, with WOEIDs, via API. $0.001 per call. GetXAPI trend locations endpoint documentation.
GET
/twitter/trends/locationsThis endpoint costs $0.001 per API call.
List every place X (Twitter) offers trends for, so you can look up a woeid for a specific city or country not covered by the Get Trends country shortcut.
Query Parameters
None.
Response (200)
{
"status": "success",
"count": 467,
"locations": [
{ "woeid": 1, "name": "Worldwide", "country": "", "country_code": null, "type": "Supername" },
{ "woeid": 23424977, "name": "United States", "country": "United States", "country_code": "US", "type": "Country" }
]
}Response Fields
| Field | Type | Description |
|---|---|---|
count | number | Number of locations returned |
locations[].woeid | number | Yahoo WOEID — pass to Get Trends as woeid |
locations[].name | string | Location name |
locations[].country | string | Country name (empty for Worldwide) |
locations[].country_code | string | ISO country code, or null |
locations[].type | string | Location type, e.g. Supername, Country, Town |
Example
curl -X GET "https://api.getxapi.com/twitter/trends/locations" \
-H "Authorization: Bearer API_KEY"