# Twitter (X) Profile & Tweets Scraper (`memo23/twitter-x-scraper`) Actor

Scrape Twitter (X) profiles and individual tweets — no login, no API key. Get clean, structured data: full text, likes, retweets, replies, views, author profile, follower counts, media and entities. Mix profile URLs and tweet links in one run. Export to JSON, CSV, Excel or API

- **URL**: https://apify.com/memo23/twitter-x-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Social media, AI, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 tweet scrapeds

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 Profile & Tweets Scraper 🐦

Scrape any **Twitter (X)** profile's tweets — fast, no login, no API keys. Paste one or more X
profile URLs (or bare handles) and get back clean, structured records: full tweet text, engagement
metrics, author details, media, and entities. Built on X's public endpoints, so it's quick and the
output drops straight into your app, sheet, or database.

![How the Twitter (X) Scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-x.png)

---

### What you can scrape

- **Profile timelines** — a user's tweets, e.g. `https://x.com/nasa` (or just `nasa`)
- **Individual tweets** — paste a tweet URL, e.g. `https://x.com/Twitter/status/20`
- For each tweet: full text, engagement counts, media, and the author's profile data

Mix profile URLs and tweet URLs in one run. No authentication, no cookies, no API token required.

> Keyword **search** and **follower/following** lists are not part of this actor — those require a
> logged-in X account. Profiles and individual tweets work with no login at all.

---

### Data you get per tweet

**Tweet:** id, url, full text, language, created date, source, reply/quote/retweet flags, quoted-tweet id.

**Engagement:** like count, retweet count, reply count, quote count, bookmark count.

**Author:** username, display name, id, bio, location, follower & following counts, verified /
blue-verified status, profile + banner image, account-created date, tweet/media/likes counts.

**Media & entities:** image and video URLs, cards, hashtags, mentions, URLs.

Clean, flat records by default. Need the raw X GraphQL object too? Flip on **Include raw data** and
each record carries the full payload under `otherData`.

---

### How to use it

1. Put one or more X profile URLs (or `@handles`) in **Start URLs**.
2. Set **Max items** to cap how many tweets you collect.
3. Run it, then download as JSON / CSV / Excel, or pull via the Apify API.

#### Example input

```json
{
  "startUrls": [
    "https://x.com/nasa",
    "elonmusk",
    "https://x.com/Twitter/status/20"
  ],
  "maxItems": 100
}
````

***

### Input parameters

| Field | Type | Description |
|---|---|---|
| **Start URLs** | array | X profile URLs, bare handles like `nasa`, or individual tweet URLs (`.../status/<id>`). |
| **Max items** | integer | Cap on tweets collected across all profiles. |
| **Include raw data** | boolean | Add the full raw X GraphQL object as `otherData` per record. Off by default (clean output). |
| **Max concurrency** | integer | Parallel requests. |
| **Proxy** | object | Proxy configuration (residential recommended). |

***

### Example output

```json
{
  "type": "tweet",
  "id": "2067746088296038531",
  "url": "https://x.com/NASA/status/2067746088296038531",
  "text": "What a great moment! …",
  "lang": "en",
  "createdAt": "Thu Jun 18 23:07:38 +0000 2026",
  "retweetCount": 260,
  "replyCount": 38,
  "likeCount": 980,
  "quoteCount": 12,
  "bookmarkCount": 44,
  "isReply": false,
  "isRetweet": false,
  "isQuote": false,
  "source": "Twitter for iPhone",
  "media": [],
  "author": {
    "userName": "NASA",
    "name": "NASA",
    "id": "11348282",
    "followers": 92118329,
    "following": 198,
    "isVerified": true,
    "isBlueVerified": true,
    "description": "There's space for everybody.",
    "location": "",
    "profilePicture": "https://pbs.twimg.com/profile_images/.../...jpg"
  }
}
```

***

### Popular use cases

- **Competitor & influencer monitoring** — track any account's tweets, engagement, and follower counts
- **Brand & campaign tracking** — pull a brand account's timeline over time
- **Engagement analytics** — benchmark posts and accounts
- **Datasets for ML/AI** — clean tweet corpora for training or analysis
- **Journalism & academic research** — reproducible, citation-friendly data pulls

***

### Export & integrate

Download results as **JSON, CSV, Excel, or HTML**, or pull via the **Apify API**. Schedule runs to
keep data fresh, and connect to Make, Zapier, n8n, Google Sheets, and more.

***

### FAQ

**Do I need a Twitter/X account or API key?**
No — it uses X's public endpoints. No login, no cookies, no developer API.

**What do I give it as input?**
X profile URLs (e.g. `https://x.com/nasa`), bare handles (e.g. `nasa`), or individual tweet URLs
(e.g. `https://x.com/Twitter/status/20`). Add as many as you like.

**Can I mix profiles and single tweets in one run?**
Yes — put any combination of profile URLs/handles and tweet URLs in Start URLs.

**Does it do keyword search or follower lists?**
No — those require a logged-in X account, so they're out of scope for this no-login actor.

