# $4/1K | X (Twitter) Scraper - Profiles and Posts (`scrapercompany/x-scraper`) Actor

Scrape X (Twitter) profiles (exact followers, following, posts and likes, bio, verification) and accounts' latest posts with exact likes, reposts, replies, quotes, bookmarks and views. No login or cookies; batch many accounts. Made by ScraperCompany.

- **URL**: https://apify.com/scrapercompany/x-scraper.md
- **Developed by:** [ScraperCompany](https://apify.com/scrapercompany) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 x profiles

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

## X (Twitter) Scraper - Profiles and Posts

**X (Twitter) Scraper** by ScraperCompany collects public x.com data in two modes, without a login or cookies. **Profiles** returns an account's **name, bio, location, website, exact follower, following, post and like counts, verification, avatar and banner**.

### ⭐ Like this Actor? Leave a review

If X (Twitter) Scraper saved you time, please [leave a review on the Store](https://apify.com/scrapercompany/x-scraper/reviews). It takes a minute, helps other people find a scraper that works, and tells us what to build next.

> 🟢 **Nothing to set up:** no code, no login and no keys. Click **Try for free**, start a run, and export JSON, CSV or Excel, or pull the results through the Apify API. You pay only for results; failed and empty requests are free.

### 📦 What you get

| Mode | What you get | Price | Per 1,000 |
| --- | --- | --- | --- |
| `profile` | An account's name, bio, exact follower, following, post and like counts, verification, avatar and banner | $0.004 | $4.00 |
| `tweets` | An account's posts, newest first, with exact engagement counts | $0.004 | $4.00 |

- 💵 **Price:** **$4 per 1,000** `profile` events ($0.004 each); failed and empty requests are free.
- ⚙️ **Setup:** none. No account on the site, no cookies, no keys.
- 📁 **Export:** JSON, CSV, Excel or HTML from the **Output** tab, or the Apify API.
- 🔁 **Automate:** schedules, webhooks, Make, Zapier, n8n and AI agents (MCP).

### ✨ What can this X (Twitter) scraper do?

**Posts** returns an account's latest posts, newest first, each with **exact likes, reposts, replies, quotes, bookmarks and views**, page after page. Each request is charged once; failed requests, unknown accounts and empty pages are free.

- **Profiles**: exact follower, following, post and like counts (not rounded to "92M"), bio, location, website, join date, verified and protected flags, avatar and banner.
- **Posts**: about 20 posts per page, newest first, with text, language, date, repost and reply flags, and exact likes, reposts, replies, quotes, bookmarks and views.
- Page through an account's posts with **Pages per account** (up to 50 pages).
- Accepts handles with or without `@` and profile links. Batch many accounts in one run.

### 🚀 Quick start: how to scrape X (Twitter) profiles and posts

1. Click **Try for free** (or open the Actor in Apify Console) and go to the **Input** tab.
2. Pick a **Mode**, then enter accounts such as `@NASA`, one per line. For Posts, raise **Pages per account** for more posts (about 20 a page).
3. Adjust the options if needed.
4. Click **Start** and wait for the run to finish.
5. Download the results from the **Output** tab as JSON, CSV, Excel or HTML, or fetch them with the Apify API.

💡 **Tip:** run it once with the pre-filled input to see the output, then change the input to your own.

### ⚖️ What makes it different?

| | **X (Twitter) Scraper** | Many alternatives |
| --- | --- | --- |
| Setup | Nothing to configure: no login, no keys | Often your own accounts, cookies or network setup |
| You pay for | Successful results; failed and empty requests are free | Often run time, or every attempt |
| When a request fails | Retried automatically, and never charged | Often an empty or failed run |

### 👥 Who uses X (Twitter) data?

- **Influencer and creator marketing**: Check accounts' exact follower counts, bios and verification before you reach out, and track them over time.
- **Brands and PR teams**: Follow what an account posts and how many likes, reposts and views each post gets.
- **Researchers and analysts**: Collect public posts with their engagement for trend, media and sentiment work.

### 🧭 Common jobs

#### Vet accounts

Run **Profiles** on a list of handles for exact followers, bios and verification.

#### Track an account

Run **Posts** each day to see what it posted and how each post performs.

#### Compare engagement

Run **Posts** on several accounts and compare likes and views per post.

### 📋 What X (Twitter) data can you extract?

| Field | Description |
| --- | --- |
| `user.handle / name / description` | Handle, display name and bio (Profiles) |
| `user.followers / following / tweets_count / likes_count` | Exact counts (Profiles) |
| `user.verified / blue_verified / protected / created_at` | Account flags and join date |
| `user.location / url / avatar / banner / link` | Location, website, pictures and profile link |
| `tweets[].tweet_id / text / created_at / lang / link` | Post text, date and link (Posts) |
| `tweets[].likes / retweets / replies / quotes / bookmarks / views` | Exact engagement counts |
| `tweets[].is_retweet / is_reply / author` | Post kind and its author |
| `next_cursor` | Where the next page starts |

Every dataset item also carries `input` (the options used for that request), `request_id` (quote it to support), `billed` and `scraped_at`.

### ⌨️ Input

| Input | Name | What it does |
| --- | --- | --- |
| `mode` | Mode | Read accounts' profiles, or their latest posts. |
| `accounts` | Accounts | .com/NASA`. |
| `maxPages\` | Pages per account (Posts) | How many pages of posts to fetch for each account (1-50). Each page is a separate request and is charged separately; paging stops when X has no further page. |

### 📥 Input example

This is the default input; running the Actor without changes uses it.

```json
{
  "mode": "profile",
  "accounts": [
    "@NASA"
  ],
  "maxPages": 1,
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

### 📤 Output example

One dataset item per request (trimmed here; real items contain all the fields):

```json
{
  "mode": "profile",
  "input": {
    "handle": "@NASA"
  },
  "search_parameters": {
    "handle": "@NASA"
  },
  "user": {
    "created_at": "Wed Dec 19 20:20:32 +0000 2007",
    "description": "Making the seemingly impossible, possible.",
    "followers": 92258771,
    "following": 115,
    "handle": "NASA",
    "link": "https://x.com/NASA",
    "location": "Pale Blue Dot",
    "name": "NASA",
    "tweets_count": 74534,
    "url": "http://www.nasa.gov/",
    "user_id": "11348282",
    "verified": true
  },
  "request_id": "req_3f9c0d6e2b8a4c1f9e7d5b3a1c0e8f6d",
  "billed": true,
  "scraped_at": "2026-10-01T14:03:27.512Z"
}
```

A request that fails is saved with an `error` message instead (turn off **Include failed requests** to skip those). Failed requests are never charged.

### 💰 How much does it cost to scrape X (Twitter) profiles and posts?

This Actor uses **pay-per-event** pricing: you pay for successful requests, not for compute time.

| Event | Charged when | Price | Per 1,000 |
| --- | --- | --- | --- |
| `profile` | One account's profile: name, bio, location, link, exact follower, following, post and like counts, verification, avatar and banner. Unknown accounts are free. | $0.004 | $4.00 |
| `tweets-page` | One page of an account's posts, newest first (about 20), each with exact likes, reposts, replies, quotes, bookmarks and views. Empty pages are free. | $0.004 | $4.00 |

The **$4/1K** in the title is the price of 1,000 `profile` events.

#### Cost examples

| Job | Cost |
| --- | --- |
| 100 profiles | **$0.40** |
| 5 pages of posts for 20 accounts | **$0.40** |

Apify's $5 of free monthly usage covers about **1,250** `profile` events.

- ✅ Failed requests (errors, invalid input, a site refusing after retries) are **free**.
- ✅ Requests where the source returns nothing at all (no results, nothing priced) are saved but **not charged**.
- ✅ Set **Maximum cost per run** when you start a run and the Actor stops cleanly before going over it.

### 🔌 Integrations

#### ⏰ Schedules and webhooks

Use Apify **Schedules** to repeat a run hourly, daily or weekly and compare results over time, and **webhooks** or the **Integrations** tab to push new results to Make, Zapier, n8n, Google Sheets, Slack or your own warehouse.

#### 🤖 AI agents and MCP

Results are structured JSON, so they are easy to feed to a model. AI agents such as Claude can run this Actor and read its results through the [Apify MCP server](https://mcp.apify.com).

#### 💻 API: JavaScript and Python

Call the Actor from any language through the [Apify API](https://docs.apify.com/api/v2). With the JavaScript client (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('scrapercompany/x-scraper').call({
    "mode": "profile",
    "accounts": [
        "@NASA"
    ]
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

With Python (`pip install apify-client`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("scrapercompany/x-scraper").call(run_input={
    "mode": "profile",
    "accounts": ["@NASA"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### ❓ FAQ

#### Do I need an account on the site, or an API key?

No. The Actor is ready to run as is, and you only pay the per-event prices above.

#### Do I need an X account or API key?

No. The Actor reads public X data without logging in, and you do not need an X developer account.

#### Can it search posts or list followers?

Not yet. X shows search results, follower lists, Lists and replies only to logged-in users, so this Actor covers public profiles and their posts.

#### Are the counts exact?

Yes. Follower, like, repost and view counts are exact numbers, not the rounded figures X shows on screen.

#### What about protected accounts?

Their profile comes back with `protected` set; their posts are not public, so that page is empty and free.

#### Is it legal to scrape X (Twitter) profiles and posts?

The Actor collects publicly available information that anyone can see without logging in. You are responsible for how you use the results: respect the source site's terms, copyright and privacy law (such as GDPR) and do not collect personal data without a lawful basis. If in doubt, ask a lawyer.

#### What happens when a request fails?

Failed attempts are retried automatically. If a request still fails it is saved with the error message and not charged, and the rest of the batch keeps going. A run only fails when every request failed.

#### Why did a request return an error?

Read the `error` field: it says what was wrong with the input, for example a malformed date or an unknown id. Fix it and run again; failed requests cost nothing.

#### How many requests can I run at once?

Any number per run. The Actor sends up to 3 requests in parallel by default (change it under **Run options**); larger batches simply take longer.

### 🔗 Related scrapers

- [Instagram Scraper](https://apify.com/scrapercompany/instagram-scraper): Instagram profiles, posts, hashtags and comments
- [TikTok Scraper](https://apify.com/scrapercompany/tiktok-scraper): TikTok profiles, videos and comments

### 📝 Tried it? Tell others

Once you have run X (Twitter) Scraper, a [short review on the Store](https://apify.com/scrapercompany/x-scraper/reviews) helps the next person decide.

### 💬 Support

Questions, a field you need, or a site that stopped working? Open an issue on the **Issues** tab. Include the `request_id` from the dataset item so we can trace the request. We read every issue.

# Changelog

This Actor's version history is a separate document: https://apify.com/scrapercompany/x-scraper/changelog.md

# Actor input Schema

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

Read accounts' profiles, or their latest posts.

## `accounts` (type: `array`):

One X (Twitter) account per line: <code>@NASA</code>, <code>NASA</code> or a link such as <code>https://x.com/NASA</code>.

## `maxPages` (type: `integer`):

How many pages of posts to fetch for each account (1-50). Each page is a separate request and is charged separately; paging stops when X has no further page.

## `customRequests` (type: `array`):

Optional list of JSON objects, one request each, using the field names shown above. Each object is merged over the options above, so you only need to give what differs. Add <code>"mode"</code> to an object to mix modes, for example <code>{"mode": "profile", "handle": "@SpaceX"}</code>. Example: <code>{"mode":"tweets","handle":"@NASA"}</code>

## `includeErrors` (type: `boolean`):

When on, a request that fails (for example an unknown property id) is saved as a dataset item with an <code>error</code> message so you can see what went wrong. Failed requests are never charged.

## `maxConcurrency` (type: `integer`):

How many requests run at the same time (1-8). Parallel runs share one limit, so extra requests wait for a free slot instead of failing.

## `maxRetries` (type: `integer`):

How many times a request that failed for a temporary reason is tried again right away. A request still failing then gets one more try at the end of the run, after a 30-second pause. Invalid input is never retried.

## Actor input object example

```json
{
  "mode": "profile",
  "accounts": [
    "@NASA"
  ],
  "maxPages": 1,
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

# Actor output Schema

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

One dataset item per request.

## `summary` (type: `string`):

Counts of succeeded, failed, skipped and charged requests.

# 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 = {
    "accounts": [
        "@NASA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapercompany/x-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 = { "accounts": ["@NASA"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapercompany/x-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 '{
  "accounts": [
    "@NASA"
  ]
}' |
apify call scrapercompany/x-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapercompany/x-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/eRQG4mJQDw6cUFonq/builds/fM9UGDuoPPZzcN1zq/openapi.json
