Skip to content

Twitter trends API: X trends by WOEID

A Twitter trends API returns X's current trending list for one place, picked by a WOEID code such as 1 for worldwide; the official X API charges $0.010 per list through GET /2/trends/by/woeid/{id}.

Short answer: X publishes trend lists for 467 places, worldwide, 62 countries and 404 cities, and its own endpoint needs an approved developer account and allows 75 calls per 15 minutes. To pull trends for any of those places with one API key, use Sorsa API's GET /trends: from $1.40 per 1,000 lists, and 100 free requests cover your first 100.

Endpoint
GET /trends?woeid=
1 request per place
Price
from $1.40 per 1,000 lists

A trends API takes a place and returns X's ranked list of the topics popular there right now, the same list the Explore tab shows to someone signed out. The place goes in as a WOEID (Where On Earth ID): a numeric location code from Yahoo's old geo database that X kept. 1 is the whole world, 23424977 the United States, 2459115 New York.

This guide does the job in code, for any place X covers and any number of them.

X's own endpoint, GET /2/trends/by/woeid/{woeid}, joined the official X API's v2 on December 8, 2023 (X's changelog (opens in a new tab)) and still answers in November 2026. On pay-per-use it costs $0.010 per request, paid from prepaid credits (X's price list (opens in a new tab)). The table sums up the rest of X's reference (opens in a new tab), checked on November 2, 2026.

DetailOfficial X API
EndpointGET /2/trends/by/woeid/{woeid}
Accessapproved developer account, a Project and App, the App's Bearer token
Trends per call20 by default, up to 50 with max_trends
Fieldstrend_name, plus tweet_count when you ask for it
Price$0.010 per request
Rate limit75 requests per 15 minutes for one app
  • Endpoint

    Official X API
    GET /2/trends/by/woeid/{woeid}
  • Access

    Official X API
    approved developer account, a Project and App, the App's Bearer token
  • Trends per call

    Official X API
    20 by default, up to 50 with max_trends
  • Fields

    Official X API
    trend_name, plus tweet_count when you ask for it
  • Price

    Official X API
    $0.010 per request
  • Rate limit

    Official X API
    75 requests per 15 minutes for one app

Two things are not in it. No endpoint in X's current documentation lists the places that have trends: the old v1.1 trends/available call is gone from the docs. And no call returns earlier lists, so a history of trends exists only if you store the snapshots yourself.

For trend lists in code without a developer account, use Sorsa API, a Twitter (X) API and scraper: GET /trends takes the same WOEID and returns X's list for that place in one request, from $1.40 per 1,000 lists against $10.00 on the official X API, at 20 requests per second on every plan.

  1. Get a key. Sign up and copy the API key from your dashboard. The 100 free requests are already on it, with no card.

  2. Pick the place. Find its WOEID in the finder further down, or use 1 for worldwide.

  3. Send the request. Call GET /trends (opens in a new tab) with woeid in the query string and the key in the ApiKey header.

    Terminal
    curl "https://api.sorsa.io/v3/trends?woeid=23424900" \
      -H "ApiKey: YOUR_API_KEY"
    
    Response200 OK
    {
      "trends": [
        {
          "name": "#FelizLunes",
          "query": "%23FelizLunes",
          "url": "https://x.com/search?q=%23FelizLunes"
        },
        {
          "name": "Liga MX",
          "query": "%22Liga+MX%22",
          "url": "https://x.com/search?q=%22Liga+MX%22"
        },
        {
          "name": "Buenos días",
          "query": "%22Buenos+d%C3%ADas%22",
          "url": "https://x.com/search?q=%22Buenos+d%C3%ADas%22"
        }
      ]
    }
    
  4. Read the list. Each trend has a name (the topic as X shows it), a query (the search behind it) and a url (its search page on X). The order is X's ranking, so the first item is the top trend.

A 403 answer means the key is missing or out of requests, and a 401 means the key is wrong. A 429 means more than 20 requests in one second: wait a second and send it again. Failed requests are never charged, and every call returns fresh data, so two calls an hour apart give two different snapshots.

#Find the WOEID for any country or city

