# Twitter/X Global Trending Tweets Scraper (`fastcrawler/twitter-x-global-trending-tweets-scraper`) Actor

Extract trending tweets from Twitter/X by country, topic, and content tag. Get structured tweet data with text, author info, timestamps, language, hashtags, media, URLs, and engagement metrics for trend monitoring, market research, and AI workflows.

- **URL**: https://apify.com/fastcrawler/twitter-x-global-trending-tweets-scraper.md
- **Developed by:** [fastcrawler](https://apify.com/fastcrawler) (community)
- **Categories:** AI, Agents, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 globaltrendtweets

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Twitter/X Global Trending Tweets Scraper

Collect currently trending tweets from Twitter/X by country, with optional topic and content filters. This Apify Actor returns clean tweet records that are ready for analysis, monitoring, dashboards, automations, and AI workflows.

### What This Actor Does

This Actor fetches global trending tweet data from Twitter/X for a selected country or region. You can optionally narrow the results by topic or content tag, then export the returned tweets from Apify as JSON, CSV, Excel, or through the Apify API.

It is useful when you want to monitor what is gaining attention on X without building your own Twitter/X scraping system or using an official X developer account.

### Key Features

- Fetch trending tweets by country or supported country slug.
- Filter results by optional topic.
- Filter results by optional content tag.
- Control the number of returned tweets with `count`.
- Get structured tweet data, including tweet text, author data, timestamps, language, hashtags, media, URLs, and engagement metrics.
- Export results through Apify datasets, webhooks, integrations, or API clients.
- Suitable for scheduled monitoring and repeatable trend tracking workflows.

### Common Use Cases

- Social media trend monitoring
- Viral content discovery
- News and event tracking
- Market and audience research
- Competitor and industry monitoring
- Content ideation for newsletters, blogs, short videos, and social posts
- AI workflows that need fresh Twitter/X context
- Dashboards for regional or topic-based public attention

### Input

| Field | Type | Required | Description |
|---|---:|---:|---|
| `country` | string | Yes | Supported country name or slug. |
| `topic` | string | No | Optional supported topic name or slug. |
| `tags` | string | No | Optional supported content tag. |
| `maxItems` | integer | No | Maximum number of tweets to return. Minimum: `1`. Maximum: `100`. Default: `20`. |

Example input:

```json
{
  "country": "united-states",
  "topic": "technology",
  "content": "claude",
  "maxItems": 20
}
````

### Output

The Actor returns structured tweet records. Each result may include fields such as:

- `tweet_id`
- `text` or `full_text`
- `created_at`
- `created_at_datetime`
- `lang`
- `hashtags`
- `cashtags`
- `urls`
- `media`
- `favorite_count`
- `retweet_count`
- `reply_count`
- `quote_count`
- `bookmark_count`
- `view_count`
- `user`

Example output item:

```json
{
  "tweet_id": "1803006263529541838",
  "text": "Example trending tweet text from X.",
  "created_at": "Mon Jun 17 03:51:48 +0000 2024",
  "created_at_datetime": "2024-06-17T03:51:48.000Z",
  "lang": "en",
  "hashtags": ["AI", "Tech"],
  "favorite_count": 1200,
  "retweet_count": 340,
  "reply_count": 85,
  "quote_count": 42,
  "view_count": "250000",
  "user": {
    "id": "1717001045992251392",
    "name": "Example User",
    "screen_name": "example"
  }
}
```

Actual output fields can vary depending on the data returned by Twitter/X for a specific request.

### How to Use

1. Open the Actor on Apify.
2. Enter a supported `country` value.
3. Optionally add a `topic` or `content` filter.
4. Set `count` between `1` and `100`.
5. Click **Start**.
6. Download the results from the dataset or connect them to your workflow.

### Best Practices

- Start with `count: 20` for quick checks.
- Use the maximum `count: 100` for broader monitoring runs.
- Use schedules if you want recurring trend snapshots.
- Store historical datasets if you want to compare trend movement over time.
- Combine the results with sentiment analysis, keyword clustering, or AI summarization for richer insights.

### Notes

- This Actor is read-only. It does not post, like, retweet, reply, or modify any Twitter/X account.
- No official X developer account is required to use the Actor.
- Results depend on Twitter/X source data availability.
- Make sure your usage complies with applicable laws, platform rules, and data protection requirements.

# Actor input Schema

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

country

## `topic` (type: `string`):

topic

## `tags` (type: `string`):

tags

## `maxItems` (type: `integer`):

Maximum number of items that you want as output.

## Actor input object example

```json
{
  "country": "global",
  "topic": "technology",
  "tags": "Claude",
  "maxItems": 10
}
```

# 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 = {
    "country": "global",
    "topic": "technology",
    "tags": "Claude"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fastcrawler/twitter-x-global-trending-tweets-scraper").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 = {
    "country": "global",
    "topic": "technology",
    "tags": "Claude",
}

# Run the Actor and wait for it to finish
run = client.actor("fastcrawler/twitter-x-global-trending-tweets-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "country": "global",
  "topic": "technology",
  "tags": "Claude"
}' |
apify call fastcrawler/twitter-x-global-trending-tweets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fastcrawler/twitter-x-global-trending-tweets-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter/X Global Trending Tweets Scraper",
        "description": "Extract trending tweets from Twitter/X by country, topic, and content tag. Get structured tweet data with text, author info, timestamps, language, hashtags, media, URLs, and engagement metrics for trend monitoring, market research, and AI workflows.",
        "version": "0.0",
        "x-build-id": "XF3uSf1Taa5BWdvOS"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/fastcrawler~twitter-x-global-trending-tweets-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-fastcrawler-twitter-x-global-trending-tweets-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/fastcrawler~twitter-x-global-trending-tweets-scraper/runs": {
            "post": {
                "operationId": "runs-sync-fastcrawler-twitter-x-global-trending-tweets-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/fastcrawler~twitter-x-global-trending-tweets-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-fastcrawler-twitter-x-global-trending-tweets-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "country": {
                        "title": "country",
                        "enum": [
                            "global",
                            "algeria",
                            "argentina",
                            "australia",
                            "austria",
                            "bangladesh",
                            "belgium",
                            "brazil",
                            "canada",
                            "chile",
                            "colombia",
                            "czech-republic",
                            "denmark",
                            "ecuador",
                            "egypt",
                            "ethiopia",
                            "finland",
                            "france",
                            "germany",
                            "ghana",
                            "greece",
                            "hungary",
                            "india",
                            "indonesia",
                            "iran",
                            "ireland",
                            "israel",
                            "italy",
                            "jamaica",
                            "japan",
                            "jordan",
                            "kenya",
                            "kuwait",
                            "lebanon",
                            "malaysia",
                            "mexico",
                            "morocco",
                            "netherlands",
                            "new-zealand",
                            "nigeria",
                            "norway",
                            "oman",
                            "pakistan",
                            "peru",
                            "philippines",
                            "poland",
                            "portugal",
                            "qatar",
                            "romania",
                            "russia",
                            "saudi-arabia",
                            "singapore",
                            "south-africa",
                            "south-korea",
                            "spain",
                            "sri-lanka",
                            "sweden",
                            "switzerland",
                            "tanzania",
                            "thailand",
                            "tunisia",
                            "turkey",
                            "ukraine",
                            "united-arab-emirates",
                            "united-kingdom",
                            "united-states",
                            "venezuela",
                            "vietnam"
                        ],
                        "type": "string",
                        "description": "country",
                        "default": "global"
                    },
                    "topic": {
                        "title": "topic",
                        "enum": [
                            "anime",
                            "beauty",
                            "business-finance",
                            "cars",
                            "celebrity",
                            "cryptocurrency",
                            "dance",
                            "fashion",
                            "food",
                            "gaming",
                            "health-fitness",
                            "home-garden",
                            "memes",
                            "movies-tv",
                            "music",
                            "nature-outdoors",
                            "news",
                            "pets",
                            "relationships",
                            "religion",
                            "science",
                            "sports",
                            "technology",
                            "travel"
                        ],
                        "type": "string",
                        "description": "topic",
                        "default": "technology"
                    },
                    "tags": {
                        "title": "tags",
                        "enum": [
                            "Seedance",
                            "Nomisma Network",
                            "Instagram",
                            "Steam Machine",
                            "Artificial Intelligence",
                            "Arcium",
                            "BytePlus",
                            "Prime Intellect",
                            "ByteDance",
                            "GLM 5",
                            "Claude",
                            "Tesla",
                            "Quantum Computing",
                            "Binance",
                            "Topview",
                            "SpaceX",
                            "Web3",
                            "ChatGPT",
                            "A24",
                            "BingX",
                            "Tria",
                            "Elon Musk",
                            "TimeSoul",
                            "Upbit",
                            "The Arc Terminal",
                            "Quip Network",
                            "Grok",
                            "Palantir",
                            "LLM",
                            "Donald Trump",
                            "Codex",
                            "Autopilot",
                            "Google",
                            "Anthropic",
                            "Solana",
                            "Nvidia",
                            "Sleepagotchi",
                            "Canopy Network",
                            "ARX",
                            "Microsoft",
                            "Fugu Ultra",
                            "Data Center",
                            "Olivia Lin",
                            "Apple",
                            "MiHoYo",
                            "DeepSeek",
                            "TypeScript",
                            "Python",
                            "Starlink",
                            "GitHub",
                            "MiniMax",
                            "Theo Von",
                            "IPhone",
                            "Meta",
                            "Blockchain",
                            "White House",
                            "Gemini",
                            "Hermes",
                            "GPU",
                            "China",
                            "Amazon",
                            "Telegram",
                            "Large Language Model",
                            "Unitree",
                            "NASA",
                            "GenLayer",
                            "Samsung",
                            "Quantum Technology",
                            "Executive Order",
                            "Robotics",
                            "SK Hynix",
                            "CNPY Network",
                            "Valve",
                            "United States",
                            "IOS",
                            "Cursor",
                            "Software Development",
                            "Linux",
                            "Micron",
                            "YouTube",
                            "Cybersecurity",
                            "Machine Learning",
                            "OpenRouter",
                            "AMD",
                            "Windows",
                            "Ethereum",
                            "Sam Altman",
                            "Algorithm",
                            "Bitcoin",
                            "Laptop",
                            "Obsidian",
                            "Semiconductor",
                            "MacOS",
                            "API",
                            "Humanoid Robot",
                            "San Francisco",
                            "Blender",
                            "Midjourney",
                            "OpenClaw",
                            "Starship",
                            "DRAM",
                            "WhatsApp",
                            "Discord",
                            "Cloudflare",
                            "AWS",
                            "Android",
                            "Nintendo",
                            "Privacy",
                            "FSD",
                            "GPT 55",
                            "MiCA",
                            "TRON",
                            "Bitget",
                            "TermMax",
                            "Nesa",
                            "CPX",
                            "NFT",
                            "Ripple",
                            "Gate",
                            "Luxembourg",
                            "OKX",
                            "River",
                            "Silver",
                            "OKB",
                            "Justin Sun",
                            "XRP",
                            "ICE",
                            "USDT",
                            "DeFi",
                            "BStocks",
                            "Polymarket",
                            "Crypto",
                            "SPCX",
                            "US Senate",
                            "BlackRock",
                            "CNPY",
                            "BTC",
                            "Hyperliquid",
                            "RWA",
                            "Federal Reserve",
                            "Base",
                            "SecondFi",
                            "TTS",
                            "USDC",
                            "Cardano",
                            "Stablecoin",
                            "SatUSD",
                            "QUEST",
                            "HTX",
                            "UwU",
                            "BNB Chain",
                            "Tezos",
                            "Trading",
                            "Token",
                            "MicroStrategy",
                            "Rally",
                            "Memecoin",
                            "Dogecoin",
                            "OpenSea",
                            "Pumpfun",
                            "Ethlabs",
                            "Michael Saylor",
                            "ETF",
                            "Vitalik Buterin",
                            "Bored Ape Yacht Club",
                            "Chimpers",
                            "Ansem",
                            "Pepe",
                            "Allbridge",
                            "CoinMarketCap",
                            "Stellar",
                            "Bittensor",
                            "Cynthia Lummis",
                            "KINS",
                            "Bybit",
                            "Pudgy Penguins",
                            "Clarity Act",
                            "SP 500",
                            "Backpack",
                            "Zcash",
                            "SPX6900",
                            "World Cup",
                            "Whale",
                            "TAO",
                            "XLM",
                            "Ondo",
                            "Azuki",
                            "Ordinals",
                            "Liquidity",
                            "Monad",
                            "FOMO"
                        ],
                        "type": "string",
                        "description": "tags",
                        "default": "Claude"
                    },
                    "maxItems": {
                        "title": "Maximum number of items on output",
                        "minimum": 10,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of items that you want as output.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
