xAPIs.dev
API Reference · v2
Free Tools{ }OpenAPI YAMLGet API key
API Reference / Other / Get trends

Get trends

GET/twitter/trends8 credits

Return trending topics for a location (by WOEID), ranked by volume. The sample response below is captured from the live API. List endpoints paginate with `has_next_page` and `next_cursor`.

Authentication required
Send your key in the x-api-key header. Requests without a valid key return 401.

Query parameters

woeid
integerrequired
Where-On-Earth ID. Use 1 for worldwide.

Response fields

trendsarray
Array of trending topics for the requested location.
metadataobject
Request metadata: timestamp, woeid, refresh interval.
statusstring
Request status: "success" or "error".
msgstring
Status message from the upstream.
Request
curl https://v2.xapis.dev/twitter/trends \
  -G --data-urlencode "woeid=1" \
  -H "x-api-key: $XAPIS_KEY"
Response200 OK
application/json
{
  "status": "success",
  "msg": "success",
  "trends": [
    {
      "trend": {
        "name": "winwin",
        "target": {
          "query": "winwin"
        },
        "rank": 1
      }
    }
  ],
  "metadata": {
    "timestamp": 1783500245589,
    "refresh_interval_millis": 300000,
    "woeid": {
      "name": "Worldwide",
      "id": 1
    },
    "context_mode": "full"
  }
}
base url · https://v2.xapis.dev
Ready to call Get trends?