# Twitter (X) Scraper - Tweets, Profiles & Replies (`scrapesmith/twitter-x-scraper-tweets-profiles-replies`) Actor

Extract unlimited public tweets from any Twitter (X) profile, search query, hashtag, or tweet thread. Get full text, replies, likes, retweets, views, media & engagement metrics. Export to JSON, CSV or Excel. No login, no cookies, no proxies required — just run it and download your Twitter data.

- **URL**: https://apify.com/scrapesmith/twitter-x-scraper-tweets-profiles-replies.md
- **Developed by:** [Scrape Smith](https://apify.com/scrapesmith) (community)
- **Categories:** Social media, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 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.

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) Scraper — Tweets, Profiles, Search & Replies

**The fastest, most reliable way to scrape Twitter / X data — no login, no cookies, no proxies required.** Extract unlimited public tweets from any profile, search query, hashtag, list, or tweet thread and export them to JSON, CSV, or Excel in minutes.

Whether you need Twitter data for market research, brand monitoring, sentiment analysis, lead generation, academic research, or training datasets, this Twitter scraper delivers clean, structured tweet data at scale — without the cost, rate limits, or hassle of the official Twitter API.

---

### ✨ Why choose this Twitter (X) Scraper?

- ⚡ **Massive scale** — pull tens of thousands of tweets in a single run, far beyond Twitter's usual ~1,000-tweet profile limit.
- 🔓 **No login required** — no account, no password, no authentication tokens to manage on your end.
- 🍪 **No cookies required** — nothing for you to supply or refresh. Access is fully managed and kept fresh on our side.
- 🌐 **No proxies required** — no proxy setup, no extra proxy bills, no IP configuration.
- 🧩 **Four scrapers in one** — profiles, keyword/hashtag search, single-tweet replies, and direct URLs.
- 📦 **Export anywhere** — JSON, CSV, Excel, HTML, or RSS. Push straight into your database, spreadsheet, or app.
- 🛡️ **Built to never break** — handles bad input, empty results, and rate limits gracefully, always returning the data it collected.
- 💸 **Cheaper than the official API** — no $100+/month developer plan needed.

---

### 🚀 What can you scrape?

#### 1. Twitter profiles
Scrape every public tweet from any Twitter / X account — including older tweets most scrapers can't reach. Get full post history, replies, media, and engagement numbers.

#### 2. Twitter search & hashtags
Scrape tweets for any keyword, hashtag, phrase, or advanced search query. Track topics, campaigns, competitors, cashtags, or trends as they happen.

#### 3. Tweet replies & conversations
Scrape thousands of replies under any single tweet — perfect for sentiment analysis, audience research, and conversation mining.

#### 4. Direct Twitter URLs
Paste any profile, search, list, or tweet URL and the scraper figures out the rest automatically.

---

### 🎯 Popular use cases

- **Market & competitor research** — monitor what brands and competitors post and how audiences react.
- **Sentiment analysis** — collect tweets and replies about a product, person, or topic.
- **Brand monitoring** — track mentions, hashtags, and campaigns in real time.
- **Lead generation** — find and qualify prospects discussing relevant topics.
- **Academic & data science** — build large, structured datasets for research and AI/ML training.
- **News & trend tracking** — follow breaking topics and viral conversations.
- **Influencer discovery** — identify high-engagement accounts in any niche.

---

### 🛠️ How to use the Twitter Scraper (step by step)

1. Click **Try for free / Start**.
2. Enter what you want to scrape:
   - **Twitter Handles** — one or more usernames (with or without `@`).
   - **Search Terms** — keywords, hashtags, or advanced queries.
   - **Start URLs** — profile, search, list, or tweet links.
3. Set **Max Tweets** (how many results per source) and any optional filters.
4. Click **Save & Run**.
5. When it finishes, **download your data** as JSON, CSV, or Excel — or grab it via API.

No setup, no credentials, no proxies. It just works.

