# Reddit Comments Scraper: Whole Threads & Replies (`deepmine/reddit-comments-scraper`) Actor

Export the comments of any Reddit post, no login: paste post links and get the whole thread, replies included, with author, score, date, depth, parent and reply count, plus the post itself. Many posts per run, sorted as on Reddit, first rows in seconds. You pay per result.

- **URL**: https://apify.com/deepmine/reddit-comments-scraper.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Social media, Lead generation, AI
- **Stats:** 2 total users, 2 monthly users, 81.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.39 / 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

### What does Reddit Comments Scraper do?

Paste Reddit post links and it exports each post's comment thread: every comment and reply with its text, author, score, date, depth, parent, root comment and reply count, right after the post itself: Reddit's first answer in its own order, then (on big threads) the rest as they're read. Up to 1,000 comments per post by default (more if you raise it), many posts per run, first rows in seconds. No login, no browser, no cookies.

These are real rows from the prefilled run (2 threads, 49 comments each: r/gamedev "Anyone else still uses little to no AI to code?" and r/technology's self-checkout thread):

| Comment | Depth | Score | Replies | Posted |
|---|---:|---:|---:|---|
| "StackOverflow alternative" is where I leave it. It's great for that, I can get questio... | 0 | 687 | 14 | 2026-06-17 |
| The rule of thumb I always applied to Stack Overflow was that I should be able to under... | 1 | 190 | 2 | 2026-06-17 |
| Even if you understand the code you copy, you may not be able to write it yourseld, or... | 2 | 55 | 10 | 2026-06-17 |
| Not really, AI doesn't remove the ability to think any more than Stack Overflow. You co... | 3 | 41 | 3 | 2026-06-17 |
| Bold of you to assume after 3 years it wasn’t already reported as a duplicate and closed. | 5 | 28 | 0 | 2026-06-18 |

<sub>$0.49 per 1,000 results on Starter ($0.59 Free, $0.45 Scale, $0.39 Business). The prefilled run (100 results: 2 posts, 98 comments) costs about $0.05. No start fee. Collected 2026-10-06.</sub>

### What do you get from a Reddit thread?

- **Every comment and reply**, up to **Max comments per post**: Reddit hides long threads behind "more replies" links; the Actor opens them for you.
- **The thread's shape**: `depth`, `parentId` and `rootCommentId` on every comment, and `numberOfReplies` when the comment's replies were read, so you can rebuild the tree or keep only top-level comments.
- **The post itself** first: title, text, score, upvote ratio, comment count, subreddit, author, flair, media.
- **Any sort**: Best, Top, New, Controversial, Old or Q\&A, as on Reddit, and a reply depth from 1 (top-level only) to 10.
- **One comment's thread**: a link to a single comment reads that comment with its replies.
- **Subreddit or search links**: their top posts, each with its comments.

### Use cases

- **Customer and product research**: what people actually think, in their own words, under a post about your product or a competitor.
- **Sentiment and topic analysis**: whole discussions with scores, ready for an LLM or a spreadsheet.
- **AI training and RAG datasets**: conversations with parent/child links intact.
- **Content and community work**: the best-voted answers to a question, replies included.

### How much does it cost to scrape Reddit comments?

You pay per result in your dataset: a comment or a post, both at the same price.

| Apify plan | Price per 1,000 results |
|---|---:|
| Free | $0.59 |
| Starter | $0.49 |
| Scale | $0.45 |
| Business | $0.39 |

Each comment and post is charged once per run. There's no start fee, and the run stops at your spending limit, so set **Max comments per post** to what you need.

### Input

The prefill reads 2 threads with 49 comments each. To change it:

- **Post URLs**: one post link per row: reddit.com/r/.../comments/..., old.reddit.com, redd.it short links, or a link to one comment.
- **Max comments per post**: 1,000 by default; Reddit's biggest threads have tens of thousands, and the field goes to 100,000. Measured on 2026-10-22: 1,000 comments of a 3,141-comment r/technology thread took an 18 s run (191 Reddit calls) and cost $0.49 at the Starter price; very large asks take longer.
- **Comment sort** and **Reply depth**: as on Reddit.
- Below the first screen: how many posts to read from a subreddit or search link, **Filters** (posted after or before a date, NSFW) and **Advanced** (a total cap for the run, proxy).

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/AskReddit/comments/<post id>/<title>/" },
    { "url": "https://redd.it/<post id>" }
  ],
  "maxCommentsPerPost": 5000,
  "commentSort": "top"
}
```

### Output

Every row goes to one dataset, where `dataType` says what it is: `post` or `comment`. Each post is followed by its comments in thread order. The Output tab shows a comments table, a posts table and both together. Download as JSON, CSV, Excel or HTML, or read it through the Apify API.

A reply from the prefilled run (shortened):

```json
{
  "dataType": "comment",
  "id": "t1_osakhpi",
  "body": "Bold of you to assume after 3 years it wasn’t already reported as a duplicate and closed.",
  "upVotes": 28,
  "createdAt": "2026-06-18T00:48:32Z",
  "depth": 5,
  "parentId": "t1_osaj5m6",
  "parentKind": "comment",
  "rootCommentId": "t1_os82aco",
  "postId": "t3_1u8gc0p",
  "postTitle": "Anyone else still uses little to no AI to code?",
  "communityName": "r/gamedev",
  "numberOfReplies": 0
}
```

**Comment fields** (61): `id`, `url`, `body`, `username`, `upVotes`, `createdAt`, `depth`, `parentId`, `parentKind`, `rootCommentId`, `numberOfReplies`, `postId`, `postTitle`, `postUrl`, `postUpVotes`, `postCommentsCount`, `postCreatedAt`, `postAuthor`, `communityName`, `isSubmitter` (the post's author replying), `edited`, `stickied`, `distinguished`, `totalAwardsReceived`, `collapsed`, `bodyHtml` and more.

**Post fields** (101): `title`, `body`, `upVotes`, `upvoteRatio`, `commentsCount`, `numDuplicates`, `flair`, `postType`, `contentUrl`, `imageUrls`, `videoUrl` and more.

### Is it legal to scrape Reddit comments?

The Actor reads only public Reddit threads that anyone can open without an account. It never logs in and skips private and quarantined communities. If your results include personal data, you're responsible for handling it lawfully (for example under GDPR).

### FAQ

**Why fewer comments than the post's comment count?** Reddit's count includes comments that were removed since, and the run stops at **Max comments per post** and **Reply depth**. Deleted comments that still have replies come as `[deleted]` rows, so the tree stays whole.

**What if Reddit fails in the middle of a thread?** Each thread page is tried up to 4 times, each time from a new IP. If one still fails, the comments read so far stay, and the run's status and OUTPUT (`commentsIncomplete`) name the posts whose threads stopped early.

**Is it fast?** The prefilled run (2 posts, 98 comments) took 6 and 27 seconds on Apify in two runs, the first row 2.7 and 5.4 seconds after the start (256 MB, datacenter proxy, October 22, 2026). Big threads come in batches as Reddit's thread pages and their "more replies" parts load: 1,000 comments took 191 calls.

**Does my Apify plan matter?** Only for very large runs. Reddit allows 100 requests per IP every 10 minutes and the run uses your plan's datacenter proxy IPs (5 on Free, more on paid plans). If they are all used up, the run waits for Reddit's window to reset and says so in its status.

### Feedback

Missing a field? Open an issue on the Actor's Issues tab; we read every one. If the data helped, a short review on the Store page helps others find it.

# Actor input Schema

## `startUrls` (type: `array`):

Reddit post links, one per row (reddit.com/r/.../comments/..., old.reddit.com or redd.it). You get the post, then its comments with replies; a link to one comment reads that comment's thread. Subreddit and search links work too: their posts' comments are read.

## `maxCommentsPerPost` (type: `integer`):

Most comments per post, replies included, in the order below. 1,000 covers most whole threads; raise it for the biggest.

## `commentSort` (type: `string`):

Order of comments, as on Reddit.

## `commentDepth` (type: `integer`):

How deep in reply chains to go: 1 = top-level comments only, 10 = Reddit's maximum.

## `maxItemsPerSource` (type: `integer`):

With a subreddit or search link, how many of its posts to read, each with its comments. A post link is always one post.

## `postedAfter` (type: `string`):

Only posts and comments from after this date: 2026-09-01, 2026-09-01T12:00:00Z, or a period like '7 days' or '12 hours'.

## `postedBefore` (type: `string`):

Only posts and comments from before this date (same formats).

## `includeNSFW` (type: `boolean`):

Keep posts and communities marked 18+.

## `maxResults` (type: `integer`):

Most rows for the whole run, every post and comment counted together. Empty = no total cap.

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

Leave as is: Reddit answers Apify's datacenter proxy, the cheapest option. If you pick Residential, the run still reads through datacenter and uses your residential IPs only to retry a call Reddit refuses there.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/gamedev/comments/1u8gc0p/anyone_else_still_uses_little_to_no_ai_to_code/"
    },
    {
      "url": "https://www.reddit.com/r/technology/comments/1wz12j6/retailers_are_pulling_back_from_selfcheckout/"
    }
  ],
  "maxCommentsPerPost": 49,
  "commentSort": "confidence",
  "commentDepth": 10,
  "maxItemsPerSource": 100,
  "includeNSFW": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

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

No description

## `overview` (type: `string`):

No description

## `summary` (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 = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/gamedev/comments/1u8gc0p/anyone_else_still_uses_little_to_no_ai_to_code/"
        },
        {
            "url": "https://www.reddit.com/r/technology/comments/1wz12j6/retailers_are_pulling_back_from_selfcheckout/"
        }
    ],
    "maxCommentsPerPost": 49
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/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 = {
    "startUrls": [
        { "url": "https://www.reddit.com/r/gamedev/comments/1u8gc0p/anyone_else_still_uses_little_to_no_ai_to_code/" },
        { "url": "https://www.reddit.com/r/technology/comments/1wz12j6/retailers_are_pulling_back_from_selfcheckout/" },
    ],
    "maxCommentsPerPost": 49,
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/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 '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/gamedev/comments/1u8gc0p/anyone_else_still_uses_little_to_no_ai_to_code/"
    },
    {
      "url": "https://www.reddit.com/r/technology/comments/1wz12j6/retailers_are_pulling_back_from_selfcheckout/"
    }
  ],
  "maxCommentsPerPost": 49
}' |
apify call deepmine/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

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