# Twitter Trends Scraper (Cookieless) (`iron-crawler/twitter-trends-by-location`) Actor

Scrape Twitter trends in bulk with zero-config API. Fast, automated export of location-specific trending topics and search volumes for targeted marketing pipelines.

- **URL**: https://apify.com/iron-crawler/twitter-trends-by-location.md
- **Developed by:** [Iron Crawler](https://apify.com/iron-crawler) (community)
- **Categories:** Social media, Lead generation, Other
- **Stats:** 5 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Trends Scraper (Cookieless)

### What does Twitter Trends Scraper (Cookieless) do?

This tool extracts trending topics and search volumes from Twitter (X.com) without requiring any login credentials or authentication. Built with a **cookieless architecture**, it allows you to monitor what's trending in specific locations without the hassle of managing accounts or dealing with authentication barriers. Simply specify a country, and the scraper retrieves real-time trending data including keywords, volumes, and trend rankings.

**Key Features:**

- Extract location-specific trending topics from any country
- Capture trend volumes and ranking positions
- Identify trend types (events, hashtags, topics)
- Detect promoted vs. organic trends
- Export data to JSON, CSV, or Excel formats
- No login or cookies required
- Timestamp each data point for historical tracking
- Filter trends by geographic location

### Why scrape Twitter (X.com)?

Trend analysts need location-specific trending topics and search volumes to develop targeted marketing strategies and content planning. Understanding what's capturing attention in different regions helps businesses time their campaigns, create relevant content, and engage audiences when interest peaks. Twitter trends provide real-time insights into cultural moments, breaking news, and emerging conversations that can inform everything from product launches to crisis management.

**Use Cases:**

- **Market Research:** Identify emerging topics and consumer interests in specific geographic markets to inform product development and positioning strategies.
- **Content Planning:** Align your content calendar with trending conversations to maximize engagement and relevance across different regions.
- **Competitive Intelligence:** Monitor industry trends and competitor mentions to stay ahead of market shifts and identify opportunities for thought leadership.

### How to scrape Twitter (X.com) using this tool?

**Step 1: Specify Your Target Location**

Choose the country you want to monitor for trending topics. The scraper will retrieve trends specific to that geographic region.

**Step 2: Configure Input Parameters**

Set your country parameter in the input configuration. The scraper will automatically retrieve the current trending topics for that location. **1 run ≈ 50 trends** depending on Twitter's available data for that region.

**Step 3: Run and Download**

Start the scraper and wait for it to collect the trending data. Once complete, download your results in JSON, CSV, or Excel format for analysis.

### What are the input parameters?

| Field | Type | Description |
|-------|------|-------------|
| `country` | String | The country name for which you want to extract trending topics (e.g., ""India"", ""United States"", ""United Kingdom""). The scraper will return trends specific to this geographic location. |

### What data can you extract?

You can download the following data in JSON, CSV, or Excel formats:

```json
{
  ""location_id"": ""2487956"",
  ""location_name"": ""San Francisco"",
  ""trend_rank"": 1,
  ""trend_volume"": 125400,
  ""trend_keyword"": ""AI Conference"",
  ""trend_type"": ""event"",
  ""timestamp"": ""2025-12-24T14:30:00Z"",
  ""is_promoted"": false
}
```

**Extracted Fields:**

- `location_id`: Unique identifier for the geographic location
- `location_name`: Human-readable location name
- `trend_rank`: Position of the trend (1 being the top trend)
- `trend_volume`: Number of posts/mentions for this trend
- `trend_keyword`: The actual trending keyword or hashtag
- `trend_type`: Category of the trend (event, topic, hashtag)
- `timestamp`: When the trend data was captured
- `is_promoted`: Whether the trend is sponsored/promoted content

***

This social media scraper serves as a powerful data extractor tool for analysts who need to export data from websites like Twitter without complex authentication. Whether you're using it as a lead generation scraper to identify potential customers discussing relevant topics, or as a web scraper for competitive intelligence, this website scraper delivers clean, structured data ready for analysis alongside your other ecommerce product scraper and marketing automation tools."

# Actor input Schema

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

Country

## Actor input object example

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

# 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("iron-crawler/twitter-trends-by-location").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("iron-crawler/twitter-trends-by-location").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 '{}' |
apify call iron-crawler/twitter-trends-by-location --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=iron-crawler/twitter-trends-by-location",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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