Twitter/X Trends Scraper avatar

Twitter/X Trends Scraper

Pricing

Pay per event

Go to Apify Store
Twitter/X Trends Scraper

Twitter/X Trends Scraper

Extract real-time trending topics from Twitter/X for any country, city, or worldwide. Get top 50 trends per location, hashtag detection, tweet volumes. No login required. 467 locations.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Extract real-time trending topics from Twitter/X for any country, city, or worldwide — no login required. Get top 50 trends per location with tweet volumes, 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), tweet volume where available, 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)
  • Supports country codes (US, UK, DE, JP, BR), "worldwide", and numeric WOEID city codes
  • Returns rank, tweet volume, hashtag flag, location metadata, and timestamp
  • 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

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
  • 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
🔢 tweetVolumeApproximate 24-hour tweet count (null if unavailable)
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)
asOfWhen Twitter last updated these trends
🕐 scrapedAtWhen this item was scraped by the actor

Each location returns up to 50 trends. Running for 3 locations (Worldwide + US + UK) gives up to 150 trend items.

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.

FreeStarter ($29/mo)Scale ($199/mo)Business ($999/mo)
Per trend$0.00023$0.0002$0.000156$0.00012
50 trends (1 location)$0.012$0.010$0.0078$0.006
500 trends (10 locations)$0.115$0.10$0.078$0.060

Plus a one-time run start fee of $0.003.

Real-world cost examples:

TaskLocationsTrendsDurationCost (Free tier)
Worldwide + US trends2100~15s~$0.026
Top 10 countries10500~60s~$0.118
All 62 countries623,100~5min~$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 50 — Twitter's maximum)
  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": 50
}
{
"locations": ["2459115", "44418", "2643743"],
"maxTrendsPerLocation": 20
}
{
"getAvailableLocations": true
}

Input parameters

ParameterTypeDefaultDescription
locationsarray["worldwide"]Location codes to scrape: country codes (US, UK, DE), "worldwide", or WOEID numbers
maxTrendsPerLocationinteger50Max trends per location (1-50, Twitter provides at most 50)
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
  • 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": 842300,
"tweetVolumeAvailable": true,
"isHashtag": true,
"isPromoted": false,
"locationName": "United States",
"locationWoeid": 23424977,
"countryName": "United States",
"countryCode": "US",
"locationType": "Country",
"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": "",
"countryCode": null,
"locationType": "Supername",
"asOf": "2026-04-01T14:00:00Z",
"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 — Twitter doesn't provide volume for all trends. tweetVolumeAvailable: false means volume data is unavailable from Twitter, not that the trend has low volume
  • 🔍 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 → export JSON → load into Elasticsearch → visualize with Kibana dashboards. See which topics are trending globally vs locally.

Using the Apify API

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: 50,
});
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": 50,
}
)
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": 50
}'

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"

Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com"
}
}
}

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 worldwide Twitter trends and search for related recent tweets for the top 3 trending topics"

Learn more in the Apify MCP documentation.

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 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.

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 for some trends? Twitter does not provide tweet volume data for all trending topics — this is a limitation of the Twitter API, not the actor. Topics with tweetVolumeAvailable: false are genuinely trending but Twitter chose not to expose their volume. This is common for local/niche trends.

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? This typically means the Twitter API returned an error. Try again after a few minutes. If the issue persists, check if the location code is valid using getAvailableLocations: true. Rate limiting is rarely an issue for trend scraping since it uses the v1.1 guest token endpoint.

Can I get historical trend data? No — Twitter's trends API only returns current trends (last refresh cycle). To build historical data, schedule recurring runs and store each run's output in a database.

Other social media scrapers