# X (Twitter) Tweet Scraper by URL - No Login (`scrapewise/x-tweet-scraper`) Actor

Turn a list of X/Twitter post URLs into rows: full text, date, likes, replies, hashtags, mentions, links, photos, MP4 video link, quoted post and author. No account, no cookies, no browser. Deleted or private posts come back as free error rows.

- **URL**: https://apify.com/scrapewise/x-tweet-scraper.md
- **Developed by:** [Scrapewise Data](https://apify.com/scrapewise) (community)
- **Categories:** Social media, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 tweet delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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) Tweet Scraper by URL, without login

Give it a list of X/Twitter post URLs and get a clean table back: the full text, the date, the
numbers, the media and the author. **No account, no cookies, no browser** — it reads the same
public endpoint that renders an embedded post on any website.

| Field | What it holds |
|---|---|
| `text`, `createdAt`, `lang`, `isEdited` | the post itself, dates in ISO 8601 (UTC) |
| `likeCount`, `replyCount` | likes and how many replies the thread has |
| `hashtags`, `mentions`, `links` | parsed out, with links already expanded past `t.co` |
| `mediaType`, `mediaCount`, `mediaUrls`, `videoUrl`, `videoDurationMs`, `altText` | photos, the direct MP4 for videos, and the accessibility text |
| `quotedTweetId`, `quotedTweetText`, `quotedTweetAuthor`, `inReplyToUser` | the quoted post and who is being replied to |
| `authorHandle`, `authorName`, `authorUrl`, `authorAvatarUrl`, `authorVerified`, `authorVerifiedType` | who posted it |

### Good to know before you run it

**What it does:** any public post, by URL or by bare id. `x.com` and `twitter.com` both work,
query strings are ignored, and duplicates are removed before charging. Old posts work too — the
first tweet ever, id `20`, comes back complete.

**What it does not do, on purpose:** search, profile timelines, followers and the list of
replies. Those need a logged-in account, and this Actor does not log in. If you need those, this
is not the tool.

### Errors, all free

| errorCode | Meaning |
|---|---|
| `TWEET_NOT_FOUND` | Deleted, private, age-restricted or never existed |
| `INVALID_URL` | The line is not an X/Twitter status URL or id |
| `BLOCKED` | X refused every retry for that post. Run again, or turn the proxy on. |
| `ITEM_UNREADABLE` | One post came in a shape this Actor cannot read; only that post is lost |
| `UNEXPECTED` | Something unforeseen broke on that post; the rest of the run still delivers |

### Pricing

**US$ 2.00 per 1,000 posts**, pay per event: no monthly fee, no charge per run, and error rows
are free. One thousand URLs cost US$ 2.00; a hundred cost US$ 0.20.

### FAQ

**Does it need my X account?** No. It reads the public embed endpoint, the same one that renders
a post card on any website. No login, no cookies, no browser.

**Can it search X or read a profile timeline?** No, and that is deliberate: search, timelines,
followers and reply lists require a logged-in account. This Actor takes post URLs you already
have and turns them into structured rows.

**Do deleted or private posts cost anything?** No. They come back as `TWEET_NOT_FOUND` rows,
free, so a list with dead links never inflates your bill.

**Does it work with old posts and with twitter.com links?** Yes. The first tweet ever (id `20`,
from 2006) comes back complete, and `twitter.com`, `x.com`, query strings and bare ids all work.

**What about videos?** You get the direct MP4 of the highest bitrate variant in `videoUrl`, plus
the duration, and photos in `mediaUrls`.

### Notes

- Proxy is **off by default**, because this endpoint rarely blocks. For lists in the thousands,
  turn it on to spread the requests over more IPs.
- Only what X publishes in a public embed card comes out: text, numbers, media and the author's
  public profile. No e-mail, no phone, nothing behind a login.

# Actor input Schema

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

One per line. Accepts x.com and twitter.com status URLs, with or without query string, and bare numeric ids. Duplicates are removed before charging.

## `lang` (type: `string`):

Two-letter code used by X for the labels it returns (en, pt, es, ja). The post text always comes as it was written.

## `proxyConfiguration` (type: `object`):

Off by default: this endpoint is the public embed API and rarely blocks. Turn it on for large lists to spread the requests over more IPs.

## Actor input object example

```json
{
  "tweetUrls": [
    "https://x.com/jack/status/20"
  ],
  "lang": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsCsv` (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 = {
    "tweetUrls": [
        "https://x.com/jack/status/20"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/x-tweet-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 '{
  "tweetUrls": [
    "https://x.com/jack/status/20"
  ]
}' |
apify call scrapewise/x-tweet-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapewise/x-tweet-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/DRkMBJcI1JWW7SRDA/builds/I4hcKsE8KnC9EDqAJ/openapi.json
