# X (Twitter) Post Scraper - No Login, By URL (`benthepythondev/x-post-scraper`) Actor

Scrape X (Twitter) posts by link or id without login, cookies or API key: full text, exact date, likes, reposts, replies, quotes, bookmarks, views, hashtags, mentions, links, photos and video files, quote and repost ids, and the author with followers. JSON/CSV.

- **URL**: https://apify.com/benthepythondev/x-post-scraper.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Social media, Marketing, AI
- **Stats:** 4 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## 🐦 X (Twitter) Post Scraper (No Login, By URL)

Give X post links or ids and get one clean row per post: full text, exact date, likes, reposts, replies, quotes, bookmarks, views, hashtags, mentions, links, photos and video files with alt text, quote and repost ids, and the author with follower count. No X account, no cookies, no X API key. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

**What a run costs:** $0.0003 per saved post on the Free plan, $0.00028 on Bronze, $0.00027 on Silver and $0.00025 from Gold up, plus $0.00005 per run start. Deleted or protected posts and entries that are no post link are not charged.

### 🔎 What is the X Post Scraper?

It asks X for each post the way a logged-out visitor's browser does and turns the answer into a flat row. It is made for lists of post links: monitoring the numbers of known posts, archiving them, or enriching links you collected elsewhere.

#### What data does it extract?

- **Post:** `id`, `url`, `text`, `lang`, `createdAt` (exact), `editedVersions`, `possiblySensitive`
- **Engagement:** `likeCount`, `retweetCount`, `replyCount`, `quoteCount`, `bookmarkCount`, `viewCount`
- **Entities:** `hashtags[]`, `mentions[]`, `urls[]` (expanded)
- **Media:** `media[]` with `type` (photo, video, animated_gif), `url`, `videoUrl` (best mp4), `altText`
- **Context:** `isQuote`, `quotedPostId`, `isRepost`, `repostedPostId`
- **Author:** `author.id`, `author.userName`, `author.name`, `author.followers`, `author.isBlueVerified`, `author.profilePicture`

### ⬇️ Input

| Field | Type | Description |
|---|---|---|
| `postUrls` | array | Post links (`https://x.com/<name>/status/<id>`, twitter.com and mobile links too) or bare post ids |
| `maxItems` | integer | Stop after this many posts (default 1000) |

`tweetUrls`, `tweetIds`, `urls` and `startUrls` are accepted too.

#### Example input

```json
{
  "postUrls": [
    "https://x.com/NASA/status/2109320622882873464",
    "https://twitter.com/jack/status/20",
    "2108826911359050211"
  ]
}
```

### ⬆️ Output

One row per post (shortened):

```json
{
  "type": "tweet",
  "id": "2108826911359050211",
  "url": "https://x.com/SpaceX/status/2108826911359050211",
  "text": "Falcon 9’s first stage lands on LZ-4 https://t.co/GfEeoDu420",
  "createdAt": "2026-10-10T07:48:10Z",
  "likeCount": 7822,
  "retweetCount": 844,
  "replyCount": 330,
  "viewCount": 1206857,
  "media": [
    { "type": "video", "url": "https://pbs.twimg.com/amplify_video_thumb/2108826821856796672/img/BeJR6eKEyYHUBZQT.jpg", "videoUrl": "https://video.twimg.com/amplify_video/2108826821856796672/vid/avc1/3840x2160/k6oVunptGMemySN5.mp4?tag=29" }
  ],
  "isQuote": false,
  "author": { "userName": "SpaceX", "name": "SpaceX", "followers": 41906532, "isBlueVerified": true }
}
```

Field names follow the most used X post Actors (`text`, `createdAt`, `likeCount`, `retweetCount`, `replyCount`, `quoteCount`, `bookmarkCount`, `viewCount`, `author.userName`), so you can switch without rewriting your code.

### 💡 Use cases

- 📊 **Campaign tracking:** run it on a schedule over your campaign's posts and chart views and likes.
- 🗄️ **Archiving:** keep the text, date and media links of posts you reference.
- 🔗 **Enrichment:** turn a list of post links from a spreadsheet into full rows.
- 🎥 **Media collection:** the best mp4 file of every video post.

### 🤖 For AI agents

```json
{ "postUrls": ["https://x.com/NASA/status/2109320622882873464"] }
```

One input field, no credentials.

### 📏 Limits

- **By link only:** X's search and timelines need a login. To get a profile's latest posts, use the [X Profile Scraper](https://apify.com/benthepythondev/x-profile-scraper).
- **No reply threads:** the replies under a post need a login; `replyCount` is the exact number.
- **Deleted, protected or withheld posts** are listed in the key-value record `NOT_SAVED` and not charged.

### ❓ FAQ

**Do I need an X account, cookies or an X API key?** No.

**Are view counts included?** Yes, as X reports them (`viewCount`).

**Which links work?** `x.com`, `twitter.com`, `mobile.twitter.com` status links, `…/statuses/…` links and bare ids, also the very first posts with short ids.

**Is it legal?** It reads what X shows every visitor, without logging in. Respect X's terms and data protection law in how you use the data.

### 🔗 You might also like

- [X (Twitter) Profile Scraper](https://apify.com/benthepythondev/x-profile-scraper)
- [Threads Scraper](https://apify.com/benthepythondev/threads-public-scraper)
- [Reddit Scraper](https://apify.com/benthepythondev/reddit-scraper)

**Keywords:** X post scraper, tweet scraper, Twitter scraper no login, tweet by URL, X scraper no API key, tweet views, tweet likes, Twitter video downloader link, tweet to JSON, Twitter data export, X post metrics, tweet archive

# Actor input Schema

## `postUrls` (type: `array`):

X post links (https://x.com/<name>/status/<id>, twitter.com and mobile links work too) or bare post ids. One row per post.

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

Stops after this many posts. Only saved posts are charged.

## Actor input object example

```json
{
  "postUrls": [
    "https://x.com/NASA/status/2109320622882873464",
    "20"
  ],
  "maxItems": 1000
}
```

# Actor output Schema

## `results` (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 = {
    "postUrls": [
        "https://x.com/NASA/status/2109320622882873464",
        "20"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/x-post-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 = { "postUrls": [
        "https://x.com/NASA/status/2109320622882873464",
        "20",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/x-post-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "postUrls": [
    "https://x.com/NASA/status/2109320622882873464",
    "20"
  ]
}' |
apify call benthepythondev/x-post-scraper --silent --output-dataset

```

## MCP server setup

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

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sZXWX26WdJb4cg9nQ/builds/iNDxzsrSTR6NQGXLv/openapi.json
