Twitter/X Trends Scraper avatar

Twitter/X Trends Scraper

Pricing

from $0.12 / 1,000 trend scrapeds

Go to Apify Store
Twitter/X Trends Scraper

Twitter/X Trends Scraper

Extract real-time trending topics and hashtags from Twitter/X for any country or city, plus past hourly trend lists. Top 50 trends per location across 467 locations, with cross-location overlap. No login required.

Pricing

from $0.12 / 1,000 trend scrapeds

Rating

5.0

(4)

Developer

Automation Lab

Automation Lab

Maintained by Community

Actor stats

2

Bookmarked

450

Total users

138

Monthly active users

9 minutes ago

Last modified

Categories

Security

Limited permissions

Share

Extract real-time trending topics and hashtags from Twitter/X for any country, city, or worldwide — no login required. Get the top 50 trends per location, past hourly trend lists, hashtag detection, and bulk multi-location support in a single run.

The Twitter/X Trends Scraper uses the official Twitter v1.1 trends API via guest token authentication. It supports 467 locations (62 countries + 400+ cities) and works without any Twitter account or API key.

Twitter/X Trends Scraper fetches the current top 50 trending topics for any location on Twitter/X. Each trend includes the trend name (hashtag or keyword phrase), its rank, a direct Twitter search URL, and metadata about the location.

  • Scrape trends for multiple locations in one run (US + UK + Worldwide + Tokyo in a single job)
  • See cross-location overlap immediately with location count, involved locations, and best rank for every topic
  • Supports country codes (US, UK, DE, JP, BR), "worldwide", and numeric WOEID city codes
  • Returns rank, hashtag flag, location metadata, and timestamp
  • Add past hourly trend lists per location (roughly the last 17 hours) with historySnapshots, without waiting for your own schedule to build a history
  • Use the built-in location discovery mode to see all 467 available locations with their WOEID codes
  • Pure HTTP actor — fast and cost-efficient, no browser overhead

Who is it for?

Social media managers and content teams — track what's trending in your target markets before publishing content. Know which hashtags are hot right now so your posts get seen. Monitor competitor hashtag performance across regions.

Brand monitoring and PR teams — detect trending topics relevant to your industry or brand. Set up scheduled runs every hour to get early alerts when brand-related terms start trending. Export to Google Sheets for team visibility.

Market researchers and analysts — compare trending topics across countries to understand regional cultural differences. Track trending topics over time for longitudinal research. Build datasets for academic or commercial trend analysis.

Developers and data engineers — integrate Twitter trend data into dashboards, Slack bots, or monitoring pipelines via the Apify API. Schedule runs hourly or daily and export results to databases, Google Sheets, or any webhook endpoint.

Journalists and news teams — quickly see what topics are going viral in specific countries before writing breaking news stories. Cross-reference with other sources to verify trend significance.

  • ✅ No login required — works with Twitter's public API via guest token
  • ✅ 467 locations — scrape trends for 62 countries, 400+ cities, or worldwide
  • ✅ Bulk multi-location — fetch all locations in one run, not one by one
  • ✅ Trend history on demand — past trend lists per location, newest first, from the public trends24.in archive
  • ✅ Location discovery mode — built-in tool to find any city's WOEID code
  • ✅ Pay-per-trend pricing — no wasted spend; pay only for what you scrape
  • ✅ Scheduled runs — set up hourly or daily monitoring via Apify cron
  • ✅ API + integrations — export to CSV, JSON, Google Sheets, webhooks

What data can you extract?