X publishes trend lists for 467 places: worldwide, 62 countries and 404 cities, each with its own WOEID (X's list of trend locations (opens in a new tab), unchanged when it was fetched from X again in August 2025). Every one of them works in GET /trends. A town that is not on the list has no trends of its own, so use the nearest listed city or the country.

The table holds the countries people ask about most, each with a major city; the finder under it holds all 467 places.

CountryWOEIDMajor cityCity WOEID
Worldwide1——
United States23424977New York2459115
Mexico23424900Mexico City116545
India23424848Mumbai2295411
Japan23424856Tokyo1118370
United Kingdom23424975London44418
Brazil23424768São Paulo455827
Indonesia23424846Jakarta1047378
Turkey23424969Istanbul2344116
Spain23424950Madrid766273
Australia23424748Sydney1105779
South Korea23424868Seoul1132599
  • Worldwide

    WOEID
    1
    Major city
    —
    City WOEID
    —
  • United States

    WOEID
    23424977
    Major city
    New York
    City WOEID
    2459115
  • Mexico

    WOEID
    23424900
    Major city
    Mexico City
    City WOEID
    116545
  • India

    WOEID
    23424848
    Major city
    Mumbai
    City WOEID
    2295411
  • Japan

    WOEID
    23424856
    Major city
    Tokyo
    City WOEID
    1118370
  • United Kingdom

    WOEID
    23424975
    Major city
    London
    City WOEID
    44418
  • Brazil

    WOEID
    23424768
    Major city
    São Paulo
    City WOEID
    455827
  • Indonesia

    WOEID
    23424846
    Major city
    Jakarta
    City WOEID
    1047378
  • Turkey

    WOEID
    23424969
    Major city
    Istanbul
    City WOEID
    2344116
  • Spain

    WOEID
    23424950
    Major city
    Madrid
    City WOEID
    766273
  • Australia

    WOEID
    23424748
    Major city
    Sydney
    City WOEID
    1105779
  • South Korea

    WOEID
    23424868
    Major city
    Seoul
    City WOEID
    1132599

Mexico has 23 trend cities besides its national list, 23424900: Mexico City is 116545, Guadalajara 124162 and Monterrey 134047. Type any place, or a WOEID you found elsewhere, into the finder to check it and copy the request.

467 places

PlaceListWOEID
WorldwideWorldwide
AlgeriaCountry
Algiers, AlgeriaCity in Algeria
ArgentinaCountry
Buenos Aires, ArgentinaCity in Argentina
Córdoba, ArgentinaCity in Argentina
Mendoza, ArgentinaCity in Argentina
Rosario, ArgentinaCity in Argentina
AustraliaCountry
Adelaide, AustraliaCity in Australia
Brisbane, AustraliaCity in Australia
Canberra, AustraliaCity in Australia
Darwin, AustraliaCity in Australia
Melbourne, AustraliaCity in Australia
Perth, AustraliaCity in Australia
Sydney, AustraliaCity in Australia
AustriaCountry
Vienna, AustriaCity in Austria
BahrainCountry
BelarusCountry
Brest, BelarusCity in Belarus
Gomel, BelarusCity in Belarus
Grodno, BelarusCity in Belarus
Minsk, BelarusCity in Belarus
BelgiumCountry
BrazilCountry
Belo Horizonte, BrazilCity in Brazil
Belém, BrazilCity in Brazil
Brasília, BrazilCity in Brazil
Campinas, BrazilCity in Brazil
Curitiba, BrazilCity in Brazil
Fortaleza, BrazilCity in Brazil
Goiânia, BrazilCity in Brazil
Guarulhos, BrazilCity in Brazil
Manaus, BrazilCity in Brazil
Porto Alegre, BrazilCity in Brazil
Recife, BrazilCity in Brazil
Rio de Janeiro, BrazilCity in Brazil
Salvador, BrazilCity in Brazil
São Luís, BrazilCity in Brazil
São Paulo, BrazilCity in Brazil
CanadaCountry
Calgary, CanadaCity in Canada
Edmonton, CanadaCity in Canada
Montreal, CanadaCity in Canada
Ottawa, CanadaCity in Canada
Quebec, CanadaCity in Canada
Toronto, CanadaCity in Canada
Vancouver, CanadaCity in Canada
Winnipeg, CanadaCity in Canada
ChileCountry
Concepcion, ChileCity in Chile
Santiago, ChileCity in Chile
Valparaiso, ChileCity in Chile
ColombiaCountry
Barranquilla, ColombiaCity in Colombia
Bogotá, ColombiaCity in Colombia
Cali, ColombiaCity in Colombia
Medellín, ColombiaCity in Colombia
DenmarkCountry
Dominican RepublicCountry
Santo Domingo, Dominican RepublicCity in Dominican Republic
EcuadorCountry
Guayaquil, EcuadorCity in Ecuador
Quito, EcuadorCity in Ecuador
EgyptCountry
Alexandria, EgyptCity in Egypt
Cairo, EgyptCity in Egypt
Giza, EgyptCity in Egypt
FranceCountry
Bordeaux, FranceCity in France
Lille, FranceCity in France
Lyon, FranceCity in France
Marseille, FranceCity in France
Montpellier, FranceCity in France
Nantes, FranceCity in France
Paris, FranceCity in France
Rennes, FranceCity in France
Strasbourg, FranceCity in France
Toulouse, FranceCity in France
GermanyCountry
Berlin, GermanyCity in Germany
Bremen, GermanyCity in Germany
Cologne, GermanyCity in Germany
Dortmund, GermanyCity in Germany
Dresden, GermanyCity in Germany
Dusseldorf, GermanyCity in Germany
Essen, GermanyCity in Germany
Frankfurt, GermanyCity in Germany
Hamburg, GermanyCity in Germany
Leipzig, GermanyCity in Germany
Munich, GermanyCity in Germany
Stuttgart, GermanyCity in Germany
GhanaCountry
Accra, GhanaCity in Ghana
Kumasi, GhanaCity in Ghana
GreeceCountry
Athens, GreeceCity in Greece
Thessaloniki, GreeceCity in Greece
GuatemalaCountry
Guatemala City, GuatemalaCity in Guatemala
IndiaCountry
Ahmedabad, IndiaCity in India
Amritsar, IndiaCity in India
Bangalore, IndiaCity in India
Bhopal, IndiaCity in India
Chennai, IndiaCity in India
Delhi, IndiaCity in India
Hyderabad, IndiaCity in India
Indore, IndiaCity in India
Jaipur, IndiaCity in India
Kanpur, IndiaCity in India
Kolkata, IndiaCity in India
Lucknow, IndiaCity in India
Mumbai, IndiaCity in India
Nagpur, IndiaCity in India
Patna, IndiaCity in India
Pune, IndiaCity in India
Rajkot, IndiaCity in India
Ranchi, IndiaCity in India
Srinagar, IndiaCity in India
Surat, IndiaCity in India
Thane, IndiaCity in India
IndonesiaCountry
Bandung, IndonesiaCity in Indonesia
Bekasi, IndonesiaCity in Indonesia
Depok, IndonesiaCity in Indonesia
Jakarta, IndonesiaCity in Indonesia
Makassar, IndonesiaCity in Indonesia
Medan, IndonesiaCity in Indonesia
Palembang, IndonesiaCity in Indonesia
Pekanbaru, IndonesiaCity in Indonesia
Semarang, IndonesiaCity in Indonesia
Surabaya, IndonesiaCity in Indonesia
Tangerang, IndonesiaCity in Indonesia
IrelandCountry
Cork, IrelandCity in Ireland
Dublin, IrelandCity in Ireland
Galway, IrelandCity in Ireland
IsraelCountry
Haifa, IsraelCity in Israel
Jerusalem, IsraelCity in Israel
Tel Aviv, IsraelCity in Israel
ItalyCountry
Bologna, ItalyCity in Italy
Genoa, ItalyCity in Italy
Milan, ItalyCity in Italy
Naples, ItalyCity in Italy
Palermo, ItalyCity in Italy
Rome, ItalyCity in Italy
Turin, ItalyCity in Italy
JapanCountry
Chiba, JapanCity in Japan
Fukuoka, JapanCity in Japan
Hamamatsu, JapanCity in Japan
Hiroshima, JapanCity in Japan
Kawasaki, JapanCity in Japan
Kitakyushu, JapanCity in Japan
Kobe, JapanCity in Japan
Kumamoto, JapanCity in Japan
Kyoto, JapanCity in Japan
Nagoya, JapanCity in Japan
Niigata, JapanCity in Japan
Okayama, JapanCity in Japan
Okinawa, JapanCity in Japan
Osaka, JapanCity in Japan
Sagamihara, JapanCity in Japan
Saitama, JapanCity in Japan
Sapporo, JapanCity in Japan
Sendai, JapanCity in Japan
Takamatsu, JapanCity in Japan
Tokyo, JapanCity in Japan
Yokohama, JapanCity in Japan
JordanCountry
Amman, JordanCity in Jordan
KenyaCountry
Mombasa, KenyaCity in Kenya
Nairobi, KenyaCity in Kenya
KuwaitCountry
LatviaCountry
Riga, LatviaCity in Latvia
LebanonCountry
MalaysiaCountry
Hulu Langat, MalaysiaCity in Malaysia
Ipoh, MalaysiaCity in Malaysia
Johor Bahru, MalaysiaCity in Malaysia
Kajang, MalaysiaCity in Malaysia
Klang, MalaysiaCity in Malaysia
Kuala Lumpur, MalaysiaCity in Malaysia
Petaling, MalaysiaCity in Malaysia
MexicoCountry
Acapulco, MexicoCity in Mexico
Aguascalientes, MexicoCity in Mexico
Chihuahua, MexicoCity in Mexico
Ciudad Juarez, MexicoCity in Mexico
Culiacán, MexicoCity in Mexico
Ecatepec de Morelos, MexicoCity in Mexico
Guadalajara, MexicoCity in Mexico
Hermosillo, MexicoCity in Mexico
León, MexicoCity in Mexico
Mexicali, MexicoCity in Mexico
Mexico City, MexicoCity in Mexico
Monterrey, MexicoCity in Mexico
Morelia, MexicoCity in Mexico
Mérida, MexicoCity in Mexico
Naucalpan de Juárez, MexicoCity in Mexico
Nezahualcóyotl, MexicoCity in Mexico
Puebla, MexicoCity in Mexico
Querétaro, MexicoCity in Mexico
Saltillo, MexicoCity in Mexico
San Luis Potosí, MexicoCity in Mexico
Tijuana, MexicoCity in Mexico
Toluca, MexicoCity in Mexico
Zapopan, MexicoCity in Mexico
NetherlandsCountry
Amsterdam, NetherlandsCity in Netherlands
Den Haag, NetherlandsCity in Netherlands
Rotterdam, NetherlandsCity in Netherlands
Utrecht, NetherlandsCity in Netherlands
New ZealandCountry
Auckland, New ZealandCity in New Zealand
NigeriaCountry
Benin City, NigeriaCity in Nigeria
Ibadan, NigeriaCity in Nigeria
Kaduna, NigeriaCity in Nigeria
Kano, NigeriaCity in Nigeria
Lagos, NigeriaCity in Nigeria
Port Harcourt, NigeriaCity in Nigeria
NorwayCountry
Bergen, NorwayCity in Norway
Oslo, NorwayCity in Norway
OmanCountry
Muscat, OmanCity in Oman
PakistanCountry
Faisalabad, PakistanCity in Pakistan
Karachi, PakistanCity in Pakistan
Lahore, PakistanCity in Pakistan
Multan, PakistanCity in Pakistan
Rawalpindi, PakistanCity in Pakistan
PanamaCountry
PeruCountry
Lima, PeruCity in Peru
PhilippinesCountry
Antipolo, PhilippinesCity in Philippines
Cagayan de Oro, PhilippinesCity in Philippines
Calocan, PhilippinesCity in Philippines
Cebu City, PhilippinesCity in Philippines
Davao City, PhilippinesCity in Philippines
Makati, PhilippinesCity in Philippines
Manila, PhilippinesCity in Philippines
Pasig, PhilippinesCity in Philippines
Quezon City, PhilippinesCity in Philippines
Taguig, PhilippinesCity in Philippines
Zamboanga City, PhilippinesCity in Philippines
PolandCountry
Gdańsk, PolandCity in Poland
Kraków, PolandCity in Poland
Lodz, PolandCity in Poland
Poznań, PolandCity in Poland
Warsaw, PolandCity in Poland
Wroclaw, PolandCity in Poland
PortugalCountry
Puerto RicoCountry
QatarCountry
RussiaCountry
Chelyabinsk, RussiaCity in Russia
Irkutsk, RussiaCity in Russia
Kazan, RussiaCity in Russia
Khabarovsk, RussiaCity in Russia
Krasnodar, RussiaCity in Russia
Krasnoyarsk, RussiaCity in Russia
Moscow, RussiaCity in Russia
Nizhny Novgorod, RussiaCity in Russia
Novosibirsk, RussiaCity in Russia
Omsk, RussiaCity in Russia
Perm, RussiaCity in Russia
Rostov-on-Don, RussiaCity in Russia
Saint Petersburg, RussiaCity in Russia
Samara, RussiaCity in Russia
Ufa, RussiaCity in Russia
Vladivostok, RussiaCity in Russia
Volgograd, RussiaCity in Russia
Voronezh, RussiaCity in Russia
Yekaterinburg, RussiaCity in Russia
Saudi ArabiaCountry
Ahsa, Saudi ArabiaCity in Saudi Arabia
Dammam, Saudi ArabiaCity in Saudi Arabia
Jeddah, Saudi ArabiaCity in Saudi Arabia
Mecca, Saudi ArabiaCity in Saudi Arabia
Medina, Saudi ArabiaCity in Saudi Arabia
Riyadh, Saudi ArabiaCity in Saudi Arabia
SingaporeCountry
Singapore, SingaporeCity in Singapore
South AfricaCountry
Cape Town, South AfricaCity in South Africa
Durban, South AfricaCity in South Africa
Johannesburg, South AfricaCity in South Africa
Port Elizabeth, South AfricaCity in South Africa
Pretoria, South AfricaCity in South Africa
Soweto, South AfricaCity in South Africa
South KoreaCountry
Ansan, South KoreaCity in South Korea
Bucheon, South KoreaCity in South Korea
Busan, South KoreaCity in South Korea
Changwon, South KoreaCity in South Korea
Daegu, South KoreaCity in South Korea
Daejeon, South KoreaCity in South Korea
Goyang, South KoreaCity in South Korea
Gwangju, South KoreaCity in South Korea
Incheon, South KoreaCity in South Korea
Seongnam, South KoreaCity in South Korea
Seoul, South KoreaCity in South Korea
Suwon, South KoreaCity in South Korea
Ulsan, South KoreaCity in South Korea
Yongin, South KoreaCity in South Korea
SpainCountry
Barcelona, SpainCity in Spain
Bilbao, SpainCity in Spain
Las Palmas, SpainCity in Spain
Madrid, SpainCity in Spain
Malaga, SpainCity in Spain
Murcia, SpainCity in Spain
Palma, SpainCity in Spain
Seville, SpainCity in Spain
Valencia, SpainCity in Spain
Zaragoza, SpainCity in Spain
SwedenCountry
Gothenburg, SwedenCity in Sweden
Stockholm, SwedenCity in Sweden
SwitzerlandCountry
Geneva, SwitzerlandCity in Switzerland
Lausanne, SwitzerlandCity in Switzerland
Zurich, SwitzerlandCity in Switzerland
ThailandCountry
Bangkok, ThailandCity in Thailand
TurkeyCountry
Adana, TurkeyCity in Turkey
Ankara, TurkeyCity in Turkey
Antalya, TurkeyCity in Turkey
Bursa, TurkeyCity in Turkey
Diyarbakır, TurkeyCity in Turkey
Eskişehir, TurkeyCity in Turkey
Gaziantep, TurkeyCity in Turkey
Istanbul, TurkeyCity in Turkey
Izmir, TurkeyCity in Turkey
Kayseri, TurkeyCity in Turkey
Konya, TurkeyCity in Turkey
Mersin, TurkeyCity in Turkey
UkraineCountry
Dnipropetrovsk, UkraineCity in Ukraine
Donetsk, UkraineCity in Ukraine
Kharkiv, UkraineCity in Ukraine
Kyiv, UkraineCity in Ukraine
Lviv, UkraineCity in Ukraine
Odesa, UkraineCity in Ukraine
Zaporozhye, UkraineCity in Ukraine
United Arab EmiratesCountry
Abu Dhabi, United Arab EmiratesCity in United Arab Emirates
Dubai, United Arab EmiratesCity in United Arab Emirates
Sharjah, United Arab EmiratesCity in United Arab Emirates
United KingdomCountry
Belfast, United KingdomCity in United Kingdom
Birmingham, United KingdomCity in United Kingdom
Blackpool, United KingdomCity in United Kingdom
Bournemouth, United KingdomCity in United Kingdom
Brighton, United KingdomCity in United Kingdom
Bristol, United KingdomCity in United Kingdom
Cardiff, United KingdomCity in United Kingdom
Coventry, United KingdomCity in United Kingdom
Derby, United KingdomCity in United Kingdom
Edinburgh, United KingdomCity in United Kingdom
Glasgow, United KingdomCity in United Kingdom
Hull, United KingdomCity in United Kingdom
Leeds, United KingdomCity in United Kingdom
Leicester, United KingdomCity in United Kingdom
Liverpool, United KingdomCity in United Kingdom
London, United KingdomCity in United Kingdom
Manchester, United KingdomCity in United Kingdom
Middlesbrough, United KingdomCity in United Kingdom
Newcastle, United KingdomCity in United Kingdom
Nottingham, United KingdomCity in United Kingdom
Plymouth, United KingdomCity in United Kingdom
Portsmouth, United KingdomCity in United Kingdom
Preston, United KingdomCity in United Kingdom
Sheffield, United KingdomCity in United Kingdom
Stoke-on-Trent, United KingdomCity in United Kingdom
Swansea, United KingdomCity in United Kingdom
United StatesCountry
Albuquerque, United StatesCity in United States
Atlanta, United StatesCity in United States
Austin, United StatesCity in United States
Baltimore, United StatesCity in United States
Baton Rouge, United StatesCity in United States
Birmingham, United StatesCity in United States
Boston, United StatesCity in United States
Charlotte, United StatesCity in United States
Chicago, United StatesCity in United States
Cincinnati, United StatesCity in United States
Cleveland, United StatesCity in United States
Colorado Springs, United StatesCity in United States
Columbus, United StatesCity in United States
Dallas-Ft. Worth, United StatesCity in United States
Denver, United StatesCity in United States
Detroit, United StatesCity in United States
El Paso, United StatesCity in United States
Fresno, United StatesCity in United States
Greensboro, United StatesCity in United States
Harrisburg, United StatesCity in United States
Honolulu, United StatesCity in United States
Houston, United StatesCity in United States
Indianapolis, United StatesCity in United States
Jackson, United StatesCity in United States
Jacksonville, United StatesCity in United States
Kansas City, United StatesCity in United States
Las Vegas, United StatesCity in United States
Long Beach, United StatesCity in United States
Los Angeles, United StatesCity in United States
Louisville, United StatesCity in United States
Memphis, United StatesCity in United States
Mesa, United StatesCity in United States
Miami, United StatesCity in United States
Milwaukee, United StatesCity in United States
Minneapolis, United StatesCity in United States
Nashville, United StatesCity in United States
New Haven, United StatesCity in United States
New Orleans, United StatesCity in United States
New York, United StatesCity in United States
Norfolk, United StatesCity in United States
Oklahoma City, United StatesCity in United States
Omaha, United StatesCity in United States
Orlando, United StatesCity in United States
Philadelphia, United StatesCity in United States
Phoenix, United StatesCity in United States
Pittsburgh, United StatesCity in United States
Portland, United StatesCity in United States
Providence, United StatesCity in United States
Raleigh, United StatesCity in United States
Richmond, United StatesCity in United States
Sacramento, United StatesCity in United States
Salt Lake City, United StatesCity in United States
San Antonio, United StatesCity in United States
San Diego, United StatesCity in United States
San Francisco, United StatesCity in United States
San Jose, United StatesCity in United States
Seattle, United StatesCity in United States
St. Louis, United StatesCity in United States
Tallahassee, United StatesCity in United States
Tampa, United StatesCity in United States
Tucson, United StatesCity in United States
Virginia Beach, United StatesCity in United States
Washington, United StatesCity in United States
VenezuelaCountry
Barcelona, VenezuelaCity in Venezuela
Barquisimeto, VenezuelaCity in Venezuela
Caracas, VenezuelaCity in Venezuela
Ciudad Guayana, VenezuelaCity in Venezuela
Maracaibo, VenezuelaCity in Venezuela
Maracay, VenezuelaCity in Venezuela
Maturín, VenezuelaCity in Venezuela
Turmero, VenezuelaCity in Venezuela
Valencia, VenezuelaCity in Venezuela
VietnamCountry
Can Tho, VietnamCity in Vietnam
Da Nang, VietnamCity in Vietnam
Hai Phong, VietnamCity in Vietnam
Hanoi, VietnamCity in Vietnam
Ho Chi Minh City, VietnamCity in Vietnam

Request for Mexico

curl "https://api.sorsa.io/v3/trends?woeid=23424900" -H "ApiKey: YOUR_API_KEY"

All 467 places X publishes trends for, from X's own list. Pick a WOEID to put it into the request.

Good to know

WOEID tables copied around the web mix up codes that sit next to each other: 23424868 is South Korea, not Mexico (23424900); 23424775 is Canada, not Australia (23424748); 455825 is Rio de Janeiro, not São Paulo (455827); 1105779 is Sydney, not Tokyo (1118370). A wrong code still returns a valid list, just for another place, so check the name before you store it.

City coverage is uneven. The United States has 63 trend cities, the United Kingdom 26 and Mexico 23, while 9 of the 62 countries, among them Belgium, Denmark and Portugal, have a national list only. X keeps no lists for states or regions.

Cities with their own trend list on X 404 cities in 53 of 62 countries; the 12 countries with the most: United States 63 United Kingdom 26 Mexico 23 India 21 Japan 21 Russia 19 Brazil 15 South Korea 14 Germany 12 Turkey 12 Indonesia 11 Philippines 11
X's 404 trend cities sit in 53 countries, and the United States alone has 63 of them.

#Get the posts behind each trend

A trend's query is a ready search: send it to POST /search-tweets (opens in a new tab) and Sorsa API returns the posts behind the trend, about 20 per request, each with its author's full profile. "order": "popular" gives the posts X ranks as Top; "latest" gives the newest first.

The script below reads Mexico's list and prints the three top posts for each of its five top trends. The code decodes a URL-encoded query before it goes into the search.

import requests
from urllib.parse import unquote_plus

API = "https://api.sorsa.io/v3"
HEADERS = {"ApiKey": "YOUR_API_KEY"}
MEXICO = 23424900

def get_trends(woeid):
    r = requests.get(f"{API}/trends", params={"woeid": woeid},
                     headers=HEADERS, timeout=30)
    r.raise_for_status()
    return r.json()["trends"]

def top_posts(query):
    body = {"query": query, "order": "popular"}
    r = requests.post(f"{API}/search-tweets", json=body,
                      headers=HEADERS, timeout=30)
    r.raise_for_status()
    return r.json()["tweets"]

for rank, trend in enumerate(get_trends(MEXICO)[:5], start=1):
    query = trend["query"]
    if "%" in query:  # decode a URL-encoded search
        query = unquote_plus(query)
    print(f"{rank}. {trend['name']}")
    for post in top_posts(query)[:3]:
        user = post["user"]["username"]
        print(f"   @{user}: {post['likes_count']} likes")

The posts are where a trends job gets expensive on the official X API. Each post costs $0.005, and from November 22, 2026 each post's author is billed as a $0.010 user read too (X's notice (opens in a new tab)), so 1,000 posts with their authors cost $15.00. For the posts behind trends, use Sorsa API: from $0.07 per 1,000 results, author profiles included.

