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

1

Total users

0

Monthly active users

8 days ago

Last modified

Share

Twitter Trends Scraper | Real-time X Trending Topics by Country

Scrape real-time X (Twitter) trending topics by country, city, or worldwide with optional historical windows, multi-location batch input, and sparkline history. This Apify Actor accepts location targets and time-window settings, then returns one dataset record per trend per location per window. Each record includes the trend name, rank, location, window label, source links, and optional history so you can review what was trending and how the rank moved over time. It runs over HTTP via getdaytrends.com, requires no login, and is ready for use through Apify MCP.

Best fit and connected workflows

This Actor fits workflows that need current or historical trend snapshots from X without building a browser scraper.

Use it when you want to:

  • compare trends across several countries or cities in one run,
  • pull a live Top 50 board for one location,
  • review a past snapshot from 1h to 7d back,
  • filter for hashtag-led trends,
  • collapse repeated trend names across locations into one combined row,
  • list supported locations as dataset rows for discovery workflows.

Because each row is tied to one location and one time window, the output works well as an input to dashboards, alerting logic, editorial planning, or AI agent pipelines that need structured trend data.

Focused standalone workflow

Twitter Trends Scraper | Real-time X Trending Topics by Country is designed as a focused standalone workflow.

Practical scenario

A social media manager starts with three locations: Worldwide, United States, and Japan. They choose the live window and keep the default history enabled. The dataset returns ranked trend rows with fields such as name, rank, location, windowLabel, searchUrl, and history. The manager sees that the same topic appears across multiple locations and decides to open the searchUrl for the top-ranked item in X search, then share the trend list with the content team for same-day post planning.

Input fields

FieldTypeDefaultDescription
locationsstring[]["worldwide"]Locations to scrape. Accepts slugs, display names, full getdaytrends URLs, or WOEID integers.
windowstringnowSnapshot to fetch. Use now, 1h, 2h, 3h, 6h, 12h, 24h, 2d, 3d, 7d, or custom.
customDateTimestring-UTC timestamp used when window is custom.
maxTrendsPerLocationinteger50Maximum rows returned per location per window.
hashtagOnlybooleanfalseReturn only trends that start with #.
deduplicateAcrossLocationsbooleanfalseCollapse repeated trend names across locations into one row with locations[].
includeHistorybooleantrueAttach compact sparkline rank history when available.
listAvailableLocationsbooleanfalseReturn the supported location catalog as dataset rows instead of trend rows.
proxyConfigurationobjectApify residential presetProxy settings for HTTP requests.

Focused input example

{
"locations": ["worldwide", "united-states", "japan"],
"window": "now",
"maxTrendsPerLocation": 20,
"hashtagOnly": false,
"deduplicateAcrossLocations": true,
"includeHistory": true
}

Output fields

FieldTypeDescription
recordTypestringRecord type, set to trend for trend rows.
rankintegerPosition in the ranked list, where 1 is the top trend.
namestringTrend name as displayed on X trends.
hashtagbooleanWhether the trend starts with #.
urlstringgetdaytrends detail page URL.
searchUrlstringDirect X search URL for the trend.
volumeinteger or nullApproximate tweet volume when derivable.
volumeLabelstring or nullHuman-friendly volume label when available.
categorystring or nullCategory label when the source provides one.
promotedbooleanWhether the trend is marked as promoted.
locationstringHuman-friendly location label.
locationSlugstringSource slug used to build the URL.
woeidinteger or nullWOEID for the location when known.
windowLabelstringSnapshot label such as Now, 1h, or 7d.
windowHoursBackintegerHours back from now, where 0 means live.
windowTimestampstring or nullISO timestamp for the snapshot when available.
historyarrayCompact rank-history samples parsed from the sparkline.
sourcestringSource used for the record, such as getdaytrends.
scrapedAtstringISO timestamp when the row was scraped.

Illustrative output record

{
"recordType": "trend",
"rank": 1,
"name": "Example Trend",
"hashtag": false,
"url": "https://getdaytrends.com/worldwide/trend/Example-Trend/",
"searchUrl": "https://x.com/search?q=Example%20Trend",
"volume": null,
"volumeLabel": null,
"category": null,
"promoted": false,
"location": "Worldwide",
"locationSlug": "worldwide",
"woeid": 1,
"windowLabel": "Now",
"windowHoursBack": 0,
"windowTimestamp": null,
"history": [
{
"t": "2026-08-02T15:00:00.000Z",
"rank": 1
}
],
"source": "getdaytrends",
"scrapedAt": "2026-08-02T16:12:34.000Z"
}

