X Twitter Trends Scraper - Country Trends API avatar

X Twitter Trends Scraper - Country Trends API

Pricing

from $3.00 / 1,000 trend scrapeds

Go to Apify Store
X Twitter Trends Scraper - Country Trends API

X Twitter Trends Scraper - Country Trends API

Scrape X Twitter trends by country or worldwide with ranks, hashtags, WOEID, source links, X search URLs, and MCP-ready rows. $0.003/trend plus usage.

Pricing

from $3.00 / 1,000 trend scrapeds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

X Twitter Trends Scraper

Scrape live X/Twitter trending topics for countries or worldwide from public trend pages. The actor returns one clean JSON row per trend with rank, trend type, source URL, X search URL, WOEID when available, UTC snapshot time, and compact rank-history metadata.

Use it for social listening, newsroom monitoring, campaign timing, regional trend alerts, and AI-agent workflows that need a current list of public X topics without asking users for cookies.

When To Use This Actor

Use this actor when you need:

  • Current X/Twitter trends for worldwide or country-level locations
  • Top hashtags, cashtags, and keyword topics in a normalized dataset
  • UTC trend snapshots for monitoring or scheduled runs
  • A no-cookie trend feed for dashboards, alerts, or MCP clients
  • Public source links plus direct X search URLs for each trend

Do not use this actor for tweet scraping, profile scraping, replies, followers, or X search results. Use a dedicated X/Twitter tweet, profile, replies, or search scraper for those jobs.

Output

FieldExampleDescription
locationNameUnited StatesCountry or worldwide source location
locationWoeid23424977WOEID exposed by the trend page
snapshotAt2026-07-15T15:00:00.000ZUTC trend snapshot represented by the page
position1Rank in the location trend table
trendName#BuildInPublicHashtag, cashtag, or keyword topic
trendTypehashtaghashtag, cashtag, or keyword
dailyTweetScore123Source-page daily score when available
longestTrendingText4 hoursDuration from the source page when available
rankHistoryLabel...last 8 hoursCompact source chart description
trendUrlhttps://getdaytrends.com/...Public trend detail URL
xSearchUrlhttps://x.com/search?...Direct X/Twitter search URL

tweetVolume is included as a stable nullable field. Public country trend pages do not always expose tweet volume, so it can be null.

Pricing

This actor uses Pay per event plus platform usage. Event charges are:

  • Actor start: $0.00005
  • Trend scraped: $0.003 per trend record saved to the dataset

Typical examples:

InputRecordsEvent charge
["worldwide"], 25 trends25about $0.075
["united-states"], 50 trends50about $0.150
5 locations, 50 trends each250about $0.750

Apify platform usage is billed separately under Pay per event plus usage. The actor logs the maximum possible event charge before it starts saving rows.

Input

{
"locations": ["worldwide", "united-states", "pakistan"],
"maxTrendsPerLocation": 50,
"dedupeTrends": true,
"includeRankHistory": true
}

locations accepts country names, slugs, or GetDayTrends URLs:

  • worldwide
  • United States
  • pakistan
  • https://getdaytrends.com/united-kingdom/

API Usage

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('khadinakbar/x-twitter-trends-scraper').call({
locations: ['worldwide', 'united-states'],
maxTrendsPerLocation: 25,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('khadinakbar/x-twitter-trends-scraper').call(run_input={
'locations': ['worldwide', 'pakistan'],
'maxTrendsPerLocation': 25,
})
items = list(client.dataset(run['defaultDatasetId']).iterate_items())
print(items[0])

MCP And AI Agent Use

This actor is designed for Apify MCP clients. A good tool call is narrow: ask for locations and a maximum number of trends, then read the dataset rows. Example agent requests:

  • "Get the top 25 X trends for Pakistan and the United States."
  • "Monitor worldwide X trends every hour and alert me when AI topics appear."
  • "Compare hashtags trending in India, Japan, and the United Kingdom."

Each dataset row is flat, stable, and small enough for agents to sample safely.

Use these dedicated actors when you need adjacent X/Twitter or trend data:

FAQ

Is this actor affiliated with X Corp?

No. It reads public trend pages and creates normalized records for analysis. It is not affiliated with, endorsed by, or sponsored by X Corp.

Does it require cookies or an X login?

No. The default mode uses public trend pages and does not ask users for cookies, passwords, or browser sessions.

This version focuses on worldwide and country-level trend pages. If you need city-level WOEID support, use an official X API bearer-token workflow or a provider that explicitly exposes city trends.

Can it scrape historical trend snapshots?

This version focuses on live/current worldwide and country-level trend pages. Historical pages were not reliable enough in source testing to advertise as a supported input.

Yes. Run it through the Apify MCP Server and read the dataset output. The input schema uses clear location and limit fields so agents can call it directly.

This actor extracts public trend-page information. You are responsible for using the data in compliance with applicable laws, platform rules, and privacy requirements.

How can I report an issue?

Open the Issues tab on the actor page with the location, input JSON, and run ID.