# Reddit Comments & Posts Scraper (Cheapest by far) (`mendi_ai_reply_pilot/reddit-comments-scraper`) Actor

Every comment on a Reddit post, cleaned of bots and \[deleted], plus the post itself. $0.20 per 1,000 comments, with a published delivery rate. Also an MCP server for AI agents.

- **URL**: https://apify.com/mendi_ai_reply_pilot/reddit-comments-scraper.md
- **Developed by:** [Comment Verdict](https://apify.com/mendi_ai_reply_pilot) (community)
- **Categories:** Social media
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 6 total users, 6 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 comment delivereds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Reddit Comments & Posts Scraper

Every comment on a Reddit post, **without the bots and the \[deleted]**, plus the
post itself and, if you want it, the author's public profile. **$0.20 per 1,000 comments.** Delivery is measured on every run and published on a live status
page.

### What you get

- **All the comments, in order of visibility.** The thread is read level by
  level, so if you cap a run you get the top-level and most-seen comments
  first, not one deep reply chain.
- **Clean data by default.** `[deleted]` and `[removed]` comments, known bots
  (AutoModerator and others) and emoji-only or link-only replies are dropped,
  and you are not charged for them. Turn **Clean comments** off for the raw
  thread.
- **No silent truncation.** Each post has a row saying how many comments it
  has, how many you got, and why any are missing.
- **Continue where you stopped.** A post with more comments than your cap gets a
  `nextCursor`. Pass it back and you get the next batch only, never paying for
  the first one twice.

### Examples

Ready-to-run examples, each with its input already filled in. Open one and
press **Try for free**, then swap in your own post:

- [Scrape all comments from a Reddit post](https://apify.com/mendi_ai_reply_pilot/reddit-comments-scraper/examples/scrape-reddit-post-comments)
- [Get a Reddit post's details without its comments](https://apify.com/mendi_ai_reply_pilot/reddit-comments-scraper/examples/get-reddit-post-details)
- [Reddit comments for AI and sentiment analysis](https://apify.com/mendi_ai_reply_pilot/reddit-comments-scraper/examples/reddit-comments-for-ai-sentiment-analysis)
- [Export a raw Reddit thread, deleted and bot comments included](https://apify.com/mendi_ai_reply_pilot/reddit-comments-scraper/examples/export-raw-reddit-thread)

### Input

| Field | What it does |
|---|---|
| **Reddit posts** | Post URLs, `redd.it` short links or post IDs. Up to 200 per run. |
| **Max comments per post** | Default 500, up to 10,000. A ceiling, not a minimum charge. **0 = the post only** (and its author if ticked), with a cursor to fetch its comments later. |
| **Comment order** | Best, Top or New. |
| **Clean comments** | On by default (see above). |
| **Include the post author's profile** | Off by default. One extra row per post. |
| **Only comments newer than** | Optional. Re-run a post and get only what is new. |
| **Continue from an earlier run** | Paste the `NEXT_CURSORS` record from an earlier run. Cursors last 7 days. |

Example input: the 100 top comments of one post, cleaned.

```json
{
  "posts": ["https://www.reddit.com/r/socialmedia/comments/1vvm84b/what_social_media_is_still_worth_using/"],
  "maxComments": 100,
  "sort": "top",
  "cleanComments": true
}
```

### Output

Each run has three tables, linked from the run's **Output** tab:

- **Comments** (the run's main dataset, and what **Export** downloads): one
  row per comment.
- **Posts**: one row per post, with the post itself (title, text, author,
  score, flair, links) and how its delivery went.
- **Authors**: one row per post author, when you ask for profiles.

Every row has `type` and `schemaVersion`.

**Comment**

```json
{
  "type": "comment",
  "schemaVersion": 1,
  "id": "kx1abc2",
  "postId": "1abcd2e",
  "parentId": "t3_1abcd2e",
  "depth": 0,
  "author": "example_user",
  "body": "The comment text.",
  "score": 42,
  "createdUtc": 1730000000,
  "edited": null,
  "isSubmitter": false,
  "distinguished": null,
  "awards": 0,
  "deleted": false,
  "removed": false,
  "permalink": "/r/example/comments/1abcd2e/title/kx1abc2/"
}
```

**Post** (in the Posts table)

```json
{
  "type": "post",
  "schemaVersion": 1,
  "id": "1abcd2e",
  "title": "The post title",
  "selftext": "Body text, if any.",
  "subreddit": "example",
  "author": "example_op",
  "score": 1234,
  "upvoteRatio": 0.97,
  "commentCount": 2000,
  "createdUtc": 1729990000,
  "flair": null,
  "nsfw": false,
  "mediaLinks": [],
  "status": "ok",
  "errorCode": null,
  "commentsAvailable": 2000,
  "commentsReturned": 500,
  "commentsDropped": 37,
  "commentsNotShown": null,
  "pageLoads": 4,
  "hasMore": true,
  "nextCursor": "eyJj..."
}
```

`status` is `ok`, `partial` (some comments could not be fetched; you have
what was fetched and a cursor for the rest), `failed`, or `not_found` (the
post no longer exists).

Reddit's comment count includes comments it no longer shows: deleted,
removed by moderators, or hidden. When a post was read in full,
`commentsNotShown` says how many of the counted comments Reddit didn't show.
That is why `commentsReturned` can be well below `commentCount` on an `ok`
post. Those comments don't exist for any logged-out reader and are never
charged.

**Author** (in the Authors table, only with **Include the post author's profile**)

```json
{
  "type": "author",
  "schemaVersion": 1,
  "username": "example_op",
  "id": "9zx81",
  "displayName": "Example Person",
  "createdUtc": 1552521600,
  "karma": 12345,
  "linkKarma": 2345,
  "commentKarma": 10000,
  "contributions": 1024,
  "verified": false,
  "isMod": true,
  "avatarUrl": "https://styles.redditmedia.com/...",
  "bio": "Builds things."
}
```

`createdUtc` is the account's cake day, to the day. Each profile is read
once per post, after its comments, and profiles are read one at a time, so
a run of many posts spends about 20 seconds more per profile. The post row's
`authorStatus` says how it went: `ok`, `not_found` (deleted or suspended
account), or `unparsed`. Only `ok` is charged.

The run's key-value store also holds `NEXT_CURSORS`: every post that has more
comments, ready to paste into **Continue from an earlier run**.

### Use it from code

Start a run and get its comments in one call
([API token](https://console.apify.com/account/integrations)):

```bash
curl -X POST "https://api.apify.com/v2/acts/mendi_ai_reply_pilot~reddit-comments-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"posts": ["https://redd.it/1vvm84b"], "maxComments": 50}'
```

That call waits up to 5 minutes, enough for a few dozen comments. For
bigger runs start the run, then read its dataset when it finishes:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("mendi_ai_reply_pilot/reddit-comments-scraper").call(
    run_input={"posts": ["https://redd.it/1vvm84b"], "maxComments": 500}
)
comments = client.dataset(run["defaultDatasetId"]).list_items().items
post_rows = client.dataset(run["storageIds"]["datasets"]["posts"]).list_items().items  # the Posts table
```

### Use it from AI agents (MCP)

This Actor is also an [MCP](https://modelcontextprotocol.io) server, so
Claude, Cursor, VS Code, ChatGPT or any other MCP client can call it
directly. Add it to your client with your
[Apify API token](https://console.apify.com/account/integrations):

```json
{
  "mcpServers": {
    "reddit": {
      "url": "https://mendi-ai-reply-pilot--reddit-comments-scraper.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_API_TOKEN>"
      }
    }
  }
}
```

The transport is Streamable HTTP. There is nothing to install and nothing to
start: the server wakes up on the first call.

| Tool | What it returns | Usual time |
|---|---|---|
| `get_reddit_post` | One post: title, text, author, subreddit, score, upvote ratio, comment count, flair, links. | about 10 s |
| `get_reddit_comments` | The post and a batch of its comments, most visible first. | 10 to 40 s |

`get_reddit_comments` takes:

| Argument | What it does |
|---|---|
| `post` | The post's URL, a `redd.it` short link, or the post ID. |
| `max_comments` | Comments to return in this call: default 25, up to 100. |
| `sort` | `best` (default), `top` or `new`. |
| `clean` | On by default, as in a run: cleaned-out comments are not charged. |
| `since` | Only comments newer than this: a date, an ISO time, Unix seconds, or a relative time such as `2 days`. |
| `cursor` | The `nextCursor` of an earlier call, to get the next batch. |

```json
{
  "post": "https://www.reddit.com/r/socialmedia/comments/1vvm84b/what_social_media_is_still_worth_using/",
  "max_comments": 25
}
```

The answer holds `post`, `comments` (the same rows as the tables above,
without `type` and `schemaVersion`), `commentsReturned`, `hasMore` and
`nextCursor`.

**Reading a long thread.** A call returns up to `max_comments`, or fewer when
reading takes longer than about 40 seconds, so an agent is never left waiting.
When `hasMore` is true, call again with the same `post` and the `nextCursor`:
you get the next batch only, and nothing is returned or charged twice.

**Same prices as a run.** A call is charged one post event plus one event per
comment returned; a call that fails is free. For whole threads of thousands
of comments, or many posts at once, start a run instead: your agent can do
that through Apify's own MCP server,
`https://mcp.apify.com?tools=mendi_ai_reply_pilot/reddit-comments-scraper`.

### Pricing

Pay per event, only for what is delivered:

| Event | Price | Charged when |
|---|---|---|
| Comment | $0.0002 ($0.20 per 1,000) | a comment is delivered. Cleaned-out comments, and comments older than your cut-off, are free. |
| Post | $0.001 | a post page is fetched for you (once per post per run, or per MCP tool call). A post that fails or no longer exists is free. |
| Author | $0.0003 | an author's profile is delivered. A profile that is missing or can't be read is free. |

A post with 350 comments at the default cap costs 350 × $0.0002 + $0.001 =
$0.071. Set a **maximum cost per run** in the run options: the run stops
cleanly when it is reached, and you keep everything delivered so far.

### Speed

A post with a few hundred comments usually takes **5–20 minutes**. Time depends
on the thread's shape more than its size: Reddit hides deep and long reply
chains behind "more replies" links, and each one is a separate page. The
scraper reads at the pace of a person scrolling a thread, with short pauses
between pages, because that is what keeps it working day after day. Posts in the same run
are scraped in parallel, so 20 posts take minutes, not an hour, and comments
appear in the dataset as they arrive.

### Reliability

Delivery is measured as comments delivered ÷ comments requested, after
retries, not counting posts that no longer exist. The live 24-hour and 7-day
numbers are on the [status page](https://scrape.commentverdict.com/status).
When the service is down or paused, a run stops at once with a message
instead of waiting, and you are charged only the run's start. A short service
restart (up to about 2 minutes) is waited out, not failed.

### Limits

- Public posts only. No private or invite-only communities, nothing that
  needs an account.
- 200 posts and 10,000 comments per post per run.
- A run's results are kept on the scraping service for 24 hours, long enough
  for the run to collect them; your dataset follows your Apify plan's
  retention.
- A continuation returns the thread as it was when its first page was read.
  For comments posted since, run the post again with **Only comments newer
  than**.

### Terms of use

The data is for your own analysis. Don't use it to re-identify, profile,
spam or harass people, and you are responsible for how you use it. Apify's
Store terms apply on top. To ask for a Reddit user's data to be removed from
live results, open an issue on the **Issues** tab.

### Support

Open an issue on the **Issues** tab. We answer within one business day.
Changes are listed in the [changelog](./CHANGELOG.md).

# Changelog

This Actor's version history is a separate document: https://apify.com/mendi_ai_reply_pilot/reddit-comments-scraper/changelog.md

# Actor input Schema

## `posts` (type: `array`):

Post URLs (https://www.reddit.com/r/<sub>/comments/<id>/...), short links (https://redd.it/<id>) or post IDs. Up to 200 per run.

## `maxComments` (type: `integer`):

Stop each post after this many comments (after cleaning); top-level and most visible first. Set 0 for the post only (with its author's profile if ticked) and a cursor to fetch its comments later. You pay only for comments delivered. Up to 10,000. The form starts at 20 so a first run finishes in about a minute; raise it for whole threads (the API default is 500).

## `sort` (type: `string`):

Reddit's sort for the comment tree.

## `cleanComments` (type: `boolean`):

Drop \[deleted] and \[removed] comments, known bots (AutoModerator and others), and emoji-only or link-only replies. Dropped comments are not charged. Turn off to get the raw thread.

## `includeAuthor` (type: `boolean`):

Adds one author row per post: username, display name, account age, karma (total, post and comment), verified and moderator flags, avatar and bio. Charged as one author event per profile delivered; a profile that is missing or suspended is free.

## `sinceUtc` (type: `string`):

Optional. A date (UTC), an ISO time, Unix seconds, or a relative time such as 7 days. Use it to re-run a post and get only what is new.

## `cursors` (type: `array`):

Paste the NEXT_CURSORS record from an earlier run (or post rows' postId and nextCursor) to get the next batch of comments without paying for the first ones again. Cursors last 7 days.

## Actor input object example

```json
{
  "posts": [
    "https://www.reddit.com/r/socialmedia/comments/1vvm84b/what_social_media_is_still_worth_using/"
  ],
  "maxComments": 20,
  "sort": "best",
  "cleanComments": true,
  "includeAuthor": false,
  "cursors": []
}
```

# Actor output Schema

## `comments` (type: `string`):

Every delivered comment.

## `posts` (type: `string`):

Each post's title, text, author and stats, with delivery status and the cursor to continue.

## `authors` (type: `string`):

Post authors' public profiles (when Include the post author's profile is on).

## `nextCursors` (type: `string`):

Posts with more comments. Paste this record into the next run's "Continue from an earlier run" input.

# 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 = {
    "posts": [
        "https://www.reddit.com/r/socialmedia/comments/1vvm84b/what_social_media_is_still_worth_using/"
    ],
    "maxComments": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("mendi_ai_reply_pilot/reddit-comments-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 = {
    "posts": ["https://www.reddit.com/r/socialmedia/comments/1vvm84b/what_social_media_is_still_worth_using/"],
    "maxComments": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("mendi_ai_reply_pilot/reddit-comments-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 '{
  "posts": [
    "https://www.reddit.com/r/socialmedia/comments/1vvm84b/what_social_media_is_still_worth_using/"
  ],
  "maxComments": 20
}' |
apify call mendi_ai_reply_pilot/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mendi_ai_reply_pilot/reddit-comments-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/zwjDXAYjhhdEw8oRB/builds/Q1CnlGxdjPErdSDwS/openapi.json
