# X (Twitter) Tweet Scraper (`futurizerush/x-tweet-scraper`) Actor

Scrape the most recent 20–100 tweets from any public X (Twitter) account. Includes full author bio (location, account age, total tweets) — extra context that bigger scrapers skip. Pay-per-tweet, no subscription. Clean JSON, ISO timestamps.

- **URL**: https://apify.com/futurizerush/x-tweet-scraper.md
- **Developed by:** [Rush](https://apify.com/futurizerush) (community)
- **Categories:** AI, Agents, Social media
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## 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

## 📊 X (Twitter) Tweet Scraper

> Scrape the most recent 20–100 tweets from any public X (Twitter) account. Includes **full author bio** — location, account age, total tweets, media count — extra context most scrapers skip. Pay-per-tweet billing, no subscription, no surprise bills.

### What you get

Type a username, pick a depth (20–100), get a snapshot. Each tweet ships with full engagement metrics, ISO-8601 timestamps, and structured author info. Pinned tweets are included on top when present. The output is drop-in ready for BigQuery, Google Sheets, Airtable, or your own pipeline.

Runs also produce an **OUTPUT** record with roll-up stats: total likes/retweets/views, the top-performing tweet, and the date range captured.

### Use cases

- **Brand & competitor monitoring** — track what a competitor, partner, or key voice is posting right now
- **Sentiment datasets** — feed fresh tweets straight into your LLM / classifier / BI tool
- **News & crisis aggregation** — pull the latest from verified government, press, or emergency accounts
- **Influencer vetting** — audit what a creator actually talks about before a partnership
- **Content calendar audit** — benchmark your own posting cadence and engagement

### Input

| Field | Example | Notes |
|---|---|---|
| `username` | `naval` | Public X handle. `@` optional. 1–15 characters, letters/digits/underscore only. |
| `maxTweets` | `"40"` | How many recent tweets to fetch. Pick from `"20", "40", "60", "80", "100"`. Default `"20"`. |

```json
{ "username": "naval", "maxTweets": "40" }
````

### Output

#### Dataset (one row per tweet)

```json
{
  "id": "2046153329106112951",
  "url": "https://x.com/MoNDefense/status/2046153329106112951",
  "text": "The #PLA Navy's Liaoning aircraft carrier (CV-16) transited the Taiwan Strait today…",
  "createdAt": "2026-04-20T09:05:44+00:00",
  "lang": "en",
  "source": "Twitter for iPhone",
  "likeCount": 345,
  "retweetCount": 106,
  "replyCount": 15,
  "quoteCount": 5,
  "viewCount": 27822,
  "bookmarkCount": 33,
  "isReply": false,
  "isPinned": false,
  "conversationId": "2046153329106112951",
  "inReplyToId": null,
  "author": {
    "userName": "MoNDefense",
    "name": "國防部 Ministry of National Defense, ROC(Taiwan) 🇹🇼",
    "id": "1247017297098575874",
    "isBlueVerified": true,
    "verifiedType": "Government",
    "followers": 234632,
    "following": 90,
    "profilePicture": "https://pbs.twimg.com/profile_images/…",
    "description": "Official account of the Ministry of National Defense, ROC (Taiwan)"
  },
  "scraped_at": "2026-04-24T14:25:01+00:00"
}
```

The dataset ships with **two views** in the Apify Console:

- **Summary** — 7 essential columns at a glance
- **Tweets (full)** — all 13 columns with complete engagement metrics

#### OUTPUT record (run summary)

```json
{
  "username": "MoNDefense",
  "count": 20,
  "pinnedCount": 0,
  "recentCount": 20,
  "pagesFetched": 1,
  "runtimeSeconds": 4.82,
  "profile": {
    "userName": "MoNDefense",
    "name": "國防部 Ministry of National Defense, ROC(Taiwan) 🇹🇼",
    "id": "1247017297098575874",
    "isBlueVerified": true,
    "verifiedType": "Government",
    "followers": 234632,
    "following": 90,
    "description": "Official account of the Ministry of National Defense, ROC (Taiwan)",
    "location": "Taipei City, Taiwan",
    "createdAt": "2020-04-06T03:42:11+00:00"
  },
  "summary": {
    "totalLikes": 148210,
    "totalRetweets": 12043,
    "totalViews": 5120998,
    "topTweet": {
      "id": "2046153329106112951",
      "likeCount": 28934,
      "url": "https://x.com/MoNDefense/status/2046153329106112951"
    },
    "dateRange": {
      "earliest": "2026-04-15T02:00:50+00:00",
      "latest": "2026-04-23T18:44:03+00:00"
    }
  }
}
```

### Pricing

Pay Per Event — no subscription, no surprise bills. Current rates are shown on the actor's Apify Store page, where they are kept up to date. Paid Apify subscribers receive a discounted rate.

If the username format is invalid (e.g. illegal characters), the run is rejected before it starts and nothing is charged. If the username is well-formed but the account doesn't exist, only the start event applies.

### FAQ

**Why did I get one extra tweet?** The account has a pinned tweet. It arrives first with `"isPinned": true`, followed by your `maxTweets` recents.

**I got "Account not accessible".** The account is probably private, suspended, or the spelling is off. Try the handle exactly as it appears in the URL bar on x.com.

**Can I grab more than 100 tweets?** Not with this actor — it's built for snapshots in the 20–100 range. A companion actor for full timelines is on the way.

**Why are the choices stepped at 20?** Tweets are delivered in batches of 20. Offering only batch-aligned sizes keeps your bill predictable — you always know exactly what each step costs.

**Does it include replies?** No, only originals and retweets on the account's main timeline. A replies-focused actor is on the roadmap.

**How fresh is the data?** Each run pulls the current state from the upstream source.

**Why are the timestamps in `+00:00` format instead of `Z`?** Both are valid ISO-8601 and every mainstream parser handles them identically.

### Disclaimer

This actor is an independent third-party tool with **no affiliation, endorsement, or partnership** with X Corp. or any related entity. The X logo, account names, profile pictures, and other trademarked brand marks remain the property of their respective owners. Users are responsible for ensuring their use case complies with applicable terms of service and data-protection regulations (GDPR, CCPA, etc.) before deploying commercially. Pay Per Event means you only pay for results actually returned — no warranty is offered on rate limits, data accuracy, or service availability.

Looking for other small, focused scrapers? See [more actors here](https://apify.com/futurizerush?fpr=rush).

***

*Tags: Twitter scraper, X scraper, Apify Actor, social media data, public profile data, JSON output, pay-per-result pricing, X (Twitter) account analytics, follower stats, account creation date, agent tools, Hermes agent, agentic workflow, AI agent data source, MCP server data, autonomous agent input. Compatible with Claude Code, OpenClaw, Gemini, Antigravity, Codex, ChatGPT for downstream LLM analysis.*

# Actor input Schema

## `username` (type: `string`):

Public handle of the account to scrape. With or without @ — both work. Try: `elonmusk`, `@naval`, `MoNDefense`, `paulg`, `sama`.

## `maxTweets` (type: `string`):

Choose how many recent tweets to fetch. Sized in batches of 20 for predictable billing.

## Actor input object example

```json
{
  "username": "MoNDefense",
  "maxTweets": "20"
}
```

# Actor output Schema

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

All scraped tweets (one row per tweet, including pinned).

## `summary` (type: `string`):

Roll-up: counts, totals, top tweet, account profile, runtime.

# 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 = {
    "username": "MoNDefense"
};

// Run the Actor and wait for it to finish
const run = await client.actor("futurizerush/x-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 = { "username": "MoNDefense" }

# Run the Actor and wait for it to finish
run = client.actor("futurizerush/x-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 '{
  "username": "MoNDefense"
}' |
apify call futurizerush/x-tweet-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X (Twitter) Tweet Scraper",
        "description": "Scrape the most recent 20–100 tweets from any public X (Twitter) account. Includes full author bio (location, account age, total tweets) — extra context that bigger scrapers skip. Pay-per-tweet, no subscription. Clean JSON, ISO timestamps.",
        "version": "0.0",
        "x-build-id": "j0gUfaIV1t2Cbp1jQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/futurizerush~x-tweet-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-futurizerush-x-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/futurizerush~x-tweet-scraper/runs": {
            "post": {
                "operationId": "runs-sync-futurizerush-x-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/futurizerush~x-tweet-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-futurizerush-x-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",
                "required": [
                    "username"
                ],
                "properties": {
                    "username": {
                        "title": "🎯 X username",
                        "pattern": "^@?[A-Za-z0-9_]{1,15}$",
                        "type": "string",
                        "description": "Public handle of the account to scrape. With or without @ — both work. Try: `elonmusk`, `@naval`, `MoNDefense`, `paulg`, `sama`."
                    },
                    "maxTweets": {
                        "title": "📦 How many tweets",
                        "enum": [
                            "20",
                            "40",
                            "60",
                            "80",
                            "100"
                        ],
                        "type": "string",
                        "description": "Choose how many recent tweets to fetch. Sized in batches of 20 for predictable billing.",
                        "default": "20"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
