# Reddit Comments Scraper: Full Threads, $2/1K Comments (`actorforgehq/reddit-comments-scraper`) Actor

Input: Reddit post URLs. Output: the thread's comments as JSON rows with author, body, score, depth, parent id and UTC date, loading the 'more replies' branches up to your limit, plus the post itself. $2 per 1,000 comments, $2 per 1,000 posts, no start fee.

- **URL**: https://apify.com/actorforgehq/reddit-comments-scraper.md
- **Developed by:** [Sluicebox](https://apify.com/actorforgehq) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 comments

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

## Reddit Comments Scraper: Full Threads, $2/1K Comments

Get the **comments of a Reddit post** as clean JSON: the whole thread, not just the first screen.
Paste post links, set a limit, and the Actor reads the post page, loads the "more replies"
branches and the next pages of top-level comments the same way the site does when you click them,
and then follows the "More replies" links that hide the deepest reply chains, until your limit is
reached. Every row carries the author, the text, the score, the depth in the tree and the id of
its parent, so you can rebuild the thread or just flatten it into a table.

It reads the same public pages Reddit serves to a logged-out visitor's browser, over plain HTTP
with no page rendering, at a fixed pace that stays inside the request quota Reddit itself
announces for these pages.

This is the comments member of our Reddit family. It shares its code, its field names and its
output format with the [Reddit Data Scraper](https://apify.com/actorforgehq/reddit-data-scraper)
and the [Reddit Subreddit Scraper](https://apify.com/actorforgehq/reddit-subreddit-scraper), so
an input or a pipeline written for one works with the others.

### What you get

One row per comment:

```json
{
  "type": "comment",
  "id": "n8a5ajg",
  "postId": "1rahj9l",
  "subreddit": "learnpython",
  "author": "some_redditor",
  "score": 42,
  "body": "A compiler for a toy language, in C. Took me a year of evenings.",
  "createdUtc": "2026-02-21T14:05:11.000Z",
  "permalink": "https://www.reddit.com/r/learnpython/comments/1rahj9l/comment/n8a5ajg/",
  "depth": 0,
  "parentId": "t3_1rahj9l"
}
```

`depth` is 0 for a top-level comment, 1 for a reply to it, and so on. `parentId` is Reddit's
fullname of the parent: `t3_` plus the post id for a top-level comment, `t1_` plus the comment id
for a reply. A reply always comes after its parent, though not always right after it: deep chains
are loaded later and land further down. Use `parentId` to rebuild the tree. `score` is absent
when Reddit hides it. Deleted authors come through as `[deleted]`, exactly as Reddit shows them.

With **Include the post itself** on (the default) the dataset also holds one row per post with
`type: "post"`: title, author, score, comment count, flair, link, UTC date and the body of a text
post. Its fields are the same as in our other Reddit Actors.

### Input

| Field | Type | Description |
|---|---|---|
| `postUrls` | string\[] | Links to Reddit posts, for example `https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/`. Short links like `https://www.reddit.com/comments/1rahj9l/` and `old.reddit.com` links work too. Links to subreddits, user pages or search pages are not read by this Actor. |
| `maxComments` | integer | Max comments per post (default 1,000, hard cap 10,000). The post itself does not count. Loading stops as soon as the limit is reached. |
| `sort` | string | `best` (default), `top`, `new`, `controversial`, `old` or `qa`. This is the order Reddit uses to pick and arrange the comments it serves, so with a limit it also decides which comments you get. |
| `includePost` | boolean | Default `true`: the post is saved as one extra row and charged as a post. |
| `commentedAfter` / `commentedBefore` | string | ISO date bounds (UTC) for comments. Applied after fetching; filtered-out comments do not count toward `maxComments`. |
| `includeNSFW` | boolean | Default `false`. A post marked NSFW is skipped together with its comments unless you opt in. |
| `startUrls` | array | The same post links in the request-list form used by our other Reddit Actors. Either field works; both are read. |
| `proxyConfiguration` | object | Defaults to Apify **residential proxies** with no country pin, which is the supported configuration. |

Example:

```json
{
  "postUrls": [
    "https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/",
    "https://www.reddit.com/r/programming/comments/1x5nxzy/zxc_0150_decompression_2x_faster_than_zstandard/"
  ],
  "maxComments": 500,
  "sort": "top"
}
```

### How to use it

1. Click **Try for free** or **Start** on this page.
2. Paste one or more post links.
3. Optionally set **Max comments per post**, a sort order and date bounds.
4. Run it. Comments land in the dataset as one row each. Export them as JSON, CSV or Excel, or
   pull them over the API.

To call it from code, use the [Apify API](https://docs.apify.com/api/v2) or an official client.
AI agents can call it through the **Apify MCP server**: the description and the input fields above
are written to be read by an agent.

### Pricing

Pay-per-event, two events, nothing else:

| Event | Rate |
|---|---|
| `comment-scraped` | **$2.00 per 1,000** ($0.002 each) |
| `post-scraped` | **$2.00 per 1,000** ($0.002 each), one per post when `includePost` is on |
| Run start | **free, there is no start event** |

**What you get for $1:** 500 comments. A thread of 300 comments with its post costs $0.602.
Platform usage (compute, proxy) is charged to us, not to you, so the per-row price is the whole
bill. Rates are as of the last README update. The Store page stays authoritative.

### Limits (honest)

- **You get fewer rows than Reddit's comment counter.** The counter on a post includes comments
  that were deleted by their authors or removed by moderators and spam filters. Reddit does not
  serve those to anyone, so no scraper can return them. On three threads of 310 to 450 comments we
  measured on 21 October 2026, this release returned between 89% and 99% of the counter.
- **Deep reply chains are followed to the end.** When a chain goes deeper than Reddit renders in
  one branch, the site shows a "More replies" link instead of the replies. The Actor opens the
  fragment behind that link and keeps going down the chain, so long arguments 10 or more levels
  deep come out whole, each reply with its real depth and parent id.
- **The sort decides which comments you get under a limit.** With `maxComments` below the size
  of the thread, the Actor keeps the comments Reddit serves first under the chosen sort: the best
  ones for `best`, the newest for `new`, and so on.
- **Text comes as plain text.** Comment bodies keep their paragraphs, list items and code blocks,
  but not formatting such as bold, italics or link targets.
- **A deleted or non-existent post gives an empty result** for that link, with no charge, and the
  run goes on with the next link. A private subreddit's post is not readable without login and
  comes back empty too.
- **No login, no captcha solving.** The Actor reads only what Reddit serves to any logged-out
  visitor. It opens a session the way a browser does, completes Reddit's lightweight automated
  visitor check (a short script every visitor's browser runs), and then reads public pages with
  that session. If Reddit refuses a session, the Actor opens a new one from a fresh address. It
  fails honestly rather than fabricate data.
- **A post whose comments were all deleted or removed ends as a failed link.** Reddit's counter
  still shows those comments, so the Actor treats a post page with a counter above zero but no
  comment tree as a bad response and retries it; when every retry comes back the same, that link
  fails instead of being saved as the post alone.
- If more than 5% of requests in a run fail, the run log says so loudly. A run in which every
  fetch failed is marked **failed**, not "succeeded with 0 items". A run whose filters
  legitimately match nothing (say, a strict date window) still succeeds, with an empty dataset
  and an empty bill.

### Rate-limit etiquette (built in, with numbers)

- **At most 20 requests per minute**, with a hard 3-second spacing between requests. Reddit
  announces a quota of 225 requests per 10 minutes for these pages in its `x-ratelimit-*`
  headers. A 3-second spacing means at most 200 requests per 10 minutes, so the Actor stays
  inside that quota by design.
- The post page carries the first comments. Each further request loads one branch of replies, the
  next page of top-level comments or one deep reply chain. On the threads we measured, a request
  brought about 3 comments on average, so a 300-comment thread took 70 to 100 requests, that is 4
  to 5 minutes, and 1,000 comments take roughly 15 to 20 minutes. The default run timeout of 1 hour
  covers about 3,000 comments per run; for bigger jobs raise the timeout in the run options.
- On an HTTP `429` the Actor **waits 30 seconds**, opens a fresh session and retries. On any
  other transient refusal it backs off (3 s, then 6 s, then 9 s), rotates to a fresh proxy
  session and retries, at most 3 times.
- If five requests in a row fail after all retries, the run stops instead of grinding through
  the rest of the plan.

### FAQ

**Do I need a Reddit account or an API key?**
No. The Actor reads only publicly available data as a logged-out visitor, never logs in, and
does not use Reddit's developer API or anyone's credentials.

**How is this different from the Reddit Data Scraper?**
Same code, same output rows, deeper job. The Reddit Data Scraper reads a post page with the
first comments on it, about 25. This Actor keeps loading the "more replies" branches, the next
top-level comments and the deep reply chains until your limit, and is priced per comment.

**Why do I get 280 comments when the post says 300?**
See Limits: the counter includes deleted and removed comments, which Reddit serves to no one. On
the threads we measured, the Actor returned 89% to 99% of the counter.

**Does it use a browser?**
Not for the data. Pages are fetched over plain HTTP and read straight from the HTML Reddit
serves, with no rendering. A real Chrome is kept on standby only as a last resort for opening a
session, when no page gives one over plain HTTP.

**Can I get the comments of a whole subreddit?**
Pair this Actor with the [Reddit Subreddit Scraper](https://apify.com/actorforgehq/reddit-subreddit-scraper):
take the `permalink` of each post it returns and feed the list here as `postUrls`.

**Are NSFW threads included?**
Only if you set `includeNSFW: true`. The default is off.

**Where is my data stored?**
In your run's dataset on your Apify account, under your control. The Actor keeps no copy of
scraped data outside your run and sends nothing to any third party.

### Legal

This is an **unofficial** scraper. It is not affiliated with, endorsed by, or connected to
Reddit, Inc. in any way, and it does not use Reddit's developer API. It reads only data that
Reddit serves publicly to any logged-out visitor: no login, no credentials, no captcha solving.
Website terms of service are a contractual matter between a website and its visitors, not
criminal law. You are responsible for ensuring that your use of the collected data complies with
the laws that apply to you and with Reddit's terms. Comment and post content belongs to its
authors.

### Personal data

Reddit is a pseudonymous platform: the `author` field contains the public username a person
chose to publish under, not their real identity. This Actor collects no emails, no real names,
no private messages, and performs no deanonymization. It stores exactly what any visitor sees
on a public page. Scraped data lives only in your own Apify dataset and is not retained by us
outside your run. If the data you collect contains personal data under the laws of your
jurisdiction (for example the GDPR), you act as its controller: it is your responsibility to
have a legal basis for processing and to honor data-subject requests, including deletion.

### Rate this Actor

If this Actor saved you time, a short rating or review on its Store page helps other people find
it. Missing a field, or did something break? Open the **Issues** tab on this page and tell us.

### Need a custom scraper?

We can build a custom version of this Actor, for example with extra fields, other filters or another output format, or a new Actor for a site we do not cover yet. It runs on Apify like this one. Email actorforge.hq+orders@gmail.com with the site, the data you need and how often you need it.

### Other Actors by ActorForge

- [Reddit Data Scraper](https://apify.com/actorforgehq/reddit-data-scraper): subreddit feeds,
  posts with their first comments, keyword search and user history in one Actor.
- [Reddit Subreddit Scraper](https://apify.com/actorforgehq/reddit-subreddit-scraper): the hot,
  new, top and rising posts of any subreddit, with date bounds and only-new mode.
- [Lazada Reviews Scraper](https://apify.com/actorforgehq/lazada-reviews-scraper): product
  reviews, ratings and buyer media from all six Lazada marketplaces.
- [Wildberries Scraper](https://apify.com/actorforgehq/wildberries-scraper): products, prices
  and reviews from Wildberries as clean, schema-validated JSON.
- [Avito Real Estate Scraper](https://apify.com/actorforgehq/avito-real-estate-scraper): full
  property inventory from Avito with freshness stamps.

### Changelog

- **0.1.6** (22 October 2026): a post page served with a comment counter above zero but no
  comment tree is retried instead of being saved as the post alone.
- **0.1** (October 2026): first release. Full comment threads with "more replies" branches,
  further top-level pages and deep reply chains, six sort orders, date bounds, the post as an
  extra row, $2 per 1,000 comments and $2 per 1,000 posts, no start fee.

# Actor input Schema

## `postUrls` (type: `array`):

Links to Reddit posts, one per line, for example https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/. Short links like https://www.reddit.com/comments/1rahj9l/ work too. Links to subreddits, user pages or search pages are not read by this Actor.

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

How many comments to keep per post (default 1,000, hard cap 10,000). The post page carries the first comments; the rest are loaded branch by branch, one request per branch, at a pace of 20 requests per minute. The Actor stops loading as soon as the limit is reached.

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

The order Reddit uses to pick and arrange comments: best (default), top, new, controversial, old or Q\&A.

## `includePost` (type: `boolean`):

On by default: the post is saved as one extra row with type "post" (title, author, score, comment count, body) and charged as a post. Turn it off to get comment rows only.

## `commentedAfter` (type: `string`):

Keep only comments written on or after this date (UTC). Applied after fetching; filtered-out comments do not count toward Max comments.

## `commentedBefore` (type: `string`):

Keep only comments written on or before this date (UTC). Applied after fetching.

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

Off by default: a post marked NSFW is skipped together with its comments unless you turn this on.

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

The same post links in the request-list form used by our other Reddit Actors. Fill in either this field or Post URLs; both are read.

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

Residential proxies are the default and the supported configuration. No country pin is needed. The run rotates proxy sessions and visitor cookies whenever Reddit refuses one.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/",
    "https://www.reddit.com/r/programming/comments/1x5nxzy/zxc_0150_decompression_2x_faster_than_zstandard/"
  ],
  "maxComments": 500,
  "sort": "best",
  "includePost": true,
  "commentedAfter": "2026-01-01",
  "commentedBefore": "2026-06-01",
  "includeNSFW": false,
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per comment: author, body, score, depth, parent id, UTC date and permalink; the post row carries title, score and comment count.

# 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 = {
    "postUrls": [
        "https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("actorforgehq/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 = { "postUrls": ["https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/"] }

# Run the Actor and wait for it to finish
run = client.actor("actorforgehq/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 '{
  "postUrls": [
    "https://www.reddit.com/r/learnpython/comments/1rahj9l/what_is_the_most_complex_thing_you_have_ever_coded/"
  ]
}' |
apify call actorforgehq/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

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