**Is the output clean or raw?**
Clean flat records by default (~22 fields). Toggle **Include raw data** for the full raw object too.

**Why use a proxy?**
X rate-limits by IP. A residential proxy keeps runs reliable at volume.

**How current is the data?**
Live — pulled from X at run time, not a pre-built database.

***

### 💬 Support

Questions, a bug, or a field you need added? Email **muhameddidovic@gmail.com** or open an issue on
the actor's Apify page.

***

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by X Corp.
(Twitter), or any of its subsidiaries or affiliates. All trademarks mentioned are the property of
their respective owners.

The scraper accesses only publicly available tweets and profiles — no authenticated endpoints,
private accounts, or content behind a login. Users are responsible for ensuring their use complies
with X's Terms of Service, applicable data-protection law (GDPR, CCPA, etc.), and any contractual
obligations of their own organisation.

***

### SEO Keywords

twitter scraper, x scraper, x.com scraper, twitter profile scraper, x profile scraper, scrape tweets, tweet scraper, twitter timeline scraper, twitter api, twitter data extraction, tweet data api, twitter followers data, no-auth twitter scraper, social media scraper, twitter analytics scraper, twitter engagement data, apify twitter

# Actor input Schema

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

X profile URLs or bare handles (e.g. `https://x.com/nasa` or `nasa`), and/or individual tweet URLs (e.g. `https://x.com/Twitter/status/20`). You can mix profiles and tweets in one run. Keyword search and follower lists are not supported (they need a logged-in account).

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

Maximum number of pages that can be processed at the same time.

## `minConcurrency` (type: `integer`):

Minimum number of pages that will be processed at the same time.

## `maxRequestRetries` (type: `integer`):

Number of times the crawler will retry a failed request before giving up.

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

Maximum number of tweets/profiles to scrape across all start URLs.

## `includeRawData` (type: `boolean`):

When enabled, each record also includes the full raw X GraphQL object under `otherData`. Off by default for clean, compact output.

## `proxy` (type: `object`):

Specifies proxy servers that will be used by the scraper in order to hide its origin.<br><br>For details, see <a href='https://apify.com/apify/web-scraper#proxy-configuration' target='_blank' rel='noopener'>Proxy configuration</a> in README.

## Actor input object example

```json
{
  "startUrls": [
    "https://x.com/nasa",
    "https://x.com/Twitter/status/20"
  ],
  "maxConcurrency": 10,
  "minConcurrency": 1,
  "maxRequestRetries": 100,
  "maxItems": 1000,
  "includeRawData": false,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "startUrls": [
        "https://x.com/nasa",
        "https://x.com/Twitter/status/20"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/twitter-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 = {
    "startUrls": [
        "https://x.com/nasa",
        "https://x.com/Twitter/status/20",
    ],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/twitter-x-scraper").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 '{
  "startUrls": [
    "https://x.com/nasa",
    "https://x.com/Twitter/status/20"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call memo23/twitter-x-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter (X) Profile & Tweets Scraper",
        "description": "Scrape Twitter (X) profiles and individual tweets — no login, no API key. Get clean, structured data: full text, likes, retweets, replies, views, author profile, follower counts, media and entities. Mix profile URLs and tweet links in one run. Export to JSON, CSV, Excel or API",
        "version": "0.0",
        "x-build-id": "2EtQx0S62QGaNY2I4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/memo23~twitter-x-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-memo23-twitter-x-scraper",
                "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/memo23~twitter-x-scraper/runs": {
            "post": {
                "operationId": "runs-sync-memo23-twitter-x-scraper",
                "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/memo23~twitter-x-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-memo23-twitter-x-scraper",
                "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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "X profile URLs or bare handles (e.g. `https://x.com/nasa` or `nasa`), and/or individual tweet URLs (e.g. `https://x.com/Twitter/status/20`). You can mix profiles and tweets in one run. Keyword search and follower lists are not supported (they need a logged-in account).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "type": "integer",
                        "description": "Maximum number of pages that can be processed at the same time.",
                        "default": 10
                    },
                    "minConcurrency": {
                        "title": "Min Concurrency",
                        "type": "integer",
                        "description": "Minimum number of pages that will be processed at the same time.",
                        "default": 1
                    },
                    "maxRequestRetries": {
                        "title": "Max Request Retries",
                        "type": "integer",
                        "description": "Number of times the crawler will retry a failed request before giving up.",
                        "default": 100
                    },
                    "maxItems": {
                        "title": "Max items",
                        "type": "integer",
                        "description": "Maximum number of tweets/profiles to scrape across all start URLs.",
                        "default": 1000
                    },
                    "includeRawData": {
                        "title": "Include raw data",
                        "type": "boolean",
                        "description": "When enabled, each record also includes the full raw X GraphQL object under `otherData`. Off by default for clean, compact output.",
                        "default": false
                    },
                    "proxy": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Specifies proxy servers that will be used by the scraper in order to hide its origin.<br><br>For details, see <a href='https://apify.com/apify/web-scraper#proxy-configuration' target='_blank' rel='noopener'>Proxy configuration</a> in README.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
