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

Get full data for any public X (Twitter) post from its URL or ID: text, author, likes, reposts, replies, quotes, bookmarks, views, media and language. No login, no cookies, no API key.

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

## Pricing

from $0.78 / 1,000 tweet scrapeds

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

## X (Twitter) Tweet Scraper by URL — get full post data from any link (No API Key, No Login)

<p align="center">
  <a href="https://apify.com/myagizm/x-tweet-scraper"><img src="https://img.shields.io/badge/Apify-Actor-00b96b?logo=apify&logoColor=white" alt="Apify Actor"></a>
  <img src="https://img.shields.io/badge/No%20API%20Key-required-blue" alt="No API Key required">
  <img src="https://img.shields.io/badge/No%20Login-needed-blue" alt="No Login needed">
  <img src="https://img.shields.io/badge/No%20Cookies-needed-blue" alt="No cookies needed">
  <img src="https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel%20%7C%20XML-orange" alt="Export formats">
  <img src="https://img.shields.io/badge/MCP-AI%20agents-8A2BE2" alt="MCP AI agents">
  <img src="https://img.shields.io/badge/Pricing-pay%20per%20result-success" alt="Pay per result">
</p>

**Paste X (Twitter) post URLs or IDs and get the full public data for each one** — no API key, no login, no cookies, no developer account. This tweet scraper returns 33 fields per post: full text, likes, reposts, replies, quotes, bookmarks, **views**, media with direct MP4 URLs, hashtags, mentions, expanded links, the posting client, pinned and edit state, link-preview cards, the quoted or reposted original as a nested object, and the complete author profile. Perfect for measuring specific posts, archiving them before deletion, or enriching a spreadsheet of tweet links. Export to JSON, CSV, Excel, or XML.

> **Get your first tweet free in under 2 minutes** — paste a link, click Start, read the data. No configuration, no credit card to try.

***

### Table of contents

