Twitter Trends Scraper avatar

Twitter Trends Scraper

Pricing

from $0.50 / 1,000 trend scrapeds

Go to Apify Store
Twitter Trends Scraper

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

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

3

Monthly active users

5 days ago

Last modified

Share

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. window returns the live board (now) or a snapshot from 1h up to 7d back, and custom accepts a UTC date and hour.
  • Market comparison. Several locations in one run give one row per location per rank, or one merged row per trend with deduplicateAcrossLocations.
  • Next step to the conversation. When a trend matters, then pass its name to 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?

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

  1. Add one or more places in Locations: slugs such as united-states, display names such as Brazil, trends-board page URLs, or WOEIDs such as 23424977.
  2. Pick a Window and set Max trends per location.
  3. 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
}
FieldTypeWhat it controls
locationsarrayLocation slugs, display names, trends-board page URLs or WOEIDs. Starts with worldwide in the form.
windowstringnow, 1h, 2h, 3h, 6h, 12h, 24h, 2d, 3d, 7d or custom. Default now.
customDateTimestringUTC YYYY-MM-DD HH or ISO time, used when window is custom.
maxTrendsPerLocationintegerTrend rows per location per window. The board lists up to 50. Default 50.
hashtagOnlybooleanKeep only trends that start with #. Default false.
deduplicateAcrossLocationsbooleanMerge repeats of a trend across locations into one row with a locations array. Default false.
includeHistorybooleanAttach history samples of time and rank for each trend. Default true.
listAvailableLocationsbooleanReturn the supported location catalog (slug, display name, country, WOEID) instead of trends. Default false.
proxyConfigurationobjectApify 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.

FieldWhat it contains
recordTypetrend for trend rows
rank, name, hashtagPosition on the board, trend text, and whether it is a hashtag
searchUrlDirect x.com/search link for the trend
urlTrend page on the public trends board
promotedWhether the trend is marked as promoted
location, locationSlug, woeidPlace name, slug and Yahoo WOEID
windowLabel, windowHoursBackSnapshot window, such as Now and 0
historyArray of { "t", "rank" } samples showing recent rank movement
source, scrapedAtProvenance 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 ApifyClient
client = 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:

  1. Set locations, window and maxTrendsPerLocation; the row ceiling is locations times that cap, which keeps cost predictable.
  2. Read rows with get-dataset-items and cite searchUrl and scrapedAt for each trend.
  3. Set includeHistory to false when you only need names and ranks and want shorter rows.
  4. Read OUTPUT.outcome to confirm the run status before summarising.

Best results

Starting situationHelpful actionExpected outcome
Unsure of a location's slugRun once with listAvailableLocations: trueA catalog of slugs, names and WOEIDs to copy
Comparing marketsKeep deduplicateAcrossLocations at falseOne row per location, easy to pivot by market
Building a global listSet deduplicateAcrossLocations to trueOne row per trend with all its locations
Campaign hashtag researchSet hashtagOnly to trueOnly # trends
A trend timelineSchedule the same input hourly and compare rank by nameA rank time series per trend
Looking back at an eventUse window: "custom" with the UTC hourThe 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.