FieldDescription
📊 rankPosition in the trending list (1-50)
🏷️ nameTrend name: hashtag (#AI) or keyword phrase
🔢 tweetVolumeTweet count when X reports it. X has stopped publishing this on public routes, so it is currently null
✅ tweetVolumeAvailableWhether tweet volume data exists for this trend
#️⃣ isHashtagTrue if trend starts with #
📢 isPromotedTrue if trend is paid/promoted content
🔗 twitterSearchUrlDirect Twitter search URL for this trend
🔍 queryURL-decoded search query string
📍 locationNameLocation name (e.g., "United States")
🌍 locationWoeidYahoo WOEID numeric ID
🏳️ countryCodeISO 2-letter code (e.g., "US", "DE")
🌐 countryNameFull country name
🗂️ locationType"Country", "Town", or "Supername" (worldwide)
🕰️ snapshotTypelive for the current list, history for a past list
📅 snapshotAtWhen this trend list was current
⌛ hoursAgoAge of the list in hours; 0 for live rows
⏰ asOfWhen Twitter last updated these trends
🕐 scrapedAtWhen this item was scraped by the actor
🌐 locationCountNumber of distinct requested locations where the topic is trending
📍 locationsTrendingInLocation names where the topic appears, in input order
🥇 bestRankBest (lowest) rank for the topic across requested locations

Each location returns up to 50 trends. Running for 3 locations (Worldwide + US + UK) gives up to 150 trend items. Overlap fields on live rows are calculated across the complete run, so you can filter globally shared topics without joining rows yourself. A single-location run reports locationCount: 1, that location in locationsTrendingIn, and the row's rank as bestRank.

On history rows, locationCount is always 1 and bestRank is the topic's best rank in that location across the returned past lists. History rows never have tweet volume or promoted flags, because the archive does not show them.

This Actor uses pay-per-event pricing — you pay only for the trends you scrape. No monthly subscription required. All platform compute costs are included.

Apify planPrice per trend
Free$0.000230
Bronze$0.000200
Silver$0.000156
Gold$0.000120
Platinum$0.000080
Diamond$0.000056

Every run that returns results also has a one-time $0.003 start fee. Past trend lists are charged per trend like live trends. Bad input and empty results cost nothing.

From 2026-11-21 the price per trend will be: Free $0.000200, Bronze $0.000200, Silver $0.000180, Gold, Platinum and Diamond $0.000160.

Real-world cost examples:

TaskLocationsTrendsDurationCost (Free tier)
Worldwide + US trends2100~15s~$0.026
Top 10 countries10500~30s~$0.118
All 62 countries623,100~2min~$0.716

Free plan: Apify gives $5 in free credits — enough to scrape ~20,000 trends.

  1. Go to Twitter/X Trends Scraper on Apify Store
  2. Enter the locations you want to monitor: worldwide, US, UK, DE, JP — or any country code
  3. Set maxTrendsPerLocation (default 20 to keep runs inexpensive; maximum 50)
  4. Click Save & Run
  5. Download results as JSON, CSV, or Excel from the Dataset tab

To find city WOEID codes: Enable the getAvailableLocations option — the actor will output all 467 available locations with their WOEID codes. Then use the numeric WOEID (e.g., 2459115 for New York, 44418 for London).

Example inputs:

{
"locations": ["worldwide", "US", "UK", "JP", "BR"],
"maxTrendsPerLocation": 20
}
{
"locations": ["2459115", "44418", "Tokyo"],
"maxTrendsPerLocation": 20
}
{
"locations": ["US", "JP"],
"maxTrendsPerLocation": 10,
"historySnapshots": 6
}
{
"getAvailableLocations": true
}

Input parameters

ParameterTypeDefaultDescription
locationsarray["worldwide"]Locations to scrape: "worldwide", country codes (US, UK, DE), place names (Tokyo, New York), or WOEID numbers
maxTrendsPerLocationinteger20Max trends per location (1-50, Twitter provides at most 50)
historySnapshotsinteger0Past trend lists to add per location, newest first (0-24). Lists are roughly 45 minutes apart and reach back about 17 hours
getAvailableLocationsbooleanfalseOutput all 467 available locations with WOEID codes instead of trends

Supported location formats:

  • "worldwide" or "WW" — global trending topics (WOEID 1)
  • Country codes: "US", "UK" or "GB", "DE", "FR", "JP", "BR", "IN", "MX", and 50+ others
  • Place names: "Tokyo", "New York", "Germany" (exact names from location discovery)
  • WOEID numbers: any numeric string like "2459115" (New York), "44418" (London)

Output examples

{
"rank": 1,
"name": "#WorldCup",
"twitterSearchUrl": "http://twitter.com/search?q=%23WorldCup",
"query": "#WorldCup",
"tweetVolume": null,
"tweetVolumeAvailable": false,
"isHashtag": true,
"isPromoted": false,
"locationName": "United States",
"locationWoeid": 23424977,
"countryName": "United States",
"countryCode": "US",
"locationType": "Country",
"snapshotType": "live",
"snapshotAt": "2026-04-01T14:30:00Z",
"hoursAgo": 0,
"locationCount": 2,
"locationsTrendingIn": ["Worldwide", "United States"],
"bestRank": 1,
"asOf": "2026-04-01T14:30:00Z",
"scrapedAt": "2026-04-01T14:35:22.123Z"
}
{
"rank": 3,
"name": "April Fools",
"twitterSearchUrl": "http://twitter.com/search?q=%22April+Fools%22",
"query": "April Fools",
"tweetVolume": null,
"tweetVolumeAvailable": false,
"isHashtag": false,
"isPromoted": false,
"locationName": "Worldwide",
"locationWoeid": 1,
"countryName": null,
"countryCode": null,
"locationType": "Supername",
"snapshotType": "history",
"snapshotAt": "2026-04-01T11:00:00.000Z",
"hoursAgo": 3.6,
"locationCount": 1,
"locationsTrendingIn": ["Worldwide"],
"bestRank": 3,
"asOf": "2026-04-01T11:00:00.000Z",
"scrapedAt": "2026-04-01T14:35:25.456Z"
}

Tips for best results

  • 🔁 Schedule runs hourly to track trend velocity — see the Apify Scheduler in your actor settings
  • 📊 Start small — run with 1-2 locations first to verify the output before scraping all 62 countries
  • 🌍 Use country codes for simplicity; switch to WOEID numbers when you need city-level granularity
  • 📂 Export to Google Sheets for easy team sharing and charting — see Integrations below
  • ⚠️ Note on tweet volume — X no longer publishes tweet counts on public routes, so tweetVolume is currently null and tweetVolumeAvailable is false. It does not mean the trend has low volume. Use rank and hoursAgo to judge momentum
  • 🔍 Use getAvailableLocations first to discover the exact city codes before setting up a production run

Integrations

Twitter Trends → Google Sheets (daily briefing) Connect via Make or Zapier: trigger the actor daily, push new dataset items to a Google Sheet. Your team sees yesterday's top trends every morning.

Twitter Trends → Slack alert Schedule hourly runs, then use Apify webhooks to POST new trend data to a Slack channel. Get notified the moment a relevant keyword starts trending.

Twitter Trends → Database (BigQuery, Snowflake) Use the Apify API to pull dataset items after each run and insert into your data warehouse. Build historical trend timelines for longitudinal research.

Twitter Trends → Zapier automation Trigger Zapier workflows whenever specific keywords appear in trends. Automatically add trending hashtags to your social media scheduling queue.

Monitoring pipeline Run for 10+ countries every hour → filter on locationCount or bestRank → export JSON → load into Elasticsearch → visualize with Kibana dashboards. See which topics are trending globally vs locally without a separate aggregation step.

API usage

Node.js:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/twitter-trends-scraper').call({
locations: ['worldwide', 'US', 'UK'],
maxTrendsPerLocation: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} trends`);

Python:

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("automation-lab/twitter-trends-scraper").call(
run_input={
"locations": ["worldwide", "US", "UK"],
"maxTrendsPerLocation": 20,
}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["name"], "|", item["locationName"], "| rank:", item["rank"])

cURL:

curl -X POST "https://api.apify.com/v2/acts/automation-lab~twitter-trends-scraper/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locations": ["worldwide", "US", "UK"],
"maxTrendsPerLocation": 20
}'

Use with AI agents via MCP

Twitter/X Trends Scraper is available as a tool for AI assistants that support the Model Context Protocol (MCP).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

Setup for Claude Code

$claude mcp add --transport http apify "https://mcp.apify.com/?tools=automation-lab/twitter-trends-scraper"

Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com/?tools=automation-lab/twitter-trends-scraper"
}
}
}

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

Example prompts

Once connected, try asking your AI assistant:

  • "Use automation-lab/twitter-trends-scraper to get the top trends in the US, UK, and Japan right now and show me which are hashtags vs keyword phrases"
  • "Scrape Twitter trends for all major European countries and tell me which topics are trending in multiple regions simultaneously"
  • "Get the trending hashtags in Japan over the last few hours and tell me which are new since this morning"

Learn more in the Apify MCP documentation.

Legality

Yes — trend data extracted by this actor is publicly available. Twitter displays trending topics to all users without requiring a login, and the v1.1 trends API endpoints and the trends24.in archive accessed here are publicly accessible. The actor uses a guest token in the same way a standard browser does when visiting twitter.com.

This actor only accesses publicly visible trend information — not private user data, direct messages, or account-protected content. Usage remains subject to Twitter's Terms of Service. We recommend using the data responsibly and for ethical purposes only.

This actor is not affiliated with or endorsed by X Corp. or trends24.in.

For questions about GDPR compliance or commercial use, consult your legal advisor.

FAQ

How often does Twitter update trending topics? Twitter updates trending topics approximately every 5-10 minutes. Running the actor hourly provides good coverage for monitoring use cases. If you need near-real-time data, Apify Scheduler supports runs as frequent as every few minutes.

Why is tweetVolume null? X has stopped publishing tweet counts on the public trend routes, so the field is currently null on every row. We checked other public sources and comparable tools on 2026-11-06 and they return none either. The field stays in the output and fills again if X brings the count back. Rank and history are the reliable signals today.

What does WOEID mean? WOEID stands for "Where on Earth ID" — a numeric identifier from Yahoo's GeoPlanet system that Twitter uses to identify geographic locations. Run the actor with getAvailableLocations: true to see all 467 available locations and their WOEID codes.

How many locations does Twitter support? Twitter provides trend data for 467 locations: 1 worldwide, 62 countries, and 404 cities. Not all cities are available — it depends on Twitter's data availability for that region.

Why are all 50 trend results showing but some countries return fewer? Twitter guarantees up to 50 trends per location but may return fewer for locations with limited trend data. The actor returns whatever Twitter provides.

The actor returned 0 trends — what happened? The run's status message says why: an unknown location, a source failure or the spending limit. Bad input and empty results are not charged. Check valid names and codes with getAvailableLocations: true.

Can I get historical trend data? Yes, for roughly the last 17 hours: set historySnapshots to get past trend lists per location from the public trends24.in archive. For a longer history, schedule recurring runs and store each run's output.

What is sent to error reporting? Failed operations send sanitized diagnostic input, exceptions and Actor, build and run IDs to our private GlitchTip service so we can repair them. Secret fields and URL queries are removed, and reports are kept for 30 days.

Other social media scrapers