Introduction

Introduction

The Trends lookup endpoint allow developers to get the Trends for a location, specified using the where-on-earth id (WOEID).

Note: WOEID is a legacy identifier created by Yahoo and has been deprecated. X API uses the numeric value to identify town and country trend locations. Reference our legacy blog post, or archived data

The tweet_count for the last 24 hours is also returned for many trends if this is available.

This endpoint supports app-auth authentication and has a rate limit of 75 requests per 15-minute window.

Getting started

To use this endpoint, you need a bearer token from the developer portal. Once you have the bearer token,  you can call the usage API as shown below:

      curl 'https://api.twitter.com/2/trends/by/woeid/26062' --header 'Authorization: Bearer XXXXX' 
    

If the request is successful, you should see the JSON response as shown below:

      {
    "data": [
        {
            "trend_name": "Europe",
            "tweet_count": 232408
        },
        {
            "trend_name": "Isak",
            "tweet_count": 2956
        },
        {
            "trend_name": "RNLI",
            "tweet_count": 2484
        },
        {
            "trend_name": "Toon",
            "tweet_count": 11447
        },
        {
            "trend_name": "St James",
            "tweet_count": 5565
        },
        {
            "trend_name": "Manning",
            "tweet_count": 10077
        },
        {
            "trend_name": "Copenhagen",
            "tweet_count": 35272
        },
        {
            "trend_name": "Coventry",
            "tweet_count": 3662
    ]
}
    

Account setup

To access these endpoints, you will need:

Learn more about getting access to the X API v2 endpoints in our getting started guide.