Posts behind trends

Official X API

$1,500

for 100K posts

$0.015 per post with its author

Sorsa API

from$7

for 100K posts

from $0.07 per 1,000

To narrow a trend's posts by language, date or likes, add X operators to the query; the Twitter search API guide covers paging, and the Twitter search operators list has every filter.

#Keep a history of trends

No trends endpoint returns past lists, the official one included: each call is a snapshot of the moment, so a trend history is the snapshots you keep. Poll the places you track on a schedule and save each list with its time and rank.

X publishes no interval at which it recomputes the lists. Hourly snapshots suit dashboards and research; a newsroom watching breaking topics polls every 5 to 15 minutes. The script saves one snapshot of four places into SQLite.

Python
import sqlite3
import time
from datetime import datetime, timezone

import requests

API = "https://api.sorsa.io/v3/trends"
HEADERS = {"ApiKey": "YOUR_API_KEY"}
PLACES = {"Worldwide": 1, "United States": 23424977,
          "Mexico": 23424900, "Japan": 23424856}

db = sqlite3.connect("trends.db")
db.execute("""CREATE TABLE IF NOT EXISTS trends (
    taken_at TEXT, woeid INTEGER, place TEXT,
    rank INTEGER, name TEXT, query TEXT)""")

now = datetime.now(timezone.utc)
taken_at = now.strftime("%Y-%m-%d %H:%M:%S")
for place, woeid in PLACES.items():
    params = {"woeid": woeid}
    r = requests.get(API, params=params, headers=HEADERS, timeout=30)
    if r.status_code == 429:  # over 20 requests in one second
        time.sleep(1)
        r = requests.get(API, params=params, headers=HEADERS, timeout=30)
    r.raise_for_status()
    rows = [(taken_at, woeid, place, rank, t["name"], t["query"])
            for rank, t in enumerate(r.json()["trends"], start=1)]
    db.executemany("INSERT INTO trends VALUES (?, ?, ?, ?, ?, ?)", rows)
