Twitter Trends Scraper
Pricing
from $0.50 / 1,000 trend scrapeds
Twitter Trends Scraper
Collect X (Twitter) trending topics by country, city, or worldwide with historical snapshots, rank history, source URLs, and retrieval timestamps.
Pricing
from $0.50 / 1,000 trend scrapeds
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
5
Total users
3
Monthly active users
5 days ago
Last modified
Categories
Share
What is Twitter Trends Scraper?
Twitter Trends Scraper collects the X (Twitter) trending topics for worldwide, a country or a major city and returns one dataset row per trend. Each row carries the rank, trend name, a hashtag flag, a ready-made x.com search link, the location and WOEID, the time window, and an optional history of rank samples. Social listening teams, newsrooms, content planners, market researchers and AI agents use it to see what is trending right now or a few hours or days ago, with no X login, developer account or API key.
Best fit for this Actor
- Designed for trend boards. Use it when the question is "what is trending in this place at this time", across one location or many.
- Live and historical snapshots.
windowreturns the live board (now) or a snapshot from1hup to7dback, andcustomaccepts a UTC date and hour. - Market comparison. Several
locationsin one run give one row per location per rank, or one merged row per trend withdeduplicateAcrossLocations. - Next step to the conversation. When a trend matters, then pass its
nameto X (Twitter) Tweet Scraper to collect the tweets behind it. - Search-interest context. For checking whether a trend also shows up in web search demand, continue with Google Trends Scraper.
What people and AI agents ask this Actor to do
What is trending on X worldwide right now? Compare the top trends in the United States, Brazil and Japan. Show me only the hashtag trends in the United Kingdom from 24 hours ago. Which locations can I pull trends for?
| Request | Input to send |
|---|---|
| Live worldwide board | {"locations": ["worldwide"], "window": "now"} |
| Three-market comparison | {"locations": ["united-states", "brazil", "japan"], "maxTrendsPerLocation": 20} |
| Hashtags from a day ago | {"locations": ["united-kingdom"], "window": "24h", "hashtagOnly": true} |
| A specific past hour | {"locations": ["worldwide"], "window": "custom", "customDateTime": "2026-08-01 16"} |
| One row per trend across markets | {"locations": ["united-states", "canada"], "deduplicateAcrossLocations": true} |
| The supported location catalog | {"listAvailableLocations": true} |
Workflow example: a morning trend briefing for an editorial team
A social editor starts each morning with a scheduled run for worldwide, united-states and united-kingdom at window: "now" with maxTrendsPerLocation set to 20. The dataset returns ranked trends with searchUrl links and short history arrays that show whether each topic is climbing or fading. The editor exports the rows to the team sheet, compares them with the 24h snapshot to spot fresh entries, and feeds the most promising trend names to X (Twitter) Tweet Scraper for the actual posts.
How to scrape X trends
- Add one or more places in Locations: slugs such as
united-states, display names such asBrazil, trends-board page URLs, or WOEIDs such as23424977. - Pick a Window and set Max trends per location.
- Click Start, then export the dataset or read it through the API.
Input
{"locations": ["worldwide", "united-states"],"window": "now","maxTrendsPerLocation": 20,"hashtagOnly": false,"deduplicateAcrossLocations": false,"includeHistory": true}
| Field | Type | What it controls |
|---|---|---|
locations | array | Location slugs, display names, trends-board page URLs or WOEIDs. Starts with worldwide in the form. |
window | string | now, 1h, 2h, 3h, 6h, 12h, 24h, 2d, 3d, 7d or custom. Default now. |
customDateTime | string | UTC YYYY-MM-DD HH or ISO time, used when window is custom. |
maxTrendsPerLocation | integer | Trend rows per location per window. The board lists up to 50. Default 50. |
hashtagOnly | boolean | Keep only trends that start with #. Default false. |
deduplicateAcrossLocations | boolean | Merge repeats of a trend across locations into one row with a locations array. Default false. |
includeHistory | boolean | Attach history samples of time and rank for each trend. Default true. |
listAvailableLocations | boolean | Return the supported location catalog (slug, display name, country, WOEID) instead of trends. Default false. |
proxyConfiguration | object | Apify Proxy settings. Residential is preset in the form, and datacenter works for most runs. |
Output
Each trend row describes one trend at one rank, in one location, for one time window.
| Field | What it contains |
|---|---|
recordType | trend for trend rows |
rank, name, hashtag | Position on the board, trend text, and whether it is a hashtag |
searchUrl | Direct x.com/search link for the trend |
url | Trend page on the public trends board |
promoted | Whether the trend is marked as promoted |
location, locationSlug, woeid | Place name, slug and Yahoo WOEID |
windowLabel, windowHoursBack | Snapshot window, such as Now and 0 |
history | Array of { "t", "rank" } samples showing recent rank movement |
source, scrapedAt | Provenance and collection time |
{"recordType": "trend","rank": 1,"name": "#AEWDynamite","hashtag": true,"url": "https://getdaytrends.com/trend/%23AEWDynamite/","searchUrl": "https://x.com/search?q=%23AEWDynamite","promoted": false,"location": "Worldwide","locationSlug": "worldwide","woeid": 1,"windowLabel": "Now","windowHoursBack": 0,"history": [{ "t": "2026-09-30T18:33:43.387Z", "rank": 50 },{ "t": "2026-10-01T00:33:43.387Z", "rank": 50 },{ "t": "2026-10-01T01:33:43.387Z", "rank": 1 }],"source": "getdaytrends","scrapedAt": "2026-10-01T01:33:43.392Z"}
Each run also writes OUTPUT and RUN_SUMMARY to the default key-value store, with an outcome of COMPLETE, PARTIAL, VALID_EMPTY, INVALID_INPUT or UPSTREAM_FAILED that scripts and agents can branch on.
Pricing
This Actor uses Pay per event with Apify platform usage included in the event price. Two events apply: Actor Start once per run, and Trend scraped once per trend row in the dataset. For example, three locations with maxTrendsPerLocation set to 20 create up to 60 Trend scraped events plus one Actor Start event, so locations × maxTrendsPerLocation tells you the ceiling before you start. The live Pricing tab on this page shows the current event prices.
API example
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~twitter-trends-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"locations": ["worldwide", "japan"], "window": "now", "maxTrendsPerLocation": 10}'
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("khadinakbar/twitter-trends-scraper").call(run_input={"locations": ["united-states", "brazil"],"window": "24h","maxTrendsPerLocation": 15,})for trend in client.dataset(run["defaultDatasetId"]).iterate_items():print(trend["location"], trend["rank"], trend["name"])
Use with AI agents through Apify MCP
Connect this Actor to Claude, ChatGPT, Cursor or any MCP client through Apify MCP, then ask:
Get the top 10 X trends right now for worldwide, the United States and India. Group them by location, flag hashtags, and tell me which trends appear in more than one place.
Agent checklist:
- Set
locations,windowandmaxTrendsPerLocation; the row ceiling is locations times that cap, which keeps cost predictable. - Read rows with
get-dataset-itemsand citesearchUrlandscrapedAtfor each trend. - Set
includeHistorytofalsewhen you only need names and ranks and want shorter rows. - Read
OUTPUT.outcometo confirm the run status before summarising.
Best results
| Starting situation | Helpful action | Expected outcome |
|---|---|---|
| Unsure of a location's slug | Run once with listAvailableLocations: true | A catalog of slugs, names and WOEIDs to copy |
| Comparing markets | Keep deduplicateAcrossLocations at false | One row per location, easy to pivot by market |
| Building a global list | Set deduplicateAcrossLocations to true | One row per trend with all its locations |
| Campaign hashtag research | Set hashtagOnly to true | Only # trends |
| A trend timeline | Schedule the same input hourly and compare rank by name | A rank time series per trend |
| Looking back at an event | Use window: "custom" with the UTC hour | The board as it looked at that hour |
Builder's note
I built this around the trend board itself, because most trend questions are about a place and a moment rather than a single tweet. I learned that a short rank history says more than a single rank, so each row can carry its recent samples, and a cheap flag drops them when an agent wants lean rows. My goal was a predictable cost model, which is why rows are capped per location and the cap is the only number you need to budget.
FAQ
Do I need an X account or API key?
No. The Actor reads a public trends board and needs no login, developer account or key.
How far back can I look?
Windows go from 1h to 7d, and custom accepts a specific UTC date and hour.
Can I get the tweets for a trend?
Pass the trend name to X (Twitter) Tweet Scraper as a search term.
Why does a trend show up in several locations?
The same topic often trends in many places. Turn on deduplicateAcrossLocations for one row per trend.
Responsible use
Trend names and ranks are public, aggregate information. Use the data for research, journalism, marketing intelligence and similar purposes, and respect X's terms, the trends board's site terms and applicable laws. X and Twitter are trademarks of their owner, and this independent Actor is not affiliated with or endorsed by X Corp.
