Most X/Twitter trend scrapers solve one problem: "what's trending right now." That's useful, but it falls apart the moment you need historical context — say, for a newsroom retrospective, a brand-monitoring dashboard, or an AI agent that needs to reason about trend shifts over time.
So I built Twitter / X Trends Scraper, an Apify Actor that handles both real-time and historical trend data.
What it does
68 locations — Worldwide + 67 individual countries (USA, UK, India, Brazil, Japan, etc.)
Historical archive — query any date since 2024-05-15, at hourly (UTC) resolution
Playwright rendering — expands the hidden "See All 49" rows that plain HTTP-based scrapers can't reach
Optional enrichment — Top Hashtags 24h sidebar, plus per-trend detail pages (title, highest rank, description)
Pay-per-event pricing — you're billed only for results actually delivered, not for failed or partial runs
Sample input
json
{
"country": "united-states",
"date": "",
"hour": "now",
"maxItems": 50,
"includeTopHashtags": false,
"includeTrendDetails": false,
"proxyConfiguration": { "useApifyProxy": true }
}
Set date and hour explicitly (e.g. "2026-08-21", "18") to pull an archived snapshot instead of live data.
Sample output
json
{
"rank": 1,
"name": "#WorldCupFinal",
"country": "united-states",
"date": "2026-08-23",
"hour": "now",
"scrapedAt": "2026-08-23T14:32:01.482Z"
}
Where this is useful
Social listening and brand/PR monitoring across markets
Newsroom retrospectives and fact-checking ("what was trending at 9 pm on a given date?")
Feeding structured trend snapshots into AI agents / RAG pipelines
Cross-country marketing analytics, especially with scheduled hourly runs to build a time series
The Actor is MCP-compatible too, so it can be wired directly into agentic workflows, and it supports Apify's agentic payment flows (x402/Skyfire) for autonomous agents that pay per use.
🔗 Try it: https://apify.com/akash9078/twitter-x-trends-scraper
Would love feedback from anyone doing trend/social analytics — especially on what extra fields or enrichment would be worth adding.
Top comments (0)