# Twitter / X Scraper Goat (`goat255/twitter-scraper-goat`) Actor

All-in-one Twitter/X scraper. One run gives you profile metadata, recent tweets, media URLs, and engagement counts for every handle. No API key, no login.

- **URL**: https://apify.com/goat255/twitter-scraper-goat.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Goat - Profile + Tweets + Media in One Run

The **all-in-one Twitter / X scraper**. Pass a list of usernames; get one clean record per user containing full profile metadata, recent tweets, media URLs, and engagement counts. No Twitter / X API key, no login, no per-run start fee. Built for spreadsheets, CRMs, dashboards, and AI / NLP pipelines.

### What this Twitter scraper does

For each username, the actor returns one normalised record containing the full profile object plus recent tweets with media and engagement counts. All records share a single ordered schema.

Perfect for **lead generation, audience research, influencer outreach, content / sentiment pipelines, brand monitoring, archive projects, and competitor analysis**.

### Why use this all-in-one Twitter scraper

- **One actor, one run, one record per user** with both profile + tweets.
- **No Twitter / X API key required.**
- **No login.** Public profiles only.
- **Multi-tier resilient fetch** so a single upstream blip never breaks your run.
- **Media URLs included** for every tweet that has media (photos, video, animated GIF).
- **Exact engagement counts** - likes, retweets, replies, quotes, views.
- **Residential proxy rotation built in.**

### What data you get per user

```json
{
  "ok": true,
  "username": "elonmusk",
  "profile": {
    "id": "44196397",
    "username": "elonmusk",
    "name": "Example User",
    "description": "Example bio text",
    "location": "Austin, Texas",
    "url": "https://example.com",
    "created_at": "2009-06-02T20:12:29.000Z",
    "verified": true,
    "verified_type": "business",
    "protected": false,
    "profile_image_url": "https://pbs.twimg.com/profile_images/.../avatar.jpg",
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/.../1500x500",
    "metrics": {
      "followers": 240100000,
      "following": 1348,
      "tweets": 103545,
      "listed": 145000,
      "likes": 231653,
      "media": 4517
    }
  },
  "tweets": [
    {
      "id": "2061625841298317639",
      "url": "https://twitter.com/elonmusk/status/2061625841298317639",
      "text": "Outrageous double-standard!",
      "created_at": "2026-06-02T01:47:00.000Z",
      "lang": "en",
      "is_reply": false,
      "is_retweet": false,
      "metrics": { "likes": 130300, "retweets": 15800, "replies": 3100, "quotes": 0, "views": 6300000 },
      "media": [{ "type": "photo", "url": "https://pbs.twimg.com/media/HJwx5MvW0AASf35.jpg", "preview_url": "...", "alt": null }]
    }
  ],
  "scrapedAt": "2026-06-02T11:30:00.000Z"
}
````

### How to use the Twitter Scraper

1. Click **Try for free** on the actor page.
2. Enter the **usernames** to scrape.
3. Set **Max tweets per user** (default 20). Set to 0 if you only want the profile.
4. Click **Save & Start**. Download in JSON, CSV, Excel, XML, or HTML.

### Top use cases

- **Lead generation + content audit in one pass** - enrich a list of handles with bios, follower counts, and last 20 tweets.
- **Influencer outreach** - filter by follower count + post recency for outreach lists.
- **Sentiment / brand monitoring** - feed downstream NLP with both profile and tweets per account.
- **Competitor analysis** - track what your competitors are saying alongside their audience size.
- **CRM enrichment** - one row per contact handle with Twitter footprint.
- **AI / NLP training data** - clean structured input for fine-tuning or classification.

### Pricing

Pay-per-event. **No per-run start fee.** Failed lookups are never billed.

| Event | Price |
|---|---|
| Per profile returned | $0.005 |
| Per tweet returned | $0.001 |

Example: 50 handles with 20 tweets each = $0.005 × 50 + $0.001 × 1000 = $1.25. Apify's $5 platform free credit applies on first use.

### Integrations

#### Apify API

```bash
curl "https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=json"
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("goat255/twitter-scraper-goat").call(run_input={
    "usernames": ["NASA", "OpenAI"],
    "maxTweetsPerUser": 20,
})
for r in client.dataset(run["defaultDatasetId"]).iterate_items():
    p = r["profile"]
    print(f"@{p['username']:15}  {p['metrics']['followers']:>12,}  tweets={len(r['tweets'])}")
