# Twitter/X Trends Scraper · No Cookies (`data-slayer/twitter-trends-by-location`) Actor

Extract trending topics from Twitter/X by country without login. Get trend names, post volumes, category context (Sports, Entertainment, Politics), and promotional tags. Monitor global or regional conversations in real-time. No cookies, no API key. JSON/CSV/Excel export.

- **URL**: https://apify.com/data-slayer/twitter-trends-by-location.md
- **Developed by:** [Data Slayer](https://apify.com/data-slayer) (community)
- **Categories:** Social media, Developer tools, Other
- **Security:** Limited permissions
- **Stats:** 107 total users, 19 monthly users, 99.1% 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/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 (Cookieless)

Extract location-specific trending topics from Twitter without any login or authentication. This cookieless web scraper enables trend analysts to monitor real-time conversations and search volumes across different countries for data-driven marketing strategies.

### 📺 Video Tutorial: How it Works

https://www.youtube.com/watch?v=D-cu2DpzRJE

### Inputs

| Field | Type | Description |
|-------|------|-------------|
| country | String | Target country for trend extraction (e.g., "India", "United States", "United Kingdom"). Defaults to United States when neither `country` nor `locations` is set. |
| locations | String\[] | Optional batch of 1–10 countries in one run — one trend snapshot per location, each row tagged by country. Locations with no current snapshot are reported in the run summary, never written as dataset rows. Use this **or** `country`. |
| maxTrendsPerLocation | Integer | Hard row and cost cap per location. Default `50`, max `50`. This is not pagination — the Actor takes one current snapshot per location. |

### Outputs

**Formats**: JSON, CSV, Excel

**Fields**:

- `name` - The trending topic, hashtag, or keyword
- `description` - Post count or promotional information
- `context` - Category context (e.g., "Cricket · Trending", "Entertainment · Trending")

### Sample Output

```json
[
  {
    "name": "#WorldCup2026",
    "description": "245K posts",
    "context": "Sports · Trending"
  },
  {
    "name": "Taylor Swift",
    "description": "892K posts",
    "context": "Music · Trending"
  },
  {
    "name": "#TechTuesday",
    "description": "12.4K posts",
    "context": "Trending"
  },
  {
    "name": "iPhone 16",
    "description": "Promoted by Apple",
    "context": null
  },
  {
    "name": "Climate Summit",
    "description": "67.8K posts",
    "context": "Politics · Trending"
  }
]
```

***

### How to Use

**Step 1**: Enter a target country in the `country` field (e.g., "India", "Brazil", "Japan") — or list up to 10 countries in the `locations` field to compare markets in one run.

**Step 2**: Set `maxTrendsPerLocation` (default `50`) to cap rows and cost per location.

**Step 3**: Click "Start" to begin extraction.

**Step 4**: Download your data in JSON, CSV, or Excel format once the scraper completes.

### Key Features

🔒 **Cookieless / No Login Required** - Access Twitter trending data without authentication, cookies, or API tokens. Run unlimited extractions without account restrictions.

📈 **Scalable Architecture** - Monitor trends across multiple countries simultaneously. Built for high-volume data extraction with enterprise-grade reliability.

✅ **Rich Trend Data** - Capture trend names, post volumes, category context (Cricket, Entertainment, Politics), promotional tags, and descriptions for comprehensive analysis.

⚡ **Fast & Reliable** - Real-time trend extraction with minimal latency. Get fresh data within seconds to capitalize on emerging conversations.

📊 **Export-Ready Formats** - Download data in JSON, CSV, or Excel formats. Seamlessly integrate with analytics platforms, CRM systems, and business intelligence tools.

### Use Cases

**Marketing Strategists**: Identify trending topics in target markets to create timely campaigns. Align content calendars with real-time conversations and maximize engagement by riding viral trends.

**Social Media Analysts**: Track trend velocity and category distribution across regions. Compare trending topics between countries to understand cultural differences and audience preferences.

**Content Planners**: Discover high-volume hashtags and emerging discussions before competitors. Plan content production around predictable trend patterns and seasonal spikes.

This social media scraper serves as a powerful data extractor tool for businesses looking to export data from websites without technical complexity. Whether you need a lead generation scraper, website scraper for competitive intelligence, or a specialized web scraper for ecommerce product research, this tool delivers clean, structured data ready for immediate analysis.

### FAQ

**How much does it cost to run this Actor?**
Pricing is listed in the Pricing section above, charged per row returned. You only pay for the rows
the Actor actually produces, so a small test run costs cents.

**Do I need cookies or a login?**
No. This Actor reads public data only - no cookies, no account, no browser automation.

**Can I schedule it?**
Yes. Run it from the Apify API, on a schedule, or via a webhook, and export results as JSON, CSV or Excel.

**What if I need a slightly different output?**
Open an issue on the Actor's Issues tab describing the shape you need.

### Related actors

More Twitter actors from the same portfolio. Apify only auto-recommends actors in the same category, so here are the rest of ours:

| Actor |
|---|
| [Twitter/X Comments Scraper · No Cookies](https://apify.com/data-slayer/twitter-comments) |
| [Twitter/X Community Members Scraper · No Cookies](https://apify.com/data-slayer/twitter-community-members) |
| [Twitter/X Engaged Audience Exporter · Replies + Retweeters](https://apify.com/data-slayer/twitter-engaged-audience-exporter) |
| [Twitter/X Followers Scraper · No Cookies](https://apify.com/data-slayer/twitter-followers) |
| [Twitter/X Following Scraper · Public Profiles](https://apify.com/data-slayer/twitter-followings) |
| [Twitter/X List Members Scraper · No Cookies](https://apify.com/data-slayer/twitter-list-members) |
| [Twitter/X Profile Scraper · Bulk Handles, URLs & IDs](https://apify.com/data-slayer/twitter-user) |
| [Twitter/X Search Scraper · Small Jobs & Advanced Queries](https://apify.com/data-slayer/twitter-search) |
| [Twitter/X Tweet Details Scraper · URL or ID](https://apify.com/data-slayer/twitter-tweet-details) |
| [Twitter/X Tweets Scraper · No Cookies](https://apify.com/data-slayer/twitter-user-tweets) |

# Actor input Schema

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

Legacy-compatible single-location input. Pick one of the documented locations. If neither country nor locations is supplied, UnitedStates is used.

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

Optional batch of 1 to 10 location names. Use either this field or country. Locations without a current snapshot are reported in the run summary and are never written as dataset rows.

## `maxTrendsPerLocation` (type: `integer`):

Hard row and cost cap for each requested location. This is not pagination; the actor takes one current snapshot per location.

## Actor input object example

```json
{
  "country": "UnitedStates",
  "maxTrendsPerLocation": 50
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset row per accepted trend. Each row is the trend object returned by the snapshot service, written unchanged. Empty and error statuses are never dataset rows.

## `output` (type: `string`):

No description

## `runSummary` (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 = {
    "maxTrendsPerLocation": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-slayer/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 = { "maxTrendsPerLocation": 50 }

# Run the Actor and wait for it to finish
run = client.actor("data-slayer/twitter-trends-by-location").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 '{
  "maxTrendsPerLocation": 50
}' |
apify call data-slayer/twitter-trends-by-location --silent --output-dataset

```

## MCP server setup

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

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/DvfgEykMV9l2Kk3XA/builds/doM4n4zbyRiqzoSXL/openapi.json
