Twitter Trends Scraper By City & Multiple Countries
Pricing
Pay per usage
Twitter Trends Scraper By City & Multiple Countries
Twitter Trends Scraper fetches real-time trending topics from X (Twitter), including trend names, ranks, tweet volume, and regional or global availability. Ideal for trend monitoring, audience insights, news tracking, research, and automating fast, structured trend data collection at scale.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
SimpleAPI
Maintained by CommunityActor stats
0
Bookmarked
8
Total users
0
Monthly active users
5 days ago
Last modified
Categories
Share
Twitter Trends Scraper By City & Multiple Countries
Scrape live X (Twitter) trending topics for many locations in a single run — worldwide, 62 countries and 402 cities — and get every trend back with its rank, its location, the country code and the WOEID it came from.
Most Twitter trends scrapers return one board per run for one country, with no location stamped on the row, so comparing markets means running the actor a dozen times and stitching the CSVs together yourself. This Twitter trending topics scraper takes a list of places, resolves each one against X's own public location catalogue, and returns a single flat dataset you can pivot by city or by country immediately.
What is Twitter Trends Scraper By City & Multiple Countries?
It's an Apify actor that pulls live trending topics from X (Twitter) for as many places as you list in one run. Give it country codes, country names, city names or raw WOEIDs — "US", "Brazil", "New York", "sao-paulo", "2459115" all work — and it resolves each against X's real 467-location catalogue (worldwide + 62 countries + 402 cities), fetches that location's current top 50 trends through an anonymous guest-token session (no login, no cookies, no X account), and returns rows tagged with locationName, locationType, countryCode and woeid so you can slice the result by market without extra joins. A legacy single-country mode (the original getdaytrends.com board) ships alongside it for existing schedules that only ever tracked one country.
What data can I extract with Twitter Trends Scraper By City & Multiple Countries?
Trend rows (type: "trend", one per trend per location):
| Field | Description |
|---|---|
rank | Position on that location's board, 1 = highest. |
trend | The trend name or hashtag text. |
isHashtag | true if the trend starts with #. |
locationName / locationType / countryCode / countryName / woeid | Which place this trend came from. |
searchUrl | Direct X search URL for the trend. |
dataSource | x_guest_api (multi-location engine) or getdaytrends (legacy board). |
timePeriod | Live, or an hour-offset label for the legacy board. |
snapshotTimeUtc / time / scrapedAt | When X (or getdaytrends) generated the board vs. when the row was captured. |
Location rows (type: "location", catalogue mode): woeid, locationName, locationType, countryName, countryCode, parentWoeid — the full list of 467 places you can pass into locations.
Error/accounting rows (type: "error", uncharged): errorReason such as location_not_found, no_trends_returned or archive_endpoint_gone, so a failed location is visible in the dataset instead of silently missing.
Why not build this yourself?
X doesn't publish a documented public trends API — the endpoint this actor uses (trends/place.json) is X's own internal web-client surface, reached with an anonymous guest token that expires and rate-limits at roughly 15 calls per 15 minutes. Building this yourself means reverse-engineering the guest-token handshake, handling 429s with token rotation, and maintaining a location-name-to-WOEID lookup table for 467 places by hand. This actor already does all three, plus keeps the older getdaytrends.com HTML-scrape board working for anyone with an existing single-country workflow.
One honest limitation worth knowing before you rely on trend volume: X's own guest API returns tweet_volume: null on every trend at this endpoint, and getdaytrends' fallback selector was found to silently emit the trend name itself as a fake "volume" on roughly a quarter of rows. Rather than ship a column that's either empty or wrong, this actor doesn't emit a volume field at all — rank is the reliable ordering signal instead.
How to use data extracted from Twitter Trends Scraper By City & Multiple Countries?
- Social media managers — compare what's trending in each market you post into before scheduling content, instead of guessing from one country's board.
- PR and crisis-comms teams — watch a city-level trend list for early spikes tied to a brand, product or event, filtered down to the exact metro that matters.
- Market researchers — build a cross-country trend index over repeated scheduled runs to see which topics travel between markets and which stay local.
- Growth and content teams — feed
trend+searchUrlstraight into a content-ideation pipeline, deduplicated bywoeidso the same global trend isn't double-counted per city.
🔼 Input sample
| Parameter | Required | Type | Description | Example |
|---|---|---|---|---|
locations | No | array | Places to track: country code, country name, city name/slug, "City, CC", raw WOEID, or worldwide. Leave empty to fall back to the legacy single-country board below. | ["worldwide", "US", "New York", "London", "JP"] |
maxTrendsPerLocation | No | integer | Cap trends kept per location (1-50, X publishes 50 per place). Default 50. | 10 |
listAvailableLocations | No | boolean | Catalogue mode — return the 467-place list instead of trends, to discover exact names/WOEIDs. Default false. | false |
catalogueTypeFilter | No | string | Narrows catalogue mode: all, city, country, worldwide. | "city" |
country | No | string | Legacy single-country enum for the original getdaytrends.com board. Empty = worldwide. | "US" |
live | No | boolean | Legacy board: scrape the current board now. | true |
hour1-hour23 | No | boolean | Legacy board: rewind N hours (1-23). | false |
yesterday / day2 / day3 / weekAgo / monthAgo / yearAgo | No | boolean | Legacy date-archive toggles. Common pitfall: getdaytrends' date archive now returns HTTP 520 for every date — these are accepted for backward compatibility but only produce an uncharged archive_endpoint_gone accounting row, never real data. | false |
startUrls | No | array | Extra raw getdaytrends URLs to scrape alongside everything else. | ["https://getdaytrends.com/japan/3/"] |
maxRetries | No | integer | Retry attempts per failed legacy-board page fetch. Default 3. | 3 |
requestTimeoutSecs | No | integer | Per-request timeout for both engines. Default 30. | 30 |
proxy | No | object | Optional — both engines work with no proxy; guest-token quota is handled by token rotation, not IP rotation. | {"useApifyProxy": false} |
{"locations": ["worldwide", "US", "New York", "London", "JP"],"maxTrendsPerLocation": 10}
🔽 Output sample
{"type": "trend","dataSource": "x_guest_api","timePeriod": "Live","rank": 1,"trend": "#WorldCupFinal","isHashtag": true,"locationName": "New York","locationType": "city","countryCode": "US","countryName": "United States","woeid": 2459115,"parentWoeid": 23424977,"searchUrl": "https://x.com/search?q=%23WorldCupFinal","snapshotTimeUtc": "2026-07-26T14:02:00Z","time": "2026-07-26T14:02:00Z","scrapedAt": "2026-07-26T14:03:11Z"}
How do you filter and target specific X trends?
Pass exactly the mix of places you need in locations — country codes for national boards, city names for metro-level trends, or worldwide for the global board — and every row comes back stamped with enough location metadata to filter or group downstream without a lookup table.
Just three global markets, top 10 each:
{ "locations": ["US", "GB", "JP"], "maxTrendsPerLocation": 10 }
City-level only, disambiguated where the name is ambiguous:
{ "locations": ["New York", "Birmingham, GB", "sao-paulo"], "maxTrendsPerLocation": 50 }
Discover exact city names/WOEIDs first, filtered to cities only:
{ "listAvailableLocations": true, "catalogueTypeFilter": "city" }
▶️ Want to try other scrapers?
| Actor | What it does |
|---|---|
| twitter-x-posts-scraper-replies | Scrape X posts and their reply threads. |
| x-twitter-posts-search-by-advanced-keyword-filters | Search X posts with advanced keyword filters. |
| twitter-x-reply-scraper-with-replier-contact-leads | Pull repliers to an X post as contact leads. |
How to extract Twitter trends programmatically
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("SimpleAPI/twitter-trends-scraper-by-city-multiple-countries").call(run_input={"locations": ["worldwide", "US", "New York", "London", "JP"],"maxTrendsPerLocation": 10,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["locationName"], item["rank"], item["trend"])
Every run's dataset can also be exported straight to JSON, CSV, Excel or an API endpoint from the Apify Console — no code needed for a one-off pull.
Is it legal to scrape X (Twitter) trends?
Scraping publicly accessible data — including public trending-topics boards — is generally lawful in the US under the precedent set in hiQ Labs v. LinkedIn, which held that scraping data not gated behind a login does not violate the Computer Fraud and Abuse Act. This actor reads only X's own public, anonymous guest-token trends surface — the same data any visitor sees, without an account or login. If you extract data tied to identifiable people, GDPR (EU) and CCPA (California) still govern what you do with it, so review your own use case, especially for storage, resale or profiling.
❓ FAQ
Does this need an X (Twitter) account or API key? No. It uses X's own public anonymous guest-token endpoint — the same one your browser gets when you visit x.com without logging in. No login, cookie or developer API key is required.
Why doesn't the output include trend volume (tweet counts)?
X's guest API returns tweet_volume: null on every trend at this endpoint, and the legacy getdaytrends fallback was found to silently substitute the trend name itself as a fake volume on about a quarter of rows. Shipping a column that's either always empty or sometimes wrong would be worse than omitting it, so volume isn't emitted.
How many locations can I track in one run? As many as you list. The catalogue covers 467 places (worldwide, 62 countries, 402 cities); each resolved location costs one API call against a shared 15-calls-per-15-minutes guest-token quota, which the actor rotates through automatically on 429s.
What happens if I misspell a city name?
The actor tries an exact match, then a slug match, then a substring match. An ambiguous substring match (e.g. "Springfield") picks the first hit and logs the alternatives; a name with no match at all produces an uncharged location_not_found accounting row instead of stopping the run.
Can I still run this the old single-country way?
Yes. Leave locations empty and use country plus live/hour1-hour23 exactly as the original getdaytrends-based actor worked — every existing schedule keeps running unchanged.
Do the date-archive toggles (yesterday, weekAgo, etc.) still work?
No — getdaytrends' date-archive pages now return HTTP 520 for every date. These toggles are still accepted so old input JSON doesn't break validation, but they only emit an uncharged archive_endpoint_gone row. Use live locations tracking on a schedule instead of historical lookback.
How is this different from other Twitter/X trends scrapers on Apify?
As observed on the Apify Store on 2026-07-26, the other Twitter trends actors we reviewed return one country or one board per run with no per-row location field, so multi-market comparison means running the actor repeatedly and merging results yourself. This actor resolves a list of mixed country/city/WOEID inputs in a single run and stamps every row with locationName, locationType, countryCode and woeid for direct multi-market analysis.
What's the difference between a "board" row and a "sidebar" row on the legacy engine?
getdaytrends' page renders four tables: two make up the 50-row main board, and two are 10-row sidebar panels ("top by score" and "longest trending"). Every row carries a sourcePanel field so you can tell which table it came from and exclude sidebar rows if you only want the primary board.
Conclusion
Twitter Trends Scraper By City & Multiple Countries turns X's anonymous guest-token trends surface into a multi-market dataset in one run — list the places you care about, get back ranked trends stamped with location, country and WOEID, ready to pivot without extra API calls or manual stitching.