db.commit()

Run it every hour, for example from cron with 0 * * * * python3 save_trends.py. At 20 requests per second one key reads all 467 places in about 23 seconds, so even the full list fits an hourly run. After a day, one query shows what trended longest in Mexico:

SQL
SELECT name, COUNT(DISTINCT taken_at) AS hours
FROM trends
WHERE woeid = 23424900
  AND taken_at >= datetime('now', '-1 day')
GROUP BY name
ORDER BY hours DESC
LIMIT 10;

For posts older than your snapshots, a trend's query also works as a search back to 2006: historical Twitter data shows how. To get an alert the moment a new topic enters a list, compare each snapshot with the one before, as in real-time Twitter monitoring.

Both APIs bill trend data per list, so the monthly bill is places times refreshes: 25 places every hour make 18K lists a month, $180 on the official X API and from $25.20 on Sorsa API. Pick your own numbers below.

Monthly cost of trend lists for a 30-day month, with the time one pass takes at each API's rate limit.

On every measure that decides a trends job, Sorsa API comes out ahead of the official X API:

CriterionSorsa APIOfficial X API
Price per 1,000 trend listsfrom $1.40$10.00
Posts behind trends, per 1,000from $0.07, authors included$5.00, or $15.00 with authors from Nov 22
Rate limit20 requests per second75 requests per 15 minutes per app
One pass over all 467 placesabout 23 secondsabout 90 minutes
Setupone API keyapproved developer account, app, Bearer token
X account needednoyes
  • Price per 1,000 trend lists

    Sorsa API
    from $1.40
    Official X API
    $10.00
  • Posts behind trends, per 1,000

    Sorsa API
    from $0.07, authors included
    Official X API
    $5.00, or $15.00 with authors from Nov 22
  • Rate limit

    Sorsa API
    20 requests per second
    Official X API
    75 requests per 15 minutes per app
  • One pass over all 467 places

    Sorsa API
    about 23 seconds
    Official X API
    about 90 minutes
  • Setup

    Sorsa API
    one API key
    Official X API
    approved developer account, app, Bearer token
  • X account needed

    Sorsa API
    no
    Official X API
    yes

