Twitter / X Trends Scraper
Pricing
from $5.00 / 1,000 scraped results
Twitter / X Trends Scraper
Scrape Twitter/X trending hashtags and topics for any country, date and hour using Playwright. Handles JS-expanded trends and historical archives.
Pricing
from $5.00 / 1,000 scraped results
Rating
0.0
(0)
Developer
Akash Kumar Naik
Maintained by CommunityActor stats
0
Bookmarked
4
Total users
0
Monthly active users
7 hours ago
Last modified
Categories
Share
Twitter / X Trends Scraper is an Apify Actor that extracts real-time trending hashtags and topics using Playwright — ranked Twitter/X trends for 63 locations (worldwide + 62 countries), delivered as structured JSON ready for analysis, alerts, dashboards, and AI agents.
What Is Twitter/X Trends Scraper?
The Actor reads the public aggregated Twitter/X trends page for a country or region and returns every ranked trend as a dataset item — no Twitter account, cookies, or API keys required. It handles JavaScript-expanded trend rows that plain HTTP scrapers miss, and can optionally capture the Top Hashtags 24h sidebar.
Key Features
- 63 locations — worldwide plus the US, UK, India, Brazil, Japan, Germany, and 57+ more countries
- Playwright rendering — expands hidden "See All 49" trend rows that plain HTTP scrapers miss
- Top Hashtags 24h — optionally capture the Most Tweeted / Longest Trending sidebar
- Pay-per-event pricing — pay only for successfully scraped results; no monthly subscription
- AI / MCP compatible — works with autonomous agents via x402 and Skyfire payments
- Run summary — machine-readable summary in the key-value store with counts, options, and total charged
Supported Locations
worldwide plus 62 countries. Aliases like usa, us, uk, and uae also work:
worldwide, algeria, argentina, australia, austria, bahrain, belarus, belgium, brazil,canada, chile, colombia, denmark, dominican-republic, ecuador, egypt, france, germany,ghana, greece, guatemala, india, indonesia, ireland, israel, italy, japan, jordan, kenya,korea, kuwait, latvia, lebanon, malaysia, mexico, netherlands, new-zealand, nigeria,norway, oman, pakistan, panama, peru, philippines, poland, portugal, puerto-rico, qatar,russia, saudi-arabia, singapore, south-africa, spain, sweden, switzerland, thailand,turkey, ukraine, united-arab-emirates, united-kingdom, united-states, venezuela, vietnam
Use Cases
- Social listening & PR monitoring — detect viral topics and brand mentions the moment they trend, per market
- AI agents & LLM pipelines — feed clean, structured trend snapshots into agents, RAG systems, and MCP workflows
- Marketing analytics — correlate hashtag momentum across countries with campaign performance
- Research — longitudinal datasets of public discourse across dozens of regions (via scheduled runs)
Input Parameters
All parameters are optional — defaults scrape the current worldwide top 50 trends.
| Parameter | Type | Default | Description |
|---|---|---|---|
country | string | worldwide | Country slug, e.g. united-states, india, brazil. Aliases like usa, uk work too. |
maxItems | integer | 50 | Maximum trends to return (site shows 49–50; use 0 for all) |
includeTopHashtags | boolean | false | Also scrape the Top Hashtags 24h sidebar |
proxyConfiguration | object | Apify Proxy | Enable datacenter/residential proxies for reliable production scraping |
Example input:
{"country": "united-states","maxItems": 50,"includeTopHashtags": true,"proxyConfiguration": { "useApifyProxy": true }}
Sample Output
Results are stored in the Actor's default dataset as one item per trend, sorted by rank:
{"rank": 1,"name": "#WorldCupFinal","country": "united-states","scrapedAt": "2026-08-23T14:32:01.482Z"}
With includeTopHashtags: true, sidebar entries appear with "source": "top_hashtags_24h" and a score. Each run also writes a machine-readable run summary to the key-value store (summary) containing counts, the target URL, options used, and the total amount charged.
How to Use
- Open the Actor's page on Apify Store.
- Click Try for free, pick a country, and click Start.
- Download results as JSON, CSV, Excel, or via the dataset API.
Scheduled monitoring
Create a schedule (e.g. every hour) with the same input to build a continuous time-series archive of trends per country. Each scheduled run bills only for what it delivers.
How to Use via API
cURL:
curl -X POST "https://api.apify.com/v2/acts/akash9078/twitter-x-trends-scraper/runs" \-H "Authorization: Bearer YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"country": "united-states", "maxItems": 50}'
Python:
import requestsresponse = requests.post("https://api.apify.com/v2/acts/akash9078/twitter-x-trends-scraper/runs",headers={"Authorization": "Bearer YOUR_APIFY_TOKEN"},json={"country": "united-states", "maxItems": 50},)print(response.json())
Node.js with Apify Client:
const { ApifyClient } = require('apify-client');const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('akash9078/twitter-x-trends-scraper').call({country: 'united-states',maxItems: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Error Responses
Failed trend items are saved to the dataset with an error shape instead of trend data:
{"errorType": "...","errorCode": "...","message": "..."}
Invalid input never produces hidden charges.
Pricing
This Actor uses Apify's transparent pay-per-event model. You are charged only when a billable result is saved:
| Event | Price | When it's charged |
|---|---|---|
trends-scraped | $0.005 per snapshot | Once per successful trends snapshot (one country, containing up to 50 ranked trends). The price is per snapshot, not per row. |
top-hashtags-scraped | $0.0025 per snapshot | When the optional Top Hashtags 24h sidebar is captured (one snapshot, up to 50 sidebar entries). |
Example cost — a single run with 50 trends + Top Hashtags costs $0.0075 (1 × $0.005 + 1 × $0.0025).
Pricing model: Pay per event · Active from: August 23, 2026 · Platform usage costs: paid by the developer, not passed on to users. A platform-managed apify-actor-start event ($0.00005) covers run startup. Set a Max total charge USD limit on any run for hard cost control.
Limitations
- The source displays a maximum of 49–50 ranked trends per location
- Trend rows 21–49 are behind a JavaScript-expandable section — the Actor uses Playwright internally so you get the full list
- Data reflects the public aggregated trends page, not authenticated timelines
- Subject to the target site's availability; enable proxies for production reliability
FAQ
Does this need Twitter/X login or credentials?
No. The Actor reads public aggregated trend data — no Twitter account, cookies, or API keys required.
How is billing calculated?
Per delivered result under the pay-per-event model: $0.005 per trends snapshot (up to 50 ranked trends each) and $0.0025 per Top Hashtags snapshot. Charges are per snapshot, not per individual trend row. Platform usage costs are paid by the developer and are not passed on to you. Failed scrapes and invalid input are not charged beyond the negligible platform start event.
What happens if my spending limit is reached mid-run?
The Actor checks the remaining budget before starting expensive work and after each unit of work, then exits gracefully — you are only ever billed within your configured limit.
Why use Playwright instead of simple HTTP requests?
The source hides rows 21–49 behind an expandable section rendered by JavaScript. Playwright expands those rows so you get the full 50-trend list every time.
Is this Actor compatible with AI agents?
Yes. This Actor uses pay-per-event pricing and limited permissions, making it eligible for agentic payments via x402 and Skyfire. AI agents can discover, run, and pay for this Actor autonomously without an Apify account.
Related Actors
Check out my other Apify Actors:
- Reddit Search Scraper — scrape Reddit search results for any query
- TikTok Trending Hashtags Scraper — trending TikTok hashtags with views and creators
- Keyword Suggestion Generator — expand seed keywords for SEO research
Built and maintained by akash9078 on the Apify platform.