# 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
- **Features:** Limited permissions
- **Stats:** 898 total users, 13 monthly users, 100.0% runs succeeded, 19 bookmarks
- **User rating**: 4.00 out of 5 stars

## Pricing

from $0.20 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twitter / 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 data, 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 complete raw record too? Flip on **Include raw data** and
each record carries the full original data 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. It defaults to 100 and is a hard stop, so raise it for deeper history.
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 | Hard cap on rows written across all start URLs. Default 100. Billing is per row, so this is your cost ceiling for the run. |
| **Include raw data** | boolean | Add the complete raw record 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 reads public data only. 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.

**What happens when a request fails?**
It retries automatically, so a temporary error never costs you a row.

**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`):

How many times a blocked page is tried again before that page is skipped. Capped at 5, because a long retry loop fills the run timeout and the run is killed before saved tweets are kept.

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

Hard cap on how many rows the run writes to the dataset, across all start URLs. The scraper pages through each profile's timeline until this many rows exist or the timeline runs out, so a run can stop well below the cap on accounts with few tweets. Billing is per dataset item, so this is also your cost ceiling for the run. Raise it for deeper history.

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

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

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

Residential proxies recommended. The default works out of the box.

## Actor input object example

```json
{
  "startUrls": [
    "elonmusk"
  ],
  "maxConcurrency": 10,
  "minConcurrency": 1,
  "maxRequestRetries": 5,
  "maxItems": 100,
  "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(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 '{
  "startUrls": [
    "elonmusk"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call memo23/apify-twitter-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/apify-twitter-profile-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/bguBrLpuaxHSyrr52/builds/0IOjRVougeIXyNh3N/openapi.json
