# Twitter Scraper - X Profile and Tweets, All in One (`goat255/twitter-scraper-goat`) Actor

All-in-one Twitter scraper for X: one run returns profile metadata, recent tweets, media URLs and engagement counts for every handle, with no API key and no login. Use it for lead lists, competitor and audience research, or social monitoring. Clean structured output, ready for Sheets or a CRM.

- **URL**: https://apify.com/goat255/twitter-scraper-goat.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** Social media, Lead generation, News
- **Stats:** 12 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $5.00 / 1,000 profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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 Scraper - X Profile and Tweets, All in One

The **all-in-one Twitter scraper** for X. 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": "exampleco",
  "profile": {
    "id": "44196397",
    "username": "exampleco",
    "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/exampleco/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/%7BDATASET_ID%7D/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": ["exampleco", "acmecompany"],
    "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.

### Privacy

To improve our actors we collect anonymized usage telemetry (run stats and input patterns). No personal account data is collected.

# Actor input Schema

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

Handles to scrape (with or without @). Example: exampleco, @acmecompany, acmecorp.

## `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": [
    "exampleco",
    "acmecompany",
    "acmecorp"
  ],
  "maxTweetsPerUser": 20,
  "concurrency": 5,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `tweets` (type: `string`):

No description

# 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": [
        "exampleco",
        "acmecompany",
        "acmecorp"
    ],
    "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": [
        "exampleco",
        "acmecompany",
        "acmecorp",
    ],
    "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(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 '{
  "usernames": [
    "exampleco",
    "acmecompany",
    "acmecorp"
  ],
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call goat255/twitter-scraper-goat --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goat255/twitter-scraper-goat"
        }
    }
}

```

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/EhfXFPXLPgt2tvAIz/builds/9kaNSpCdw1Vp3ej5I/openapi.json
