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

Bulk Twitter/X tweet extraction by username, tweet URL, or tweet ID. Text, media, engagement, language, reply / retweet flags. No API key, no login.

- **URL**: https://apify.com/goat255/twitter-tweet-scraper.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 93.3% 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 Tweet Scraper Goat - Bulk Tweet Extraction by Handle or URL

Bulk-scrape **tweets from Twitter / X** by username, tweet URL, or tweet ID. For every tweet you get a clean ordered row: text, engagement (likes / retweets / replies / quotes / views), media URLs, language, reply / retweet flags, timestamp. No API key, no login, no per-run start fee.

### What this Twitter tweet scraper does

For each handle, tweet URL, or tweet ID you provide, the actor returns one normalised tweet row containing text, engagement, media URLs, language, reply / retweet flags, and timestamp. All records share a single ordered schema.

Perfect for **content research, sentiment analysis, trend tracking, social-listening pipelines, brand-mention monitoring, and bulk archiving**.

### Why use this Twitter tweet scraper

- **No Twitter / X API key required.**
- **No login.** Public tweets only.
- **Two modes in one actor** - timeline-by-username AND single-tweet-by-URL.
- **Media URLs included** - photos, videos (highest-bitrate), animated GIFs.
- **Engagement counts** - likes, retweets, replies, quotes, views per tweet.
- **Residential proxy rotation** for reliable runs at scale.

### What data you get per tweet

```json
{
  "ok": true,
  "username": "elonmusk",
  "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": "https://pbs.twimg.com/media/HJwx5MvW0AASf35.jpg",
      "alt": null
    }
  ]
}
````

### How to use the Twitter Tweet Scraper

1. Click **Try for free** on the actor page.
2. Either enter **usernames** for timeline mode, or paste **tweet URLs / IDs** for single-tweet mode (or both).
3. Set **Max tweets per user** (default 20).
4. Click **Save & Start**. Download in JSON, CSV, Excel, XML, or HTML.

### Top use cases

- **Sentiment / brand monitoring** - pull a competitor's last 100 tweets for tone analysis.
- **Trend tracking** - archive trending-hashtag tweets for downstream NLP.
- **Content research** - find top-performing tweet formats from a list of creators.
- **Archive specific tweets** - export by URL list for legal / journalism / research.
- **Engagement benchmarking** - rank a list of accounts by median tweet performance.
- **Media bulk download** - pipe `media[].url` into your download tool.

### Pricing

Pay-per-result. No subscription and **no per-run start fee**. Failed lookups are never billed.

| What you pay for | Price |
|---|---|
| Per tweet returned | $0.002 |

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-tweet-scraper").call(run_input={
    "usernames": ["NASA"],
    "maxTweetsPerUser": 50,
})
for tw in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{tw.get('created_at','')[:10]}  ❤ {tw['metrics']['likes']:>7,}  {tw['text'][:80]}")
```

#### JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('goat255/twitter-tweet-scraper').call({
    tweetUrls: ['https://twitter.com/jack/status/20'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(t => console.log(t.text));
```

#### 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 tweets only, no developer account required.

#### How many tweets per handle?

Up to about 100 per handle per run, subject to availability.

#### Can I scrape replies / threads?

Threads (multi-tweet conversations) are surfaced via the parent tweet; pass each reply URL explicitly to fetch the reply tree.

#### What about protected / private accounts?

Not supported - public accounts only.

#### 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.
- 🐦 [Twitter / X Scraper](https://apify.com/goat255/twitter-scraper-goat) - profile + tweets in one run.
- 📷 [Instagram Posts Scraper](https://apify.com/goat255/instagram-posts-scraper) - bulk Instagram posts.
- 🧵 [Threads Post Scraper](https://apify.com/goat255/threads-post-scraper) - Meta Threads posts.

### Support

Open an issue on the actor page if a field is missing or a handle stops working. Reviews are read and replied to.

# Actor input Schema

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

Handles to pull recent tweets from. Example: NASA, @OpenAI.

## `tweetUrls` (type: `array`):

Specific tweet links or numeric IDs to fetch. Either form works: https://twitter.com/elonmusk/status/1234567890 or 1234567890.

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

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

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter / X Tweet Scraper Goat",
        "description": "Bulk Twitter/X tweet extraction by username, tweet URL, or tweet ID. Text, media, engagement, language, reply / retweet flags. No API key, no login.",
        "version": "0.1",
        "x-build-id": "EX382EfK5cxD4NwUd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/goat255~twitter-tweet-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-goat255-twitter-tweet-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/goat255~twitter-tweet-scraper/runs": {
            "post": {
                "operationId": "runs-sync-goat255-twitter-tweet-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/goat255~twitter-tweet-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-goat255-twitter-tweet-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",
                "properties": {
                    "usernames": {
                        "title": "Usernames (timeline mode)",
                        "type": "array",
                        "description": "Handles to pull recent tweets from. Example: NASA, @OpenAI.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "tweetUrls": {
                        "title": "Tweet URLs or IDs (single-tweet mode)",
                        "type": "array",
                        "description": "Specific tweet links or numeric IDs to fetch. Either form works: https://twitter.com/elonmusk/status/1234567890 or 1234567890.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxTweetsPerUser": {
                        "title": "Max tweets per user",
                        "minimum": 1,
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
