# Twitter Trends Scraper: GetDayTrends' X Trends by Country (`pikoulas/twitter-trends`) Actor

X (Twitter) trending topics as GetDayTrends lists them, worldwide and for 61 countries: each hour's 50 trends with their rank, for the newest hour or each of the last 24. Hashtags marked, with a link to search each on X. Reads no X page or API.

- **URL**: https://apify.com/pikoulas/twitter-trends.md
- **Developed by:** [Spyridon Pikoulas](https://apify.com/pikoulas) (community)
- **Categories:** Social media, Marketing, AI
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 trends

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twitter Trends Scraper: GetDayTrends' X Trends by Country

Get X (Twitter) trending topics as [GetDayTrends](https://getdaytrends.com) lists them, worldwide
and for 61 countries, hour by hour, without an account or a browser:

- **Where:** Worldwide, or countries such as the United States, Japan, Brazil, India or the United
  Kingdom, several at once.
- **When:** the newest hourly list, or each of the last 24 for the whole last day.
- **Each trend** comes with its rank, the hour of its list, whether it's a hashtag, and a link to
  search it on X.

A location's hour takes about a second, and its whole last day under half a minute. It costs
**$0.30 per 1,000 trends**.

This Actor reads GetDayTrends' pages only. It reads no page of X and calls no X API; GetDayTrends
takes the trends from X and is the source of these.

### What people use it for

- **Content and social media:** what's trending where your audience is, every hour.
- **News and media monitoring:** what rises in a country, and how long it stays.
- **Marketing and brand tracking:** a hashtag's rank hour by hour, country by country.
- **Research and dashboards:** a day's trends for many countries, on a schedule, through the API.

### How to get X trends

1. Click **Try for free**; Apify's free plan covers a first run.
2. Enter **Locations** and how many **Hours** to take.
3. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them through
   the API.

```json
{
  "locations": ["Worldwide", "United States", "Japan", "https://getdaytrends.com/brazil/"],
  "hours": 24
}
```

Write a country as GetDayTrends does; it has no city lists. For the trends every hour, schedule a
run with `hours` at 1.

### Output

```json
{
  "trend": "#TBvsCHI",
  "rank": 16,
  "takenAt": "2026-11-09T08:00:00Z",
  "location": "United States",
  "isHashtag": true,
  "xSearchUrl": "https://x.com/search?q=%23TBvsCHI",
  "sourceUrl": "https://getdaytrends.com/united-states/"
}
```

`rank` is the trend's place among the 50 in the list of the hour `takenAt`. Tweet counts aren't
given: GetDayTrends shows none per trend.

### Use it as an API

One call runs it and returns the results as JSON. Apify's Python and JavaScript clients, and its
Make, Zapier and n8n integrations, work the same way.

```bash
curl -X POST "https://api.apify.com/v2/acts/pikoulas~twitter-trends/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locations": ["United States"], "hours": 1}'
```

AI agents can call it as a tool through Apify's MCP server: `https://mcp.apify.com?tools=pikoulas/twitter-trends`.

### How much does it cost?

You pay **$0.0003 per trend**, which is $0.30 per 1,000, on Apify's paid plans, and $0.50 per 1,000
on the free plan. A location's newest list is 50 trends, so $0.015, and its whole last day 1,200
trends, $0.36. There are no monthly fees. Set a spending limit on a run and it stops there with
what it has.

### Good to know

- It reads GetDayTrends as a guest: it names itself in its User-Agent (`TrendsActor`), keeps to the
  site's `robots.txt`, reads a page a second from one address, and uses no proxy. If the site
  answers with a check or a refusal, the run stops there and keeps what it has; the log says so.

### FAQ

#### Is it legal to scrape GetDayTrends?

It collects only what GetDayTrends shows publicly, without logging in: topic names and their ranks,
with no posts or users. [GetDayTrends' terms](https://getdaytrends.com/help/#terms) prohibit this,
and your use of it is your own responsibility. Database rights in some countries can also protect a
collection like its trend lists, and personal data, which a trend naming a person can be, is
protected by laws such as the GDPR. If you're unsure, ask a lawyer; Apify's [Is web scraping
legal?](https://blog.apify.com/is-web-scraping-legal/) is a good start. This Actor isn't affiliated
with or endorsed by GetDayTrends, X or X Corp.

#### Something missing or not working?

Open an issue on the **Issues** tab with the input you used, or ask there for a field you need.

# Actor input Schema

## `locations` (type: `array`):

Worldwide or countries as GetDayTrends names them, such as United States, Japan, Brazil or United Kingdom, or getdaytrends.com URLs. It has no cities. Empty: Worldwide.

## `hours` (type: `integer`):

How many of each location's hourly lists to take, 50 trends each, newest first: 1 for what trends now, 24 for the whole last day. Each trend in each list is charged.

## Actor input object example

```json
{
  "locations": [
    "Worldwide",
    "United States"
  ],
  "hours": 1
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locations": [
        "Worldwide",
        "United States"
    ],
    "hours": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pikoulas/twitter-trends").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "locations": [
        "Worldwide",
        "United States",
    ],
    "hours": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("pikoulas/twitter-trends").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locations": [
    "Worldwide",
    "United States"
  ],
  "hours": 1
}' |
apify call pikoulas/twitter-trends --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pikoulas/twitter-trends"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ttvAQezcA5b44SAjF/builds/Cigb1qpieG4vdVUPI/openapi.json