---

### ⚙️ Input options

| Option | What it does |
|---|---|
| **Twitter Handles** | Usernames to scrape (with or without `@`). |
| **Search Terms** | Keywords, hashtags, phrases, or advanced search queries. |
| **Start URLs** | Profile, search, list, or tweet URLs. |
| **Max Tweets** | How many tweets to collect per profile / search. |
| **Max Replies** | How many replies to collect from a single tweet. |
| **Include Replies** | Also include a profile's reply tweets. |
| **Search Sort** | Sort search results by Top or Latest. |
| **Tweet Language** | Limit results to a language (e.g. `en`, `es`, `fr`). |
| **Max Total Items** | Hard cap on total results across all sources. |

Handles, links, search terms, hashtags, emojis, and special characters are all cleaned and handled automatically — paste them in any format and it just works.

---

### 📊 What data do you get?

Each tweet is returned as a clean, structured record, including:

- Tweet text & tweet URL
- Author username, display name, follower count & profile picture
- Likes, retweets, replies, quotes & view counts
- Date & time posted
- Hashtags, mentions & links
- Media (images & video URLs)
- Reply / retweet / quote flags

#### Example output

```json
{
  "id": "1234567890",
  "url": "https://x.com/nasa/status/1234567890",
  "text": "We're going back to the Moon. 🚀",
  "likeCount": 48213,
  "retweetCount": 9120,
  "replyCount": 1503,
  "viewCount": 2310445,
  "createdAt": "2026-05-21T14:03:00.000Z",
  "hashtags": ["Artemis", "Moon"],
  "author": {
    "userName": "NASA",
    "name": "NASA",
    "followers": 79000000
  }
}
````

Export the full dataset as **JSON, CSV, Excel, HTML, or RSS**.

***

### ❓ Frequently asked questions

**Is this Twitter scraper free?**
You can start for free and scale up as you need. It's far cheaper than the official Twitter/X API.

**Do I need a Twitter account or login?**
No. No account, no login, and no password are required.

**Do I need to provide cookies or tokens?**
No. Nothing to supply and nothing to refresh — access is fully managed and kept fresh on our side.

**Do I need proxies?**
No. There's no proxy setup and no extra proxy cost.

**How many tweets can I scrape?**
Tens of thousands per run — well beyond Twitter's standard ~1,000-tweet profile limit.

**Can I scrape replies to a tweet?**
Yes. Provide a tweet URL and set how many replies you want.

**Can I scrape by hashtag or keyword?**
Yes. Use Search Terms for any keyword, hashtag, phrase, or advanced query.

**What formats can I export?**
JSON, CSV, Excel, HTML, and RSS — or pull results directly via API.

**Is scraping public Twitter data allowed?**
This tool collects only publicly available data. You are responsible for using scraped data in line with applicable laws and Twitter's terms.

***

### 🔥 Start scraping Twitter (X) now

Get clean, structured Twitter data in minutes — no login, no cookies, no proxies. **Click Run and download your tweets.**

*Keywords: twitter scraper, x scraper, tweet scraper, scrape tweets, twitter data extraction, twitter profile scraper, twitter search scraper, hashtag scraper, twitter replies scraper, export tweets to csv, twitter api alternative, scrape twitter without login.*

# Actor input Schema

## `twitterHandles` (type: `array`):

List of Twitter/X usernames to scrape (with or without @). The scraper uses time-window pagination to go far beyond Twitter's standard ~1000-tweet profile cap.

## `searchTerms` (type: `array`):

Search queries to run against Twitter's search endpoint.

## `startUrls` (type: `array`):

Direct Twitter/X URLs to scrape — profile, search, list, or tweet URLs.

## `maxTweets` (type: `integer`):

Maximum number of tweets to collect per profile / search / list. Set to 5000+ to leverage the deep-history fallback.

## `maxReplies` (type: `integer`):

When scraping a single tweet URL, how many replies to include.

## `includeReplies` (type: `boolean`):

When scraping a profile, also include tweets that are replies.

## `sort` (type: `string`):

Sort order for search queries.

## `tweetLanguage` (type: `string`):

Two-letter ISO-639-1 language code (e.g. en, es, fr). Leave blank for any language.

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

Hard cap on total items pushed to the dataset across all sources.

## Actor input object example

```json
{
  "twitterHandles": [
    "elonmusk",
    "@nasa"
  ],
  "searchTerms": [
    "bitcoin",
    "from:elonmusk has:images"
  ],
  "maxTweets": 5000,
  "maxReplies": 20,
  "includeReplies": false,
  "sort": "Latest",
  "tweetLanguage": "en"
}
```

# 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 = {
    "twitterHandles": [
        "elonmusk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesmith/twitter-x-scraper-tweets-profiles-replies").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 = { "twitterHandles": ["elonmusk"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapesmith/twitter-x-scraper-tweets-profiles-replies").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 '{
  "twitterHandles": [
    "elonmusk"
  ]
}' |
apify call scrapesmith/twitter-x-scraper-tweets-profiles-replies --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter (X) Scraper - Tweets, Profiles & Replies",
        "description": "Extract unlimited public tweets from any Twitter (X) profile, search query, hashtag, or tweet thread. Get full text, replies, likes, retweets, views, media & engagement metrics. Export to JSON, CSV or Excel. No login, no cookies, no proxies required — just run it and download your Twitter data.",
        "version": "0.0",
        "x-build-id": "UzduahguJaY5hwulC"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesmith~twitter-x-scraper-tweets-profiles-replies/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesmith-twitter-x-scraper-tweets-profiles-replies",
                "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/scrapesmith~twitter-x-scraper-tweets-profiles-replies/runs": {
            "post": {
                "operationId": "runs-sync-scrapesmith-twitter-x-scraper-tweets-profiles-replies",
                "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/scrapesmith~twitter-x-scraper-tweets-profiles-replies/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesmith-twitter-x-scraper-tweets-profiles-replies",
                "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": {
                    "twitterHandles": {
                        "title": "Twitter Handles",
                        "type": "array",
                        "description": "List of Twitter/X usernames to scrape (with or without @). The scraper uses time-window pagination to go far beyond Twitter's standard ~1000-tweet profile cap.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchTerms": {
                        "title": "Search Terms",
                        "type": "array",
                        "description": "Search queries to run against Twitter's search endpoint.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Direct Twitter/X URLs to scrape — profile, search, list, or tweet URLs.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxTweets": {
                        "title": "Max Tweets per Source",
                        "minimum": 1,
                        "maximum": 500000,
                        "type": "integer",
                        "description": "Maximum number of tweets to collect per profile / search / list. Set to 5000+ to leverage the deep-history fallback.",
                        "default": 100
                    },
                    "maxReplies": {
                        "title": "Max Replies per Tweet",
                        "minimum": 0,
                        "maximum": 500000,
                        "type": "integer",
                        "description": "When scraping a single tweet URL, how many replies to include.",
                        "default": 20
                    },
                    "includeReplies": {
                        "title": "Include Replies",
                        "type": "boolean",
                        "description": "When scraping a profile, also include tweets that are replies.",
                        "default": false
                    },
                    "sort": {
                        "title": "Search Sort",
                        "enum": [
                            "Top",
                            "Latest",
                            "Media",
                            "People",
                            "Lists"
                        ],
                        "type": "string",
                        "description": "Sort order for search queries.",
                        "default": "Latest"
                    },
                    "tweetLanguage": {
                        "title": "Tweet Language",
                        "type": "string",
                        "description": "Two-letter ISO-639-1 language code (e.g. en, es, fr). Leave blank for any language."
                    },
                    "maxItems": {
                        "title": "Max Total Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Hard cap on total items pushed to the dataset across all sources."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
