Get trends by woeid
GET
/twitter/trends
const url = 'https://api.relayxapi.com/twitter/trends';const options = { method: 'GET', headers: { 'X-API-Key': '<api-key>' },};
try { const res = await fetch(url, options); const data = await res.json(); console.log(data);} catch (err) { console.error(err);}curl --request GET \ --url 'https://api.relayxapi.com/twitter/trends' \ --header 'X-API-Key: <api-key>'import requests
res = requests.get( "https://api.relayxapi.com/twitter/trends", headers={"X-API-Key": "<api-key>"},)print(res.json())Return the trending topics for a WOEID (Where On Earth ID), ranked by position.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”woeid
Woeid
integer
count
Count
integer
Header Parameters
Section titled “Header Parameters”x-api-key
X-Api-Key
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
Example
{ "trends": [ { "name": "中秋の名月", "url": "http://twitter.com/search?q=%E4%B8%AD%E7%A7%8B%E3%81%AE%E5%90%8D%E6%9C%88", "query": "%E4%B8%AD%E7%A7%8B%E3%81%AE%E5%90%8D%E6%9C%88", "tweet_volume": null }, { "name": "#名探偵コナン", "url": "http://twitter.com/search?q=%23%E5%90%8D%E6%8E%A2%E5%81%B5%E3%82%B3%E3%83%8A%E3%83%B3", "query": "%23%E5%90%8D%E6%8E%A2%E5%81%B5%E3%82%B3%E3%83%8A%E3%83%B3", "tweet_volume": null } ], "status": "success", "msg": ""}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}