- [What can the X Tweet Scraper do?](#what-can-the-x-tweet-scraper-do)
- [Who scrapes single tweets?](#who-scrapes-single-tweets)
- [What data can I scrape from a tweet URL?](#what-data-can-i-scrape-from-a-tweet-url)
- [How to scrape a tweet by URL](#how-to-scrape-a-tweet-by-url)
- [Input example](#input-example)
- [Output example](#output-example)
- [How accurate is the data?](#how-accurate-is-the-data)
- [How much will scraping tweets cost?](#how-much-will-scraping-tweets-cost)
- [Tips for scraping tweets by URL](#tips-for-scraping-tweets-by-url)
- [Want other X (Twitter) data?](#want-other-x-twitter-data)
- [Use tweet data with AI agents (MCP)](#use-tweet-data-with-ai-agents-mcp)
- [Integrations & API](#integrations--api)
- [Support](#support)
- [FAQ — scraping tweets by URL](#faq--scraping-tweets-by-url)
- [Related searches](#related-searches)
- [Disclaimer](#disclaimer)
- [Resources](#resources)

***

### What can the X Tweet Scraper do? {#what-can-the-x-tweet-scraper-do}

Give it links, get structured posts back. Use it to:

- 🔗 **Scrape any public post from its URL or numeric ID** — both formats accepted, mixed freely.
- 📊 **Get every public metric** — likes, reposts, replies, quotes, bookmarks, and **view counts**.
- 📝 **Read the full text** — long posts and Notes expanded, never truncated.
- 🖼️ **Pull media** — image URLs plus **direct MP4 video links** with duration.
- 🃏 **Capture the link preview card** — title, description, image, domain, destination URL.
- 🔁 **Expand quotes and reposts** — the original arrives as a full nested tweet object.
- 📱 **See the posting client** — `Twitter for iPhone`, `Typefully`, `Sprout Social`, and so on.
- ✏️ **Check edit state** — `isEdited` and `editsRemaining`.
- 👤 **Get the author profile** attached to every post — followers, bio, website, verified type.
- 🗂️ **Batch as many links as you like** in a single run.
- 📤 **Export** to JSON, CSV, Excel, or XML, or pull live through the API.

***

### Who scrapes single tweets? {#who-scrapes-single-tweets}

- 📢 **Paid social & ad teams** — measure the real performance of specific creatives.
- 🤝 **Influencer marketers** — verify the engagement an influencer claims on a specific post.
- 🗄️ **Archivists & researchers** — capture posts and their metrics before they are deleted.
- 📰 **Journalists** — cite exact text, timestamps, and numbers with a reproducible record.
- 📊 **Analysts** — turn a spreadsheet of tweet links into a metrics table in one run.
- 🎬 **Content teams** — extract media URLs from a shortlist of posts.

***

### What data can I scrape from a tweet URL? {#what-data-can-i-scrape-from-a-tweet-url}

Always populated:

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Tweet ID. |
| `url` | string | Direct link to the post. |
| `text` | string | Full post text, expanded. |
| `createdAt` | string | Post timestamp. |
| `likeCount` | number | Likes. |
| `retweetCount` | number | Reposts. |
| `replyCount` | number | Replies. |
| `quoteCount` | number | Quote posts. |
| `bookmarkCount` | number | Bookmarks. |
| `viewCount` | number | Views / impressions. |
| `lang` | string | Language code. |
| `conversationId` | string | Thread the post belongs to. |
| `source` | string | Posting client. |
| `isReply` / `isRetweet` / `isQuote` / `isPinned` | boolean | Post type flags. |
| `possiblySensitive` | boolean | Sensitive-media flag. |
| `isEdited` / `editsRemaining` | boolean / number | Edit state. |
| `author` | object | Full author profile (followers, following, bio, website, verified type, join date, avatar, banner). |

Populated when present:

| Field | Type | Description |
|-------|------|-------------|
| `media` | array | `type`, `image`, direct **MP4 `video`**, `durationMs`. |
| `hashtags` / `mentions` / `links` | array | Flat string arrays; links are expanded. |
| `card` | object | `name`, `url`, `title`, `description`, `image`, `domain`. |
| `quotedTweet` / `retweetOf` | object | The original post as a nested tweet object. |
| `inReplyToId` / `inReplyToUserId` / `replyToUsername` | string | Reply target. |
| `place` | object | Geotag details. |
| `article` | object | Long-form article title, preview text, cover image. |

***

### How to scrape a tweet by URL {#how-to-scrape-a-tweet-by-url}

1. **Open the X (Twitter) Tweet Scraper** on [Apify](https://apify.com/myagizm/x-tweet-scraper).
2. **Paste post URLs or IDs** into *Tweet URLs or IDs* — e.g. `https://x.com/NASA/status/2081860978694594863` or `20`.
3. Click **▶ Start**.
4. **Export** to JSON, CSV, Excel, or XML, or fetch through the API.

Deleted, suspended, or protected posts are reported as unavailable in the log; the rest of the batch still returns.

***

### Input example {#input-example}

```json
{
  "tweetIds": [
    "https://x.com/NASA/status/2081860978694594863",
    "https://twitter.com/jack/status/20",
    "20"
  ]
}
```

- **tweetIds** — post URLs (`x.com` or `twitter.com`) or bare numeric IDs. Mix freely, queue as many as you need.

***

### Output example {#output-example}

```json
{
  "id": "20",
  "url": "https://x.com/jack/status/20",
  "text": "just setting up my twttr",
  "createdAt": "Tue Mar 21 20:50:14 +0000 2006",
  "likeCount": 307402,
  "retweetCount": 111530,
  "replyCount": 17840,
  "quoteCount": 24610,
  "bookmarkCount": 8901,
  "viewCount": 44120987,
  "lang": "en",
  "conversationId": "20",
  "source": "Twitter Web Client",
  "isReply": false,
  "isRetweet": false,
  "isQuote": false,
  "isPinned": false,
  "possiblySensitive": false,
  "isEdited": false,
  "editsRemaining": null,
  "hashtags": [],
  "mentions": [],
  "links": [],
  "media": [],
  "card": null,
  "place": null,
  "article": null,
  "quotedTweet": null,
  "retweetOf": null,
  "author": {
    "id": "12",
    "username": "jack",
    "name": "jack",
    "followers": 6512340,
    "isVerified": true,
    "url": "https://x.com/jack"
  }
}
```

***

### How accurate is the data? {#how-accurate-is-the-data}

Metrics are read live at run time with no caching, so they match what a logged-out visitor sees. In a benchmark, 15 randomly sampled posts were cross-checked against a second independent X endpoint: **15 of 15 matched**, mean deviation **0.02%** — the only gap was a 40-minute-old post whose counter was still moving.

***

### How much will scraping tweets cost? {#how-much-will-scraping-tweets-cost}

**Pay-per-result**: you pay per post returned, not for compute time.

- 💸 **Pay per tweet** — budget is posts × rate.
- 📉 **Volume discounts** across Bronze → Diamond Apify plans.
- 🆓 **Free to try** with the monthly free usage on new Apify accounts.
- 🚫 **No proxy fees, no per-request charges, no minimums.**

Unavailable posts (deleted, suspended, protected) return no dataset item, so you are not billed for them. See the live rate on the [Apify store page](https://apify.com/myagizm/x-tweet-scraper).

***

### Tips for scraping tweets by URL {#tips-for-scraping-tweets-by-url}

- 🎬 **Download `media[].video` immediately** — X media URLs are signed and expire.
- 🃏 **Use `card.domain`** to attribute outbound traffic even behind `t.co`.
- 🧵 **Group by `conversationId`** to rebuild a thread from a list of links.
- 🗄️ **Snapshot on a schedule** if you are archiving — metrics keep changing after publication.
- 🔢 **Bare IDs are fine** — if your database stores IDs, you do not need to rebuild URLs.
- 🤖 **Feed `text` + `author` into an LLM** for one-shot post analysis.

***

### Want other X (Twitter) data? {#want-other-x-twitter-data}

- 🐦 **[X (Twitter) User Tweets Scraper](https://apify.com/myagizm/x-tweets-scraper)** — export the full public timeline of any account with metrics and media.
- 👤 **[X (Twitter) Profile Scraper](https://apify.com/myagizm/x-profile-scraper)** — followers, following, bio, website, verified badge and join date in bulk.
- 📈 **[X (Twitter) Trending Topics Scraper](https://apify.com/myagizm/x-trends-scraper)** — live trends for any country or city with tweet volume.

Building a multi-platform social dataset? The same pay-per-result, no-login approach covers the other networks too:

- 📸 **[Instagram Profile Scraper](https://apify.com/myagizm/instagram-profile-scraper-v2)** · **[Instagram Post Scraper](https://apify.com/myagizm/instagram-post-scraper-v2)** · **[Instagram Hashtag Scraper](https://apify.com/myagizm/instagram-hashtag-scraper-v2)** · **[Instagram Comment Scraper](https://apify.com/myagizm/instagram-comment-scraper-v2)**
- 🎵 **[TikTok Profile Scraper](https://apify.com/myagizm/tiktok-profile-scraper-v2)** · **[TikTok Video Scraper](https://apify.com/myagizm/tiktok-video-scraper-v2)** · **[TikTok Hashtag Scraper](https://apify.com/myagizm/tiktok-hashtag-scraper-v2)** · **[TikTok Comments Scraper](https://apify.com/myagizm/tiktok-comments-scraper-v2)**
- 👔 **[LinkedIn Profile Scraper](https://apify.com/myagizm/linkedin-profile-scraper)** · **[LinkedIn Company Scraper](https://apify.com/myagizm/linkedin-company-scraper)** · **[LinkedIn Jobs Scraper](https://apify.com/myagizm/linkedin-jobs-scraper)**
- 🤖 **[Reddit Scraper](https://apify.com/myagizm/reddit-scraper-v2)** · **[Reddit Search Scraper](https://apify.com/myagizm/reddit-search-scraper-v2)** · **[Reddit Subreddit Scraper](https://apify.com/myagizm/reddit-subreddit-scraper-v2)**
- ▶️ **[YouTube Channel Scraper](https://apify.com/myagizm/youtube-channel-scraper)** · **[YouTube Comment Scraper](https://apify.com/myagizm/youtube-comment-scraper)** · **[YouTube Transcript Scraper](https://apify.com/myagizm/youtube-transcript-scraper)**
- 🗺️ **[Google Maps Scraper](https://apify.com/myagizm/google-maps-scraper)** · **[Google News Scraper](https://apify.com/myagizm/google-news-scraper)**

Browse everything on the **[myagizm store profile](https://apify.com/myagizm)**.

***

### Use tweet data with AI agents (MCP) {#use-tweet-data-with-ai-agents-mcp}

The X (Twitter) Tweet Scraper is available through the **Apify MCP server**, so AI assistants can call it as a tool and pull post data on demand.

- 🧩 **Claude** — add the Apify MCP server and let Claude fetch and analyse post data.
- 🤖 **ChatGPT** — use the actor as a tool inside research and reporting workflows.
- 🖊️ **Cursor** — pull post data straight into your coding and prototyping sessions.

No glue code required: ask your agent in plain language and it runs the actor, reads the structured output, and answers.

Common AI-agent recipes:

- 📊 **Post autopsy** — "why did this post do well? show metrics, media type, and posting client."
- 🧵 **Thread rebuild** — "fetch these five links and put them in chronological order."
- 🗄️ **Archive & cite** — "capture this post's text, timestamp, and numbers for a citation."
- 🎯 **Creative comparison** — "compare view-to-like ratios across these ad posts."

***

### Integrations & API {#integrations--api}

Connect the actor to the tools you already use: **Make, Zapier, n8n, Slack, Airbyte, Gumloop, CrewAI, IFTTT, Lindy, GitHub, Google Sheets, and Google Drive** — plus webhooks, Apify Schedules, and the MCP server.

#### Run synchronously and get the dataset (Apify API)

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~x-tweet-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "tweetIds": ["https://x.com/jack/status/20"] }'
```

#### Start a run asynchronously

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~x-tweet-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "tweetIds": ["https://x.com/NASA/status/2081860978694594863", "20"] }'
```

#### Fetch dataset items later

```bash
curl "https://api.apify.com/v2/acts/myagizm~x-tweet-scraper/runs/last/dataset/items?token=YOUR_APIFY_TOKEN&format=csv"
```

Change `format` to `json`, `csv`, `xlsx`, or `xml` to export scraped data in your preferred format. The Apify Console also auto-generates ready-to-paste **JavaScript, Python, and CLI** snippets plus an **OpenAPI** spec for this actor.

***

### Support {#support}

Questions, feature requests, or something not looking right? Open an issue on the actor's **[Issues tab](https://apify.com/myagizm/x-tweet-scraper/issues)**. Please include the input you used so we can reproduce and fix it quickly.

***

### FAQ — scraping tweets by URL {#faq--scraping-tweets-by-url}

#### Is it legal to scrape tweets?

The actor reads only publicly visible posts — the same content any logged-out visitor sees. It never logs in and never accesses protected or deleted content. Compliant use is your responsibility; follow GDPR, CCPA, and X's terms.

#### Do I need an X API key, developer account, or login?

No. No API key, no OAuth, no X API tier, no login, no cookies.

#### Do URLs and numeric IDs both work?

Yes. `x.com` links, `twitter.com` links, and bare numeric IDs can be mixed in one run.

#### Does it include view counts?

Yes. `viewCount` is returned alongside likes, reposts, replies, quotes, and bookmarks.

#### Can I get the replies under a post?

No. Replies written by other users are not exposed to logged-out clients. If the account you care about wrote the reply, it appears in its own timeline via the [Tweets Scraper](https://apify.com/myagizm/x-tweets-scraper).

#### What happens with deleted or protected posts?

They are reported as unavailable in the run log, produce no dataset item (so no charge), and the rest of the batch continues.

#### Do I get video files?

You get direct **MP4 URLs** in `media[].video`. Download them promptly — X signs these URLs and they expire.

#### Can I batch many links?

Yes, with no limit on how many you queue.

#### Can I export to CSV, Excel, or JSON?

Yes — JSON, CSV, Excel, or XML.

#### Can I use it with the Apify API?

Yes, via `myagizm~x-tweet-scraper` using the sync or async endpoints above.

#### Is there an MCP server for AI agents?

Yes — Claude, ChatGPT, and Cursor can call it as a tool.

#### Do I need proxies?

No, proxy handling is built in.

#### Can I schedule runs?

Yes — Apify Schedules, API, or webhooks. Useful for tracking a post's metrics over time.

#### How fresh are the metrics?

Live at run time; nothing is cached.

#### Why is `editsRemaining` sometimes null?

Older posts predate X's edit feature, so no edit control exists for them.

#### Why is `place` or `article` usually null?

Geotagging is rare today and long-form articles are a Premium feature; the fields fill in whenever the post carries them.

***

### Related searches {#related-searches}

tweet scraper by url · scrape tweet from link · twitter post data api · get tweet metrics · tweet view count checker · twitter engagement checker · archive tweet before deletion · twitter media downloader url · tweet mp4 download link · twitter post scraper no api · x post data extractor · tweet json api · twitter permalink scraper · bulk tweet lookup by id · tweet metrics to csv · twitter ad creative performance · verify influencer engagement · tweet text extractor · twitter card preview scraper · x tweet api alternative

***

### Disclaimer {#disclaimer}

This is an independent tool and is not affiliated with, endorsed by, or sponsored by X Corp., Twitter, or any of their subsidiaries. All product names, logos, and brands are property of their respective owners.

The actor collects only **publicly available** data — the same content any logged-out visitor can see. It never logs in, never bypasses access controls, and never touches private, protected, or deleted content. You are responsible for how you use the data: if it contains personal data, follow GDPR, CCPA, and other applicable regulations, and respect the platform's terms.

***

### Resources {#resources}

- 📘 [Apify API documentation](https://docs.apify.com/api/v2) — run actors and fetch datasets programmatically.
- 🤖 [Apify MCP server](https://mcp.apify.com) — use this actor as a tool in Claude, ChatGPT, and Cursor.
- 📤 [Dataset export docs](https://docs.apify.com/platform/storage/dataset) — export to JSON, CSV, Excel, and XML.
- ⏰ [Scheduling actor runs](https://docs.apify.com/platform/schedules) — keep your data fresh automatically.
- 🔌 [Apify integrations](https://docs.apify.com/platform/integrations) — n8n, Zapier, Make, Slack, and more.
- 🏪 [myagizm store profile](https://apify.com/myagizm) — the full family of no-login social scrapers.

***

## 中文说明 —— X（推特）单条推文抓取工具

**粘贴 X（Twitter）推文链接或 ID，返回该推文的完整公开数据** —— 不需要 API Key、不需要登录、不需要 Cookie、不需要开发者账号。每条推文返回 33 个字段：完整正文、点赞、转发、回复、引用、书签、**浏览量**、图片与可直接下载的 MP4 视频链接、话题标签、@提及、已还原外链、发布客户端、置顶与编辑状态、链接卡片、被引用或被转发的原推文（完整嵌套对象），以及完整作者资料。适合衡量单条内容表现、在删除前归档、或把一张推文链接表变成指标表。支持导出 JSON、CSV、Excel、XML。

> **两分钟内免费拿到第一批数据** —— 填入内容，点击 Start 即可。无需配置，试用不需要信用卡。

### 这个 Actor 能做什么

- 🔗 **按链接或数字 ID 抓取任意公开推文**，两种格式可混用。
- 📊 **全部公开指标** —— 点赞、转发、回复、引用、书签、**浏览量**。
- 📝 **完整正文**，长推文自动展开。
- 🖼️ **媒体资源** —— 图片地址 + **可直接下载的 MP4 链接**与时长。
- 🃏 **链接卡片** —— 标题、描述、配图、域名、跳转地址。
- 🔁 **引用与转发展开** —— 原推文以完整嵌套对象返回。
- 📱 **发布客户端**，如 `Twitter for iPhone`、`Typefully`。
- ✏️ **编辑状态** —— `isEdited`、`editsRemaining`。
- 👤 **每条推文附带完整作者资料**。
- 🗂️ **批量排队任意数量链接**。
- 📤 **导出** JSON / CSV / Excel / XML，或通过 API 拉取。

### 谁在用

- 📢 **投放与广告团队** —— 衡量具体创意的真实表现。
- 🤝 **红人营销** —— 核实红人声称的单条互动数据。
- 🗄️ **归档与研究** —— 在推文被删除前保存内容与指标。
- 📰 **记者** —— 引用准确的正文、时间与数字，留下可复现记录。
- 📊 **分析师** —— 一次运行把链接清单变成指标表。
- 🎬 **内容团队** —— 从候选推文中批量提取媒体地址。

### 可以抓取哪些数据

始终有值：`id`、`url`、`text`、`createdAt`、`likeCount`、`retweetCount`、`replyCount`、`quoteCount`、`bookmarkCount`、`viewCount`、`lang`、`conversationId`、`source`、`isReply` / `isRetweet` / `isQuote` / `isPinned`、`possiblySensitive`、`isEdited` / `editsRemaining`、`author`（完整作者资料）。

内容存在时才有值：

| 字段 | 说明 |
|------|------|
| `media` | `type`、`image`、**MP4 `video`**、`durationMs` |
| `hashtags` / `mentions` / `links` | 扁平字符串数组，外链已还原 |
| `card` | `name`、`url`、`title`、`description`、`image`、`domain` |
| `quotedTweet` / `retweetOf` | 原推文完整嵌套对象 |
| `inReplyToId` / `inReplyToUserId` / `replyToUsername` | 回复对象 |
| `place` | 地理标记 |
| `article` | 长文标题、摘要、封面图 |

### 使用步骤

1. 打开 [X（Twitter）单条推文抓取工具](https://apify.com/myagizm/x-tweet-scraper)。
2. 在 *Tweet URLs or IDs* 中粘贴链接或 ID，例如 `https://x.com/NASA/status/2081860978694594863` 或 `20`。
3. 点击 **▶ Start**。
4. 导出为 JSON、CSV、Excel、XML，或通过 API 获取。

已删除、被封禁或受保护的推文会在日志中标记为不可用，不产生数据条目（因此不计费），其余链接继续正常返回。

### 输入示例

```json
{ "tweetIds": ["https://x.com/NASA/status/2081860978694594863", "20"] }
```

### 输出示例

```json
{
  "id": "20",
  "url": "https://x.com/jack/status/20",
  "text": "just setting up my twttr",
  "createdAt": "Tue Mar 21 20:50:14 +0000 2006",
  "likeCount": 307402, "retweetCount": 111530, "replyCount": 17840,
  "viewCount": 44120987, "lang": "en", "source": "Twitter Web Client",
  "media": [], "card": null,
  "author": { "username": "jack", "name": "jack", "followers": 6512340, "isVerified": true }
}
```

### 数据准确性

指标在运行时实时读取、不缓存。基准测试中随机抽取 15 条推文与另一个独立接口交叉核对：**15/15 一致**，平均偏差 **0.02%**。

### 使用建议

- 🎬 **拿到 `media[].video` 请立刻下载** —— X 的媒体地址带签名且会过期。
- 🃏 **用 `card.domain` 归因外链流量**，即使被 `t.co` 包了一层。
- 🧵 **用 `conversationId` 还原推文串**。
- 🗄️ **归档请定时快照** —— 发布后指标还会持续变化。
- 🔢 **数据库里存的是 ID 也没问题**，无需拼回完整链接。

### 价格

采用**按结果计费**（pay-per-result）：只为真正拿到的数据付费，不按运行时间收费。

- 💸 成本随结果数量线性增长，预算可以提前算清楚。
- 📉 Apify 的 Bronze / Silver / Gold / Platinum / Diamond 套餐享受阶梯折扣。
- 🆓 新账号自带每月免费额度，第一次运行不花钱。
- 🚫 没有代理附加费、没有单次请求费、没有最低消费。

不可用的推文（已删除 / 被封 / 私密）不会产生数据条目，因此不会计费。实时价格请见 [Apify 商店页面](https://apify.com/myagizm/x-tweet-scraper)。

### 其他 X（Twitter）数据

- 🐦 **[X（Twitter）用户推文抓取工具](https://apify.com/myagizm/x-tweets-scraper)** —— 导出整个账号的公开时间线。
- 👤 **[X（Twitter）账号资料抓取工具](https://apify.com/myagizm/x-profile-scraper)** —— 批量获取粉丝数、简介、认证状态。
- 📈 **[X（Twitter）热门趋势抓取工具](https://apify.com/myagizm/x-trends-scraper)** —— 按国家或城市获取实时趋势。

完整工具家族见 **[myagizm 商店主页](https://apify.com/myagizm)**：Instagram、TikTok、LinkedIn、Reddit、YouTube、Google Maps 抓取工具都采用同样的免登录、按结果计费方式。

### 配合 AI 智能体使用（MCP）

本 Actor 已接入 **Apify MCP 服务器**，Claude、ChatGPT、Cursor 等助手可以把它当作工具直接调用，用自然语言提问即可获得结构化结果，无需写胶水代码。

### 集成与 API

支持 **Make、Zapier、n8n、Slack、Airbyte、Gumloop、CrewAI、IFTTT、Lindy、GitHub、Google Sheets、Google Drive**，以及 Webhook、定时任务和 MCP 服务器。

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~x-tweet-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "tweetIds": ["https://x.com/NASA/status/2081860978694594863", "20"] }'
```

把 `format` 参数改成 `json`、`csv`、`xlsx` 或 `xml` 即可导出不同格式。

### 常见问题

**抓取推文合法吗？**
只读取公开可见的推文，不登录、不获取受保护或已删除内容。合规使用责任在使用者，请遵守 GDPR / CCPA 与平台条款。

**需要 API Key 或登录吗？**
不需要。

**链接和数字 ID 都支持吗？**
都支持，可以在同一次运行中混用。

**包含浏览量吗？**
包含 `viewCount`。

**能抓推文下面的回复吗？**
不能。其他用户的回复不对未登录客户端开放。

**已删除或私密推文怎么处理？**
日志中标记为不可用、不产生条目（不计费），其余继续。

**能拿到视频文件吗？**
返回 **MP4 直链**，请及时下载，链接会过期。

**能批量处理很多链接吗？**
可以，数量不限。

**支持导出 CSV / Excel / JSON 吗？**
支持四种格式。

**需要代理吗？**
不需要。

**可以定时运行吗？**
可以，适合长期跟踪某条推文的指标变化。

**为什么 `editsRemaining` 有时是 null？**
早期推文发布于编辑功能上线之前，没有编辑控制信息。

### 免责声明

本工具为独立第三方工具，与 X Corp.、Twitter 及其关联公司无任何隶属、认可或赞助关系。所有商标归各自所有者。

本 Actor 只采集**公开可见**的数据 —— 即任何未登录访客都能看到的内容。它不登录、不绕过访问控制、不获取私密或已删除内容。数据的使用责任由使用者承担：如涉及个人数据，请遵守 GDPR、CCPA 等相关法规以及平台条款。

### 相关搜索

推文链接抓取 · 按 url 抓推文 · 推文数据 api · 获取推文指标 · 推文浏览量查询 · 推特互动查询 · 推文删除前归档 · 推特媒体下载 链接 · 推文 mp4 下载 · 免 api 推文抓取 · x 帖子数据提取 · 推文 json api · 批量按 id 查推文 · 推文指标导出 csv · 推特广告创意表现 · 核实红人互动 · 推文正文提取 · 推特卡片抓取 · x 推文 api 替代

# Actor input Schema

## `tweetIds` (type: `array`):

Post URLs or numeric IDs, e.g. "https://x.com/NASA/status/2081860978694594863" or "20".

## Actor input object example

```json
{
  "tweetIds": [
    "https://x.com/jack/status/20"
  ]
}
```

# Actor output Schema

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

All scraped results as structured JSON.

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

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

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/nM4hjgGqjA4WyPsiB/builds/5BEUfjEv6ATbAFWYC/openapi.json