For a trends dashboard, a newsroom feed or a research archive, use Sorsa API: the same WOEIDs as X, about 7 times less per list, and the posts behind every trend from $0.07 per 1,000. Sorsa API never asks for your X login, so your own account is never at risk.

#Pull your first trend list

A trend list for any place is one request: pick the WOEID, call GET /trends, and send the top queries to POST /search-tweets for the posts behind them. Sorsa API does both with one key, from $1.40 per 1,000 lists and $0.07 per 1,000 posts, and the 100 free requests every new account gets cover your first 100 lists, with no card and no expiry.

#FAQ

Sorsa API is the best fit for Twitter trends in code. GET /trends returns X's list for any of 467 places by WOEID, from $1.40 per 1,000 lists against $10.00 on the official X API, at 20 requests per second with one API key and no developer account. The same key turns each trend into posts through POST /search-tweets, from $0.07 per 1,000 with authors included.

The official X API has no free tier: every trends call costs $0.010 from prepaid credits. Sorsa API gives every new account 100 free requests with no card and no expiry, which is 100 trend lists for any places you choose. To look at the lists without code, our free trends page shows worldwide and 25 countries, read every hour, with the last 24 hours.

No API returns past trend lists, the official X API included: each call is a snapshot of the current list. To see what trended last week, you need snapshots stored at the time, for example an hourly job that saves every list with its time and rank. On Sorsa API that job costs from about $1 a month for each place polled every hour.

