# X (Twitter) Replies Scraper — Comments & Authors (`arjun_code/x-twitter-replies-scraper`) Actor

Collect visible replies and comments from public X (Twitter) posts by URL or ID. Export reply text, nested conversation context, author profiles, engagement, media, and optional original post details for audience and feedback analysis. Download JSON or CSV. No X login required.

- **URL**: https://apify.com/arjun_code/x-twitter-replies-scraper.md
- **Developed by:** [ArjunAI Data](https://apify.com/arjun_code) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 28 total users, 10 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 reply 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

Collect visible replies and comments from public X (Twitter) posts for feedback analysis and audience research. Export reply text, author profiles, engagement, media, and nested conversation context, with an option to include the original post. Enter post URLs or IDs and download the results in JSON or CSV.

### 🚀 Quick start

1. Paste Tweet URLs or numeric IDs into **X post IDs or URLs**.
2. Set **Maximum replies per post**, or use `0` for all new visible replies X makes available.
3. Optionally enable **Include source post details**, then click **Start**.
4. Review comments, author profiles, and conversation relationships before exporting.

```json
{
  "tweets": [
    "https://x.com/alexandr_wang/status/2100256876072210517"
  ],
  "maxRepliesPerTweet": 20,
  "includeSourcePost": true
}
```

### 🔗 Ready-to-run examples

Open an example, review its input and spending limit, then run it in your Apify account.

- [Export X Reply Thread Context](https://apify.com/arjun_code/x-twitter-replies-scraper/examples/export-x-reply-thread-context)
- [Export All Visible X Post Replies](https://apify.com/arjun_code/x-twitter-replies-scraper/examples/export-all-visible-x-post-replies)
- [Inspect Native X Reply JSON](https://apify.com/arjun_code/x-twitter-replies-scraper/examples/inspect-native-x-reply-json)

### 📊 Results

Each successful row represents one reply Tweet. Its text, engagement metrics, and author describe that reply. When enabled, source_post contains the original post in a separate object.

#### Optional source-post context

- Source post ID, URL, text, timestamp, language, posting client, content type, and sensitivity status.
- Native engagement counters, entities, media metadata, quote context, and compact X Article metadata.
- A nested source-author profile with identity, bio, audience, verification, professional, affiliation, website, avatar, and banner fields.

#### Reply and conversation fields

- Reply post ID, URL, full text, clean display text, timestamp, language, and posting client.
- Conversation ID, parent post ID, replied-to user ID, username, and display name.
- `is_direct_reply`, which identifies replies to the requested source post versus nested replies returned in the same conversation.
- Reply, repost, like, quote, bookmark, and view counts when X returns them.
- Hashtags, mentions, expanded URLs, sensitivity status, images, and video variant metadata.

#### Quoted-post context

- Quoted post ID, URL, text, timestamp, and language.
- Quoted author ID, username, and display name.

#### Reply-author profile

- User ID, username, display name, bio, location, account creation time, profile URL, avatar, and banner.
- Follower, following, post, media, and like counts.
- Verification, professional categories, affiliation, labels, pinned posts, website, and public profile flags.

### Input and optional context

| Field | Description | Default |
| --- | --- | --- |
| `tweets` | Up to 50 unique numeric post IDs or full `x.com` / `twitter.com` status URLs. Duplicate IDs are requested once, and invalid values do not stop other valid posts. | Required |
| `maxRepliesPerTweet` | Maximum unique visible replies per source post. Use `0` to continue until X provides no more new visible replies. | `100` |
| `includeSourcePost` | Adds a normalized `source_post` object to every reply with source-post content, engagement, media, quote or Article context, and author details. | `false` |
| `includeRawReply` | Adds the native Tweet object as `raw_reply`, including its embedded reply-author object. | `false` |

Posts are processed sequentially. A run accepts up to 50 unique valid source posts; split larger batches across multiple runs. More posts and larger reply limits increase runtime and the number of billable results.

#### When should optional context be enabled?

It contains normalized source-post data grouped into engagement metrics, entities, media, quoted-post or Article context, and an author profile. Because the same object is attached to every reply, enable it only when each exported row needs self-contained source context.

`raw_reply` contains X's native Tweet object and already embeds the reply-author object. Keep it disabled for normal exports, and enable it only for debugging or when an unnormalized X field is required. Authentication cookies, tokens, passwords, and proxy details are never included.

### 💰 Pricing

This Actor uses pay-per-event pricing. One successfully stored reply produces one `reply-result` event.

| Apify plan | Price per successful reply | Example: 1,000 replies |
| --- | ---: | ---: |
| Free | $0.00035 | $0.35 |
| Bronze | $0.00030 | $0.30 |
| Silver | $0.00025 | $0.25 |
| Gold, Platinum, and Diamond | $0.00020 | $0.20 |

An `apify-actor-start` event costs $0.00005 per run. On the Free tier, 100 successful replies cost approximately **$0.03505**, and 1,000 cost approximately **$0.35005**, including one start event. Platform usage is included in the configured event prices.

Diagnostic rows with `invalid_input`, `not_found`, `no_results`, `partial`, `request_failed`, or `charge_limit_reached` do not create a `reply-result` charge. Use `maxRepliesPerTweet` and Apify's **Maximum cost per run** setting to control spending. The Actor page's **Pricing** tab is authoritative if prices change.

### Availability and status rows

Replies and nested replies are included when X makes them available. Hidden, deleted, protected, spam-filtered, or otherwise restricted replies can be missing. The number exported may differ from the counter displayed on X.

The Actor saves results as it runs and removes duplicate reply IDs within each source post. Collection ends at the requested result or spending limit, or when no further new visible replies are available. Saved replies remain accessible if a later request fails. Results are not guaranteed to be in strict chronological order.

| Status | Meaning | Reply-result charge |
| --- | --- | --- |
| `invalid_input` | The submitted value is not a numeric post ID or supported X / Twitter status URL; other valid inputs continue normally. | No |
| `not_found` | The source post was deleted, unavailable, or does not exist. | No |
| `no_results` | The source post exists, but X returned no visible replies. | No |
| `partial` | Earlier pages were stored before a later page failed. | No charge for the diagnostic row; stored replies remain billable |
| `request_failed` | The first page failed before a reply was stored. | No |
| `charge_limit_reached` | The run stopped at the configured maximum cost. | No |

### FAQ

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

No. Users provide only public post URLs or IDs. No X login, cookies, or X API key is needed.

#### Can it scrape replies from several X posts in one run?

Yes. Add multiple URLs or IDs to `tweets`. Every source post has its own pagination state, reply-ID deduplication set, and result limit.

#### Does it collect direct comments and replies to other comments?

Yes, when X returns them in the same conversation timeline. Use `is_direct_reply`, `reply_to_tweet_id`, `reply_to_username`, and `reply_to_name` to reconstruct the visible relationship.

#### Can I scrape every reply to a post?

Set `maxRepliesPerTweet` to `0` to continue through the available visible replies. However, no scraper can return replies that X does not expose. See the result-limit explanation above.

#### Can I export X comments to CSV or Excel?

Yes. Open the run's Dataset and choose JSON, JSONL, CSV, Excel, XML, or RSS. You can also retrieve records through the Dataset API.

#### Is scraping X replies legal?

This Actor processes publicly exposed post and profile data. Whether a particular use is lawful depends on the data, jurisdiction, and purpose. Do not collect or use personal data unlawfully, and follow X, Apify, and applicable privacy requirements.

### Result examples

The examples below were captured from successful runs on November 10, 2026. Counts and availability can change. They correspond to the Quick start or separately labeled input above.

#### Reply with optional original-post context

```json
{
  "status": "success",
  "requested_input": "https://x.com/alexandr_wang/status/2100256876072210517",
  "source_tweet_id": "2100256876072210517",
  "source_tweet_url": "https://x.com/alexandr_wang/status/2100256876072210517",
  "reply_tweet_id": "2100256890559308197",
  "reply_tweet_url": "https://x.com/alexandr_wang/status/2100256890559308197",
  "reply_text": "to find your invite code, just go to the top right corner of your Muse app, and press “Invite”\n\nthere you’ll see your invite code and can start sending to your friends! https://t.co/2qHELHupW3",
  "reply_display_text": "to find your invite code, just go to the top right corner of your Muse app, and press “Invite”\n\nthere you’ll see your invite code and can start sending to your friends!",
  "reply_display_text_range": [
    0,
    168
  ],
  "reply_created_at": "2026-09-16T16:13:58Z",
  "reply_language": "en",
  "reply_source": "Twitter for iPhone",
  "reply_source_url": "http://twitter.com/download/iphone",
  "conversation_id": "2100256876072210517",
  "reply_to_tweet_id": "2100256876072210517",
  "reply_to_user_id": "615818451",
  "reply_to_username": "alexandr_wang",
  "reply_to_name": "Alexandr Wang",
  "is_direct_reply": true,
  "reply_reply_count": 65,
  "reply_retweet_count": 8,
  "reply_like_count": 118,
  "reply_quote_count": 4,
  "reply_bookmark_count": 43,
  "reply_view_count": 34976,
  "reply_possibly_sensitive": false,
  "reply_hashtags": [],
  "reply_mentions": [],
  "reply_urls": [],
  "reply_media": [
    {
      "media_id": "2100256882904731648",
      "type": "photo",
      "url": "https://pbs.twimg.com/media/HSWcgeKbEAAm6vg.jpg",
      "post_url": "https://x.com/alexandr_wang/status/2100256890559308197/photo/1",
      "width": 944,
      "height": 2048,
      "alt_text": "",
      "duration_millis": null,
      "video_variants": []
    },
    {
      "media_id": "2100256883026300928",
      "type": "photo",
      "url": "https://pbs.twimg.com/media/HSWcgenaEAAz2nd.jpg",
      "post_url": "https://x.com/alexandr_wang/status/2100256890559308197/photo/1",
      "width": 1260,
      "height": 1121,
      "alt_text": "",
      "duration_millis": null,
      "video_variants": []
    }
  ],
  "reply_is_quote": false,
  "reply_quoted_tweet_id": "",
  "reply_quoted_tweet_url": "",
  "reply_quoted_tweet_text": "",
  "reply_quoted_tweet_created_at": "",
  "reply_quoted_tweet_language": "",
  "reply_quoted_author_id": "",
  "reply_quoted_author_username": "",
  "reply_quoted_author_name": "",
  "author_id": "615818451",
  "author_username": "alexandr_wang",
  "author_profile_url": "https://x.com/alexandr_wang",
  "author_name": "Alexandr Wang",
  "author_description": "chief ai officer @meta, founder meta superintelligence labs, founder @scale_ai. give everyone the adulthood they dreamed of in childhood",
  "author_description_entities": {
    "description": {},
    "url": {
      "urls": [
        {
          "display_url": "scale.com",
          "expanded_url": "https://scale.com",
          "indices": [
            0,
            23
          ],
          "url": "https://t.co/5m610IL18X"
        }
      ]
    }
  },
  "author_description_language": "en",
  "author_location": "San Francisco, CA",
  "author_created_at": "2012-06-23T02:46:22Z",
  "author_followers_count": 845922,
  "author_following_count": 951,
  "author_tweets_count": 3731,
  "author_media_count": 545,
  "author_favourites_count": 7608,
  "author_verified": false,
  "author_blue_verified": true,
  "author_protected": false,
  "author_possibly_sensitive": false,
  "author_profile_interstitial_type": "",
  "author_can_media_tag": true,
  "author_professional_type": "",
  "author_professional_categories": [],
  "author_affiliation_name": "Meta",
  "author_affiliation_url": "https://twitter.com/Meta",
  "author_affiliation_badge_url": "https://pbs.twimg.com/profile_images/2103588575358963713/6V4Fahim_bigger.jpg",
  "author_pinned_tweet_ids": [
    "2103551714536439951"
  ],
  "author_account_label": null,
  "author_profile_image_shape": "Circle",
  "author_subscription_eligible": false,
  "author_bio_urls": [],
  "author_bio_mentions": [],
  "author_bio_hashtags": [],
  "author_website_url": "https://scale.com",
  "author_profile_image_url": "https://pbs.twimg.com/profile_images/1631421210205749248/uohbT_40_normal.jpg",
  "author_profile_banner_url": "https://pbs.twimg.com/profile_banners/615818451/1791055220",
  "source_post": {
    "tweet_id": "2100256876072210517",
    "tweet_url": "https://x.com/alexandr_wang/status/2100256876072210517",
    "conversation_id": "2100256876072210517",
    "created_at": "2026-09-16T16:13:54Z",
    "text": "we just launched invite codes in @Muse !\n\nif your friends use your invite code when signing up, both of you get 🎉1 BILLION TOKENS EACH🎉 for up to 20 friends!\n\nand if you invite all 20 friends, you’ll get early access to our newest features (like 📞☎️🤫 and more!) https://t.co/MzDWwLy0ux",
    "language": "en",
    "source_name": "",
    "is_reply": false,
    "is_quote": false,
    "is_longform": false,
    "is_article": false,
    "possibly_sensitive": false,
    "in_reply_to": null,
    "metrics": {
      "reply_count": 1220,
      "retweet_count": 204,
      "quote_count": 235,
      "like_count": 3954,
      "bookmark_count": 1004,
      "view_count": 1016627
    },
    "entities": {
      "hashtags": [],
      "cashtags": [],
      "mentions": [
        {
          "id": "2052434492263178240",
          "username": "Muse",
          "name": "Muse"
        }
      ],
      "urls": []
    },
    "media": [
      {
        "media_id": "2100256854496710657",
        "type": "video",
        "url": "https://pbs.twimg.com/amplify_video_thumb/2100256854496710657/img/B5GGc0OADjA2AI8N.jpg",
        "post_url": "https://x.com/alexandr_wang/status/2100256876072210517/video/1",
        "width": 960,
        "height": 960,
        "alt_text": "",
        "duration_millis": 5041,
        "video_variants": [
          {
            "bitrate": null,
            "content_type": "application/x-mpegURL",
            "url": "https://video.twimg.com/amplify_video/2100256854496710657/pl/wkpwZhs6mdk42zxu.m3u8?tag=29"
          },
          {
            "bitrate": 432000,
            "content_type": "video/mp4",
            "url": "https://video.twimg.com/amplify_video/2100256854496710657/vid/avc1/320x320/VZrD9fORoBD04Zdk.mp4?tag=29"
          },
          {
            "bitrate": 832000,
            "content_type": "video/mp4",
            "url": "https://video.twimg.com/amplify_video/2100256854496710657/vid/avc1/540x540/cMLQo08p9IVJXrXl.mp4?tag=29"
          },
          {
            "bitrate": 1280000,
            "content_type": "video/mp4",
            "url": "https://video.twimg.com/amplify_video/2100256854496710657/vid/avc1/720x720/iCD4lcTbqTEbf_ZJ.mp4?tag=29"
          },
          {
            "bitrate": 8768000,
            "content_type": "video/mp4",
            "url": "https://video.twimg.com/amplify_video/2100256854496710657/vid/avc1/960x960/EVNAEQoYd_EhbvuN.mp4?tag=29"
          }
        ]
      }
    ],
    "quoted_post": null,
    "article": null,
    "author": {
      "id": "615818451",
      "username": "alexandr_wang",
      "name": "Alexandr Wang",
      "profile_url": "https://x.com/alexandr_wang",
      "description": "chief ai officer @meta, founder meta superintelligence labs, founder @scale_ai. give everyone the adulthood they dreamed of in childhood",
      "location": "San Francisco, CA",
      "created_at": "2012-06-23T02:46:22Z",
      "followers_count": 845922,
      "following_count": 951,
      "tweets_count": 3731,
      "media_count": 545,
      "favourites_count": 7608,
      "verified": false,
      "blue_verified": true,
      "protected": false,
      "account_label": null,
      "professional_type": "",
      "professional_categories": [],
      "affiliation_name": "Meta",
      "affiliation_url": "https://twitter.com/Meta",
      "affiliation_badge_url": "https://pbs.twimg.com/profile_images/2103588575358963713/6V4Fahim_bigger.jpg",
      "website_url": "https://scale.com",
      "profile_image_url": "https://pbs.twimg.com/profile_images/1631421210205749248/uohbT_40_normal.jpg",
      "profile_banner_url": "https://pbs.twimg.com/profile_banners/615818451/1791055220"
    }
  }
}
```

### API and integrations

Use your Apify API token in the request header.

```bash
curl -X POST \
  "https://api.apify.com/v2/actors/arjun_code~x-twitter-replies-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tweets":["https://x.com/alexandr_wang/status/2100256876072210517"],"maxRepliesPerTweet":20,"includeSourcePost":true}'
```

This starts a run and returns its ID. After the run finishes, use its `defaultDatasetId` to download the results. You can also save the input as a Task, schedule it, or use Apify integrations.

### Continue your research

- [Find retweeters and quote authors with Retweeters Scraper](https://apify.com/arjun_code/x-twitter-retweeters-scraper)
- [Get post details, media, and Articles with Media Downloader](https://apify.com/arjun_code/x-twitter-media-downloader)
- [Export audience profiles with Followers & Following](https://apify.com/arjun_code/x-twitter-followers-followings-scraper)

### Privacy and support

Internal cookies, proxy details, and authentication data are never written to the result Dataset. This independent Actor is not affiliated with, endorsed by, or sponsored by X Corp.

If a run fails or X changes its response format, open the Actor's **Issues** tab and include the Apify run ID, input, and expected behavior. Never include passwords, cookies, tokens, or other secrets.

# Actor input Schema

## `tweets` (type: `array`):

Enter up to 50 X posts, one per line. Each value may be a numeric post ID or a full x.com/twitter.com status URL. Duplicate post IDs are requested only once, invalid values are reported separately, and valid posts continue processing sequentially.

## `maxRepliesPerTweet` (type: `integer`):

Maximum number of unique visible replies returned for each source post. Enter 0 to continue until X provides no next page, repeats the same page, or returns three consecutive pages without a new unique reply.

## `includeSourcePost` (type: `boolean`):

Adds a normalized source_post object to every reply with the source post, engagement, media, quoted-post or Article context, and author profile. It reuses the same reply response and sends no additional X request. Leave disabled for smaller exports.

## `includeRawReply` (type: `boolean`):

Adds the native Tweet object as raw_reply from the same X response, including its embedded reply-author object. It can significantly increase record size. Leave disabled unless you need X's internal fields.

## Actor input object example

```json
{
  "tweets": [
    "2097815633828172097"
  ],
  "maxRepliesPerTweet": 100,
  "includeSourcePost": false,
  "includeRawReply": false
}
```

# Actor output Schema

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

Visible replies returned by X for the requested source posts.

# 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 = {
    "tweets": [
        "2097815633828172097"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("arjun_code/x-twitter-replies-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 = { "tweets": ["2097815633828172097"] }

# Run the Actor and wait for it to finish
run = client.actor("arjun_code/x-twitter-replies-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 '{
  "tweets": [
    "2097815633828172097"
  ]
}' |
apify call arjun_code/x-twitter-replies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,arjun_code/x-twitter-replies-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/11p6xUOhbXDe28Crn/builds/nFeW5ctx2jjtAFUbI/openapi.json
