# Twitter (X) Profiles and Tweets Scraper (`memo23/apify-twitter-profile-scraper`) Actor

This actor allows you to scrape Twitter/X profiles, extract tweets, key metrics, metadata and gather insights such as tweet content, engagement metrics (likes, retweets, replies), and author details. It is handy for social media analysis, marketing research, and tracking public figures or brands.

- **URL**: https://apify.com/memo23/apify-twitter-profile-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Lead generation, Social media
- **Stats:** 839 total users, 5 monthly users, 100.0% runs succeeded, 19 bookmarks
- **User rating**: 4.00 out of 5 stars

## Pricing

$15.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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`):

URLs to start with. Example: `https://twitter.com/elonmusk`.

## `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": [
    "elonmusk"
  ],
  "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": [
        "elonmusk"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/apify-twitter-profile-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": ["elonmusk"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/bguBrLpuaxHSyrr52/builds/oHkwug5IYIrEMHcFB/openapi.json
