Twitter Trends — Find, Track, Automate
Twitter (now X) trends are the platform's real-time pulse: a list of topics with sudden surges in tweet volume, refreshed every 5-10 minutes. You see them in the side panel on twitter.com and in the Explore tab on mobile. They're location-specific by default — what trends in the US doesn't always trend in Japan.
Programmatic access to trends has gotten harder since the X API restructure in 2023. The official API gates trends data behind paid tiers ($200/month minimum on Basic). Third-party APIs offer the same data per-call, which is dramatically cheaper if you're just tracking trends for a project or building an alert system.
Below is how to view trends, pull them via API, and the common patterns for building trend-watching tools that hold up beyond toy projects.
How to View Twitter Trends
On twitter.com (web): the right sidebar shows the current trends list, scoped to your selected location. To change location, click "Show more" → settings → select country/city.
Mobile app: Explore tab → Trending tab. Same data, mobile layout.
Limitations of the in-app view: you can see ~10-25 trends at a time, with no historical view, no API for export, and Twitter chooses which trends to surface (personalized + algorithmically filtered). For analytical use (research, dashboards, alerts) you need API access.
Pulling Trends Via API
Official X API: the `/2/trends/by/woeid/{woeid}` endpoint returns trend lists by location ID ("Where on Earth ID"). Available on Basic tier ($200/month) and above. Returns up to 50 trends per location with tweet volume estimates.
Third-party APIs: providers like TwitterAPI.io expose `/v1/trends?location=USA` style endpoints with the same data. Pay-per-call (typically $0.15 per request) — cheap if you're polling once per hour.
Trend metadata you get: trend name (the hashtag or phrase), tweet_volume (estimated count over the past few hours), promoted flag (paid trend vs organic), and URL to a pre-filled search.
What you don't get: tweet content of the trending topic. You'll need a separate search call for that.
Common Use Cases
1. Brand alerts. Watch trends for keywords matching your brand or competitor. Poll trends every 5-10 minutes. When a brand-related term enters the list, alert your team — you might be having a moment (good or bad).
2. Content angle research. Pull trends every morning, score against your content calendar, and surface today's relevant topics. Useful for newsletters, podcasts, content marketing teams.
3. Geographic comparison. Pull trends for multiple cities/countries simultaneously. Detect what's a local trend vs global. Important for tracking event localization (sports, politics).
4. Trend velocity. Save trend lists each hour. Score how quickly a term rises through the rankings. Fast-climbing trends are often the most actionable for breaking news.
Building a Trend Alert System (Reference Architecture)
Minimum viable trend alert:
1. Poll the trends API every 5 minutes for your location(s) of interest.
2. Diff against the previous poll — what's new? what's gained > 30% volume?
3. Filter by relevance — your alert keywords, exclude noise like generic hashtags you don't care about.
4. Alert — Slack webhook, email, push notification. Include the trend name + tweet volume + a link to current top tweets for context.
Cost at this scale: ~12 trend API calls per hour × 24 = 288 calls/day. At $0.15/call (third-party), that's $1.30/month. Achievable on a free trial credit for testing.
Scaling: if you want city-level (10+ cities simultaneously), multiply calls by city count. Still under $20/month for serious monitoring at 10-city resolution.
Trends Limitations to Know
Volume estimates are rough. The `tweet_volume` field is heuristic, often off by 20-50% from actual counts. Don't use it for precise comparison; use it for ranking.
Promoted trends look identical. Twitter's API marks promoted (paid) trends with a flag — always filter these out unless you specifically want to see paid placements.
Time zones matter. Trends are localized but also time-localized — what's trending at 8am in Tokyo is different from 8am in Tokyo six months ago. Always store the timestamp alongside the trend.
No trend history from the API. You only get a current snapshot. If you want historical trend tracking, you must save each poll yourself to your own storage.
import requests
from datetime import datetime
API_KEY = "your_api_key"
HEADERS = {"X-API-Key": API_KEY}
def fetch_trends(location: str = "USA"):
r = requests.get(
"https://api.twitterapi.io/v1/trends",
params={"location": location},
headers=HEADERS,
timeout=30,
)
r.raise_for_status()
return r.json()["data"]
def alert_on_keyword(trends, watch_keywords):
matches = []
for t in trends:
if any(kw.lower() in t["name"].lower() for kw in watch_keywords):
matches.append({
"trend": t["name"],
"volume": t.get("tweet_volume"),
"detected_at": datetime.utcnow().isoformat(),
})
return matches
if __name__ == "__main__":
trends = fetch_trends("USA")
alerts = alert_on_keyword(trends, ["acmecorp", "product launch"])
if alerts:
# Send to Slack / email / your alert pipeline
print("ALERT:", alerts)Frequently asked
How often do Twitter trends update?
Every 5-10 minutes, refreshed based on real-time tweet volume signals. The exact cadence isn't published, but in practice you'll see rotation within 5-10 minute windows.
Can I see Twitter trends for any country?
Yes via API — pass the location name or WOEID (Where on Earth ID). 100+ countries and ~400 cities supported. The in-app view is limited to a personalized regional list, but API access gives full geographic flexibility.
Are trends personalized to me?
Yes in the app UI — Twitter blends your interests / follows into the algorithmic selection. Via the API you get the un-personalized location-based trend list (closer to the "raw" trending list for that region).
What does the tweet_volume number mean?
An estimate of tweets containing the trend term in the past few hours. It's heuristic and not exact — useful for ranking trends against each other, not for precise volume reporting.
How do I know if a trend is paid (promoted) or organic?
The API response includes a `promoted_content` field. Promoted trends are flagged here. Most monitoring use cases want to filter promoted trends out — they represent advertiser placements, not genuine community interest.
Continue reading
Starter credits cover end-to-end testing. No card, no application queue.