```

#### JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('goat255/twitter-scraper-goat').call({
    usernames: ['jack'],
    maxTweetsPerUser: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(r => console.log(`@${r.username}: ${r.profile.metrics.followers} followers, ${r.tweets.length} tweets`));
```

#### No-code

Send results to Google Sheets, Slack, Zapier, Make, Amazon S3, HubSpot, or any webhook via [Apify Integrations](https://docs.apify.com/platform/integrations).

### FAQ

#### Do I need a Twitter / X API key?

No. Public profiles only, no developer account required.

#### Why use this instead of the separate profile and tweet actors?

This actor is the right choice when you need both in one place per handle - one Apify run, one dataset row per account, paired profile + tweets. If you only need one or the other, the dedicated **Twitter / X Profile Scraper** or **Twitter / X Tweet Scraper** are cheaper per result.

#### What if a profile is private or suspended?

The actor returns `ok: false` with an `error` field. You are not billed for failed lookups.

#### Are the follower counts exact?

Yes - exact integer follower / following / tweet / listed / favourites / media counts.

#### Can I export to CSV / Google Sheets / Excel?

Yes - JSON / CSV / Excel / XML / HTML all supported, plus native integrations.

### Related Apify actors

- 👤 [Twitter / X Profile Scraper](https://apify.com/goat255/twitter-profile-scraper) - profile metadata only, cheaper per result.
- 📝 [Twitter / X Tweet Scraper](https://apify.com/goat255/twitter-tweet-scraper) - tweets only, by handle or URL.
- 🧵 [Threads Scraper](https://apify.com/goat255/threads-scraper-goat) - Meta Threads all-in-one.
- 📷 [Instagram Profile Scraper](https://apify.com/goat255/instagram-profile-scraper) - Instagram profiles with public emails.

### Support

Found a missing field or a bug? Open an issue on the actor page. Reviews are read and replied to.

# Actor input Schema

## `usernames` (type: `array`):

Handles to scrape (with or without @). Example: NASA, @OpenAI, elonmusk.

## `maxTweetsPerUser` (type: `integer`):

Cap on tweets returned per handle. Up to 5000. The most recent ~80-100 come from the timeline endpoint; anything beyond is walked via search and goes back as far as the handle's history allows.

## `concurrency` (type: `integer`):

How many handles to scrape in parallel. Default 5. Higher = faster but more proxy load.

## `proxyConfig` (type: `object`):

Apify proxy. RESIDENTIAL is the default and recommended option for the most reliable results.

## Actor input object example

```json
{
  "usernames": [
    "NASA",
    "OpenAI",
    "elonmusk"
  ],
  "maxTweetsPerUser": 20,
  "concurrency": 5,
  "proxyConfig": {
    "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 = {
    "usernames": [
        "NASA",
        "OpenAI",
        "elonmusk"
    ],
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("goat255/twitter-scraper-goat").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 = {
    "usernames": [
        "NASA",
        "OpenAI",
        "elonmusk",
    ],
    "proxyConfig": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter / X Scraper Goat",
        "description": "All-in-one Twitter/X scraper. One run gives you profile metadata, recent tweets, media URLs, and engagement counts for every handle. No API key, no login.",
        "version": "0.1",
        "x-build-id": "MSItauTCyjq80V1n9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/goat255~twitter-scraper-goat/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-goat255-twitter-scraper-goat",
                "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/goat255~twitter-scraper-goat/runs": {
            "post": {
                "operationId": "runs-sync-goat255-twitter-scraper-goat",
                "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/goat255~twitter-scraper-goat/run-sync": {
            "post": {
                "operationId": "run-sync-goat255-twitter-scraper-goat",
                "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": [
                    "usernames"
                ],
                "properties": {
                    "usernames": {
                        "title": "Twitter / X Usernames",
                        "type": "array",
                        "description": "Handles to scrape (with or without @). Example: NASA, @OpenAI, elonmusk.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxTweetsPerUser": {
                        "title": "Max tweets per user",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Cap on tweets returned per handle. Up to 5000. The most recent ~80-100 come from the timeline endpoint; anything beyond is walked via search and goes back as far as the handle's history allows.",
                        "default": 20
                    },
                    "concurrency": {
                        "title": "Concurrency",
                        "minimum": 1,
                        "maximum": 25,
                        "type": "integer",
                        "description": "How many handles to scrape in parallel. Default 5. Higher = faster but more proxy load.",
                        "default": 5
                    },
                    "proxyConfig": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy. RESIDENTIAL is the default and recommended option for the most reliable results.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