How it works

The Actor builds one getdaytrends URL per requested location and time window. It fetches server-rendered HTML over HTTP, then extracts trend rank, name, source URLs, and sparkline history from the page. The dataset stores one trend row per location per window, and the run summary is written to the key-value store for downstream review. The live contract also defines OUTPUT and RUN_SUMMARY records for run-evidence workflows.

Pricing

Twitter Trends Scraper | Real-time X Trending Topics by Country uses Pay per event billing plus Apify platform usage.

  • One event is charged when the Actor starts.
  • One event is charged for each trend row written to the dataset.

For a simple example in words: if you request one location and receive fifty trend rows, the run is billed for one start event and fifty trend events, plus platform usage. For multi-location runs, the billed trend count scales with the number of returned rows across all selected locations and windows.

To review the current pricing details, open the live Pricing tab in the Apify Console. That tab shows the active event billing and platform usage information for this Actor.

Use with AI agents (MCP)

This Actor is available through Apify MCP as a tool for retrieving structured X trend snapshots.

Tool description:

Get structured X trending topics by location and time window. Returns ranked trend rows with optional history, location metadata, source links, and search URLs. Suitable for social monitoring, news tracking, editorial planning, and location-by-location comparison.

Actor identity: khadinakbar/twitter-trends-scraper

"Fetch the live trend board for Worldwide, United States, and Japan. Return up to 20 rows per location, keep history on, and deduplicate repeated names across locations so I can compare the results quickly."

How to interpret the output:

  • rank tells you the order within each location and window.
  • location, locationSlug, and woeid identify where the trend was captured.
  • windowLabel and windowTimestamp tell you which snapshot you received.
  • searchUrl is useful for opening the topic directly in X search.
  • history[] provides compact rank samples when sparkline history is available.

Provenance and scope:

The data comes from getdaytrends.com, which mirrors public X trend boards. The Actor works over HTTP and is MCP-ready, so agents can call it as a structured data tool without a browser session.

Pagination and cost guidance:

Each row returned is billed as a trend event. For planning, estimate cost from the number of locations multiplied by maxTrendsPerLocation, then adjust for deduplication or smaller row caps when you only need a subset. When listAvailableLocations is enabled, the Actor returns the supported location catalog instead of trend rows.

Apify API example

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
const run = await client.actor('khadinakbar/twitter-trends-scraper').call({
locations: ['worldwide', 'united-states'],
window: 'now',
maxTrendsPerLocation: 10,
includeHistory: false,
});
const datasetId = run.defaultDatasetId;
const { items } = await client.dataset(datasetId).listItems();
console.log('Dataset items:', items);

Best results and outcome guidance

Use the smallest location set that matches the workflow. If you only need the current board, keep window on now. If your workflow depends on trend movement, enable includeHistory. If you are comparing markets, leave deduplication off to preserve one row per location. If you are gathering a campaign-ready hashtag list, use hashtagOnly together with a lower row cap.

Design note

I found that the dataset contract is centered on one trend record per location per time window, with rank, name, location, source, and scrapedAt required on every row. That shape makes the output straightforward to join into downstream workflows.

FAQ

Can I request several markets in one run?

Yes. The locations field accepts multiple location values, so one run can return trend rows for several countries or cities.

Can I get a past trend snapshot?

Yes. Use window values such as 1h, 6h, 24h, 2d, 3d, or 7d, or set window to custom and provide customDateTime.

How do I compare the same trend across locations?

Set deduplicateAcrossLocations to true. Matching trend names are collapsed into one row with a locations[] array.

Set hashtagOnly to true. The dataset then includes only trends that start with #.

Yes. Set listAvailableLocations to true and the Actor returns the supported location catalog as dataset rows.

Responsible use

Use this Actor for public trend analysis, monitoring, editorial workflows, and similar lawful purposes. Review your own obligations under X terms, getdaytrends terms, and applicable laws before building production workflows on top of the output.