# Twitter Scraper (X): Tweets, Replies, Followers & Search (`openclawai/twitter-scraper`) Actor

Twitter scraper (X), no login: profile tweets, tweet replies, Twitter followers and following, X followers, retweeters, Twitter search (Top, Latest, Media), Twitter lists and Twitter trends by country. No cookies. $0.30 per 1,000 tweets, pay only per result.

- **URL**: https://apify.com/openclawai/twitter-scraper.md
- **Developed by:** [Pika Choo](https://apify.com/openclawai) (community)
- **Categories:** Social media, Lead generation, AI
- **Stats:** 6 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 tweets

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

## 🐦 Twitter Scraper (X): Tweets, Replies, Followers & Search

Twitter scraper (X), no login: profile tweets, tweet replies, Twitter followers and following, X followers, retweeters, Twitter search (Top, Latest, Media), Twitter lists and Twitter trends by country. No cookies. **$0.30 per 1,000 tweets**, pay only per result.

### 📋 Table of contents

- [What does it do?](#what-does-it-do)
- [Features](#features)
- [Pricing](#pricing)
- [Input](#input)
- [Output](#output)
- [Troubleshooting](#troubleshooting)
- [Who uses this Twitter Scraper?](#who-uses-this-twitter-scraper)
- [Use cases](#use-cases)
- [FAQ](#faq)
- [API, Python, JavaScript and MCP](#api-python-javascript-and-mcp)

### What does it do?

Twitter Scraper collects public X (Twitter) data and returns clean rows. Give it profile links, @usernames, tweet links, list links or search keywords and it returns tweets with full engagement (views, likes, replies, retweets, bookmarks), replies to any tweet, profile details, follower and following lists, retweeters, Top, Latest and Media search results, list timelines and trending topics for 20+ countries. No X account, no cookies, no API key, so nothing can get banned.

### Features

#### 🎬 What you can scrape on X (Twitter)

| Mode | What you give it | What you get |
|---|---|---|
| `user_posts` | profile link / @username | Profile tweets — latest posts from an account |
| `user_replies` | profile link / @username | Profile tweets & replies |
| `user_media` | profile link / @username | Profile media — tweets with photos or videos |
| `user_profile` | profile link / @username | Profile details — bio, followers, tweet count |
| `video_detail` | video or post link | Tweet details — one tweet per link |
| `video_comments` | video or post link | Replies to a tweet |
| `followers` | profile link / @username | Followers of an account |
| `following` | profile link / @username | Accounts an account follows |
| `retweeters` | tweet link or ID | Retweeters of a tweet |
| `search_videos` | keywords | Search tweets — Top (keywords) |
| `search_latest` | keywords | Search tweets — Latest (keywords) |
| `search_media` | keywords | Search tweets with photos or videos (keywords) |
| `trending` | nothing (pick a category) | Trending topics by country |
| `list_tweets` | list link or ID | List timeline — tweets from an X list |

#### ✨ Smart features

- `x.com` and `twitter.com` links both work
- Full X search syntax: `from:user`, `#hashtag`, `"exact phrase"`, `min_faves:100`
- Views, likes, replies, retweets and bookmarks on every tweet
- Followers come about 70 per request, so big lists are fast
- Trending topics per country with the **Region** field
- Duplicates are removed automatically
- 🔓 No login, no cookies, no proxy setup
- 💸 Pay only for results: hint and error rows are free

#### 🧭 More scrapers from us

- [Telegram Scraper](https://apify.com/openclawai/telegram-scraper)
- [TikTok Scraper](https://apify.com/openclawai/tiktok-scraper)
- [Instagram Scraper](https://apify.com/openclawai/instagram-scraper)
- [TikTok, Douyin & Bilibili Scraper (all platforms in one run)](https://apify.com/openclawai/tiktok-douyin-bilibili-scraper)

### Pricing

You pay per result. No compute or proxy charges on top, and hint and error rows are free.

| What you get | Price per 1,000 |
|---|---|
| 🐦 Tweets from any list (profile, search, media, list) | **$0.30** |
| 💬 Replies to a tweet | **$0.50** |
| 👥 Accounts from followers, following or retweeters | **$0.40** |
| 🔍 Single lookups: tweet by link or full profile | **$1.50** |
| 📈 Trending topics | **$1.00** |

#### How much does it cost to scrape Twitter data?

| Job | Cost |
|---|---|
| 1,000 tweets | $0.30 |
| 10,000 tweets | $3.00 |
| 100,000 tweets | $30 |
| 10,000 followers | $4.00 |

Set **Max cost per run** in the run options and the actor stops cleanly at that amount.

#### 🆓 Free plan

On the free Apify plan each run returns up to 10 results, so you can check the data before you buy. Comment replies need a paid plan. Any paid Apify plan removes the limit.

#### ⚡ Speed

Timelines and search return 20 tweets per request and follower lists about 70, so 10,000 tweets usually take a few minutes.

### Input

| Field | What it does |
|---|---|
| `mode` | Links, @usernames or IDs: user_posts, user_replies, user_media, user_profile, video_detail, video_comments, followers, following, retweeters, list_tweets. Keywords: search_videos, search_latest, search_media. No input: trending. |
| `urls` | One per line: profile links or @usernames, tweet links or IDs, list links (x.com/i/lists/…). twitter.com links work too. |
| `queries` | Keywords or X search queries for the search modes, one per line (from:user, #hashtag, "exact phrase" all work). |
| `maxItems` | Stop after this many rows per link or keyword (comments include their replies). |
| `region` | Two-letter country code for trending topics (US, GB, IN, JP, BR, MA…). |

#### 🧪 Example inputs

**Latest 200 tweets from an account**

```json
{"mode": "user_posts", "urls": ["https://x.com/NASA"], "maxItems": 200}
```

**Search the latest tweets**

```json
{"mode": "search_latest", "queries": ["openai", "from:elonmusk tesla"], "maxItems": 500}
```

**Replies to a tweet**

```json
{"mode": "video_comments", "urls": ["https://x.com/NASA/status/2108634944255742173"], "maxItems": 300}
```

**Followers of an account**

```json
{"mode": "followers", "urls": ["@NASA"], "maxItems": 5000}
```

**Trending topics in the UK**

```json
{"mode": "trending", "region": "GB"}
```

### Output

Every row uses the same fields. Export as JSON, CSV, Excel, XML or HTML.

#### 📦 Example output

```json
{
  "platform": "twitter",
  "item_type": "tweet",
  "item_id": "2108634944255742173",
  "url": "https://x.com/NASA/status/2108634944255742173",
  "title": "On Thursday, Oct. 15, the members of Crew-12 will hold a news conference to discuss their time and e…",
  "description": "On Thursday, Oct. 15, the members of Crew-12 will hold a news conference to discuss their time and e…",
  "author_id": "11348282",
  "author_name": "NASA",
  "author_username": "NASA",
  "cover_url": "https://pbs.twimg.com/media/HUNgTmyWMAEELnj.jpg…",
  "created_at": "2026-10-09T19:05:21+00:00",
  "play_count": 213864,
  "like_count": 698,
  "comment_count": 45,
  "share_count": 66,
  "collect_count": 19,
  "mode": "user_posts",
  "source_input": "NASA",
  "scraped_at": "2026-10-09T20:34:33.295754+00:00",
  "raw": {
    "…": "full original record"
  }
}
```

#### 📤 Main fields

| Field | Description |
|---|---|
| `platform`, `item_type`, `mode`, `source_input` | Where the row came from and what it is (`video`, `user`, `comment`, `hint`, `error`…) |
| `item_id`, `url` | Native ID and a link back to the item |
| `title`, `description`, `hashtags`, `created_at` | Text and publish time (ISO 8601) |
| `author_id`, `author_name`, `author_username` | Creator or account |
| `play_count`, `like_count`, `comment_count`, `share_count`, `collect_count` | Engagement counts |
| `raw` | The full original record, every field the platform returned |
| `error_message` | Explanation on free `hint` / `error` rows |

### Troubleshooting

#### Search returns fewer tweets than expected?

X limits how far back search goes for some queries. Try the Top and Latest modes, or narrow the query with `since:` / `until:`.

#### Getting no results?

Check that the link or username is public and typed correctly. Private accounts, deleted posts and hidden lists return a free `hint` row that says why. Keyword modes need the **Keywords** field, link modes need **Links**.

#### Getting fewer results than `maxItems`?

The platform ran out of items for that input (a small profile, a niche keyword), or the run reached its **Max cost per run** limit. The log says which one.

#### Some fields are empty?

Platforms don't return every field for every item. Everything the platform did return is kept in `raw`.

#### Video or image links stopped working?

Media URLs from these platforms expire after a few hours. Download files right after the run.

#### The run failed or shows an error row?

Retry once: the platforms sometimes refuse a request for a few minutes. If it keeps failing, open an issue with the run link and we'll fix it fast.

### Who uses this Twitter Scraper?

#### 📣 Social media managers

Track competitors' tweets, engagement and reply sentiment.

#### 📈 Traders and analysts

Watch tickers, founders and news accounts in near real time.

#### 🧑‍🤝‍🧑 Growth and sales teams

Build lead lists from followers and retweeters of relevant accounts.

#### 📰 Journalists and researchers

Collect tweets on events, topics and public figures.

#### 🤖 AI and data teams

Collect tweets and replies as training or evaluation data.

#### 🧑‍💻 Developers and AI agents

Pull X data into apps without the paid X API.

### Use cases

#### Brand monitoring

Search your brand with Latest every hour and alert on new mentions.

#### Lead generation

Pull followers of a competitor and filter by bio keywords.

#### Sentiment analysis

Collect replies to a launch tweet and score them.

#### Trend research

Pull trending topics per country every morning.

### FAQ

#### Can I scrape Twitter without an account?

Yes. No X login, cookies or API keys, so no account can be banned.

#### Is this cheaper than the official X API?

Yes, by far. The X API's paid tiers start at hundreds of dollars per month; here 10,000 tweets cost $3.

#### Can I scrape tweets from any account?

Yes, any public account. Protected accounts return a free `hint` row.

#### Can I scrape replies to a tweet?

Yes, with the replies mode; each reply is a row with its parent tweet ID.

#### How much does it cost to scrape 100,000 tweets?

About $30, at $0.30 per 1,000 tweets.

#### Can I scrape Twitter followers?

Yes, at $0.40 per 1,000 accounts, about 70 per request.

#### Does it support advanced search?

Yes. Use X search operators like `from:`, `to:`, `since:`, `until:`, `min_faves:` and `lang:` in the keywords.

#### Can I get trending topics for my country?

Yes, set **Region** (US, GB, IN, JP, BR, MA and more).

#### Is there a free tier?

Yes. On the free Apify plan each run returns up to 10 results.

#### Can I use it from Python, JavaScript or an AI agent?

Yes, through the Apify API, the client libraries, or MCP.

### API, Python, JavaScript and MCP

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("openclawai/twitter-scraper").call(run_input={"mode": "user_posts", "urls": ["https://x.com/NASA"], "maxItems": 200})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript**

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

const client = new ApifyClient({ token: "YOUR_APIFY_TOKEN" });
const run = await client.actor("openclawai/twitter-scraper").call({"mode": "user_posts", "urls": ["https://x.com/NASA"], "maxItems": 200});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**MCP** (Claude, ChatGPT, Cursor and other MCP clients): `https://mcp.apify.com/?tools=openclawai/twitter-scraper`

Works with Zapier, Make, n8n, Google Sheets, Slack, webhooks and scheduled runs.

### 🛡️ Legal

Collects **public** data only. You are responsible for complying with X (Twitter)'s terms and with privacy laws such as GDPR, CCPA and PIPL when you store personal data.

### ⭐ Support

Something not working? Check the `hint` / `error` rows, then open an issue with the run link. We reply fast.

# Actor input Schema

## `mode` (type: `string`):

Links, @usernames or IDs: user_posts, user_replies, user_media, user_profile, video_detail, video_comments, followers, following, retweeters, list_tweets. Keywords: search_videos, search_latest, search_media. No input: trending.

## `urls` (type: `array`):

One per line: profile links or @usernames, tweet links or IDs, list links (x.com/i/lists/…). twitter.com links work too.

## `queries` (type: `array`):

Keywords or X search queries for the search modes, one per line (from:user, #hashtag, "exact phrase" all work).

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

Stop after this many rows per link or keyword (comments include their replies).

## `region` (type: `string`):

Two-letter country code for trending topics (US, GB, IN, JP, BR, MA…).

## Actor input object example

```json
{
  "mode": "user_posts",
  "urls": [
    "https://x.com/NASA"
  ],
  "maxItems": 20,
  "region": "US"
}
```

# Actor output Schema

## `results` (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 = {
    "mode": "user_posts",
    "urls": [
        "https://x.com/NASA"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("openclawai/twitter-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 = {
    "mode": "user_posts",
    "urls": ["https://x.com/NASA"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("openclawai/twitter-scraper").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 '{
  "mode": "user_posts",
  "urls": [
    "https://x.com/NASA"
  ],
  "maxItems": 20
}' |
apify call openclawai/twitter-scraper --silent --output-dataset

```

## MCP server setup

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

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/6Xhfxpo14v6dm84Ja/builds/geYtcbzTFtF8ez4cK/openapi.json
