# Twitter-X Trends Scraper | Apify Actor (`yasir-on-apify/twitter-x-trends-scraper-apify-actor`) Actor

Just $0.0005/Trend. Scrape Twitter (X.com) trends & trending topics instantly with this powerful Apify actor. Get real-time hashtags, tweet volumes, ranks, & categories from 60+ countries. Perfect for social media, viral content strategy, SEO keyword research, market analysis, and trend forecasting.

- **URL**: https://apify.com/yasir-on-apify/twitter-x-trends-scraper-apify-actor.md
- **Developed by:** [Yasir](https://apify.com/yasir-on-apify) (community)
- **Categories:** Social media, Automation, Other
- **Features:** Limited permissions
- **Stats:** 98 total users, 1 monthly users, 0.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 0.0005 per trend scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

### Overview

Unlock real-time **Twitter (X.com) trends scraper** insights with the **Twitter-X Trends Scraper** the ultimate no-code tool for extracting trending topics, tweet volumes, and categories across 60+ countries worldwide. Built on Apify's robust platform, this **X trends API alternative** bypasses official restrictions to deliver accurate, structured data for **social media trend monitoring** in 2025. Ideal for marketers, analysts, and developers seeking **how to scrape Twitter trends by country** without complex setups, it fetches trends, including ranks, titles, volumes (e.g., "25.3K posts"), and contexts like "Travel · Trending."

Whether you are tracking global hashtags for content strategy or analyzing regional buzz for market research, this **best Twitter trends scraper 2025** ensures reliable. Run it via Apify Store for instant access—no coding required. Start monitoring **Twitter trending topics** today and stay ahead of viral conversations.

## Table of Contents

- [Overview](#overview)
- [Key Features](#key-features)
- [Use Cases](#use-cases)
- [Input Parameters](#input-parameters)
- [Output Schema](#output-schema)
- [Examples](#examples)
- [Pricing](#pricing)
- [Changelog](#changelog)
- [FAQ](#faq)

### Key Features

- **Global Coverage**: Scrape **Twitter trends by country** from 60+ locations, including United States, China, India, Japan, Brazil, and more—defaulting to United States for quick starts.
- **Real-Time Data Extraction**: Pull fresh **X (Twitter) trends** with tweet volumes, categories, and ranks; handles up to 50 results per query with 30-second timeouts for speed.
- **No-Code Simplicity**: Powered by Apify Actors—input a country code, get JSON/CSV exports ready for analysis. Integrates seamlessly with tools like Google Sheets or Python via Apify API.
- **SEO-Friendly Outputs**: Structured data perfect for **social media trends scraper** workflows, including timestamps and trend categories for trend forecasting.

This **Twitter trends data extraction tool** stands out among competitors by focusing exclusively on trends, ensuring precision without bloat.

### Use Cases

Leverage the **Twitter X trends scraper** for actionable insights in high-stakes scenarios:

- **Content Marketing**: Identify rising hashtags in target countries (e.g., #Election2025 in United States) to craft timely posts—boost engagement by 30%+ with trend-aligned content.
- **Market Research**: Track **X trends API** data for consumer sentiment; e.g., monitor "sustainable fashion" volumes in Europe to inform product launches.
- **Competitor Analysis**: Compare tweet volumes across regions—spot if a rival's campaign is trending higher in India vs. Brazil.
- **News & Journalism**: Aggregate global **Twitter trending topics** for breaking stories; automate daily reports on viral events like sports finals or tech announcements.
- **Influencer Strategy**: Pinpoint category-specific trends (e.g., "Tech · Trending") to partner with rising voices in niche markets.
- **Crisis Monitoring**: Detect emerging issues by scraping **real-time Twitter trends** in real-time, like public reactions to policy changes.

Users report 5x faster trend discovery compared to manual searches, making it a go-to for **social media analysts** in 2025.

### Input Parameters

Configure your **scrape Twitter trends** runs effortlessly with this simple schema:

| Parameter | Type | Description | Required | Default | Enum Options (Partial) |
|-----------|------|-------------|----------|---------|------------------------|
| `country` | String | Select the country for trends (e.g., "UnitedStates" for US-wide data). | Yes | "UnitedStates" | UnitedStates, China, India, Japan, Russia, Germany, Indonesia, Brazil, France, UnitedKingdom, ... (60+ total) |

**Example JSON Input:**

```json
{
  "country": "UnitedStates"
}
```

No additional params needed—max results auto-capped at trends available (typically 50). For API users, pass via POST to Apify endpoints.

### Output Schema

Receive clean, exportable data in JSON/CSV format, optimized for **Twitter trends scraper** integrations:

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| `country` | String | The queried country (e.g., "UnitedStates"). | Yes |
| `rank` | Integer | Trend position (1-50, 1 being top). | Yes |
| `trend_title` | String | Hashtag or topic name (e.g., "#Diwali2025"). | Yes |
| `tweets_volume` | String | Estimated volume (e.g., "1.2M posts" or "N/A"). | No |
| `trend_category` | String | Context like "Politics · Trending" or "N/A". | No |

**Example Output Array:**

```json
[
  {
    "country": "UnitedStates",
    "rank": 1,
    "trend_title": "#Budget2025",
    "tweets_volume": "2.5M posts",
    "trend_category": "Economy · Trending"
  },
  {
    "country": "UnitedStates",
    "rank": 2,
    "trend_title": "#FIFAWorldCup",
    "tweets_volume": "1.8M posts",
    "trend_category": "Sports"
  }
]
```

### Examples

**Quick Start: US Trends**

- Input: `{"country": "UnitedStates"}`
- Output: Top 10 US trends like "#ElectionDebate" with volumes—export to CSV in under 1 minute.

**Global Comparison: UnitedStates vs. Brazil**

- Run twice: Once for "UnitedStates", once for "Brazil".
- Merge datasets in Excel to visualize cross-country **X trends** overlaps, e.g., shared entertainment trends.

**API Integration Example (Python):**

```python
import requests
response = requests.post('https://api.apify.com/v2/acts/twitter-x-trends-scraper/runs', json={"country": "Germany"})
## Parse results for trend analysis
```

For **best Twitter scraper 2025** demos, check sample runs in the Store.

### Pricing

- **Free Users**: $1 per 1,000 results.. This is for testing **Scrape Twitter trends Tool**.
- **Paid Users**: $0.5 per 1,000 results.

### Changelog

| Version | Date | Changes |
|---------|------|---------|
| 1.0.0 | Nov 2025 | Initial release: Core scraping via external API, 60+ country support, JSON outputs. |

Updates focus on reliability and **X (Twitter) trends API** compliance.

### FAQ

#### 1. **Does this scraper use the official X (Twitter) API?**

No. This actor uses a **third-party trends API** to bypass X's rate limits and access restrictions. This ensures **higher reliability and availability** than the official API, which no longer supports free trend access as of 2025.

#### 2. **Is this legal to use?**

Yes — **as long as you comply with Apify’s and X’s Terms of Service**. This tool does **not scrape user profiles, DMs, or protected content**. It only accesses **publicly available trend data**, similar to viewing trends in the X app. Use responsibly and avoid excessive requests.

#### 3. **How often are trends updated?**

Trends are **real-time** and refreshed every **5–15 minutes** on X. This actor fetches the **latest snapshot at runtime**.

#### 4. **Can I export data to Google Sheets or Excel?**

Yes! Use **Apify’s built-in integrations**:

- Connect to **Google Sheets** in 1 click.
- Export as **CSV/JSON/Excel** from the dataset.
- Use **webhooks** to push data to Zapier, Make.com, or Power BI.

***

**Still have questions?** Join the [Apify Community](https://apify.com/community).

# Actor input Schema

## `country` (type: `string`):

Select the country for which you want to fetch trending topics.

## Actor input object example

```json
{
  "country": "UnitedStates"
}
```

# Actor output Schema

## `dataset` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("yasir-on-apify/twitter-x-trends-scraper-apify-actor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("yasir-on-apify/twitter-x-trends-scraper-apify-actor").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 '{}' |
apify call yasir-on-apify/twitter-x-trends-scraper-apify-actor --silent --output-dataset

```

## MCP server setup

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

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/vFS92iZK64EC4sXdA/builds/G7n9TGrPob7m2FfVf/openapi.json