For a city, yes, if it is one of X's 404 trend cities: New York is 2459115, Los Angeles 2442047 and Mexico City 116545. X keeps no lists for US states or other regions, so for a state use its largest trend city or the national list, 23424977. Sorsa API's GET /trends takes any of these WOEIDs.

What replaces trendsByPlace in twitter-api-v2?

trendsByPlace() in the twitter-api-v2 package for Node.js calls X's old v1.1 trends/place endpoint, which X's current documentation no longer lists. Its v2 counterpart in the same package is client.v2.trendsByWoeid(23424900), which calls GET /2/trends/by/woeid/{id} with an app-only Bearer token at $0.010 per call. Without an X developer account, one request to Sorsa API's GET /trends?woeid=23424900 returns Mexico's list.

#How we checked

On November 2, 2026 we read X's documentation for the trends endpoint (the introduction and the reference), its rate limits, its pay-per-use price list and its changelog, and X's October notice on billing for expansions. Every WOEID on this page was checked against X's own list of 467 trend locations as X returned it in August 2025, and the twitter-api-v2 answer against that package's documentation. Every Sorsa API request was written from our live API reference for /trends and /search-tweets; the response is an example with generic trend names, and prices per 1,000 come from the request rates on our pricing page.

By the Sorsa API team. We build and run Sorsa API, the read-only Twitter/X API and scraper, in production since 2022 (formerly TweetScout API) with 6B+ requests served. About Sorsa API

What changed
  • Rewritten from scratch: the official endpoint's November 2026 facts, all 467 WOEIDs checked against X's list in a finder, the posts behind each trend, hourly history code and a monthly cost calculator.
  • First published.