# Reddit Post Comments Scraper (`citrine_venus/reddit-post-comments-scraper`) Actor

Scrape every comment and nested reply from any Reddit post or subreddit, no API key or login needed. Get a transparent coverage report showing exactly how complete each thread scrape is, plus filters by score, date, and keyword.

- **URL**: https://apify.com/citrine\_venus/reddit-post-comments-scraper.md
- **Developed by:** [Data Minds](https://apify.com/citrine_venus) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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?

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

## Reddit Post Comments Scraper — Full Thread & Nested Reply Extractor with a Coverage Report

Scrape every comment on any Reddit post — deep nested replies included — and know, per post, exactly what percentage you got.

🔗 **[View this Actor on Apify Store](https://apify.com/citrine_venus/reddit-post-comments-scraper)**

***

### Table of Contents

- [Introduction](#-introduction)
- [What data can you extract from a Reddit thread?](#-what-data-can-you-extract-from-a-reddit-thread)
- [How it works](#-how-it-works)
- [Input parameters reference](#-input-parameters-reference)
- [Output example](#-output-example)
- [Related Actors](#-related-actors)
- [FAQ](#-faq)
- [Support](#-support)

***

### 👽 Introduction

**Reddit Post Comments Scraper** is a **reddit scraper** built on the [Apify platform](https://apify.com) that answers the one question every **reddit comment scraper** quietly dodges: *how many comments did I actually get?* Point it at a post link, a subreddit, a search query, or a username, and it pulls every comment and every nested reply — however many levels deep — off **old.reddit.com's HTML**. No official **Reddit API**, OAuth token, or login is required. It then re-checks its own work with a dedicated completeness pass and attaches a transparent, per-post **coverage report** (`coverage_pct`, `comments_reported_by_reddit` vs `comments_scraped`) to every run, so a partial scrape never masquerades as a full one.

**Main features:**

- 🔍 **Four discovery modes in one run** — direct `urls`, `subreddits`, `searchQuery` (site-wide or scoped to one subreddit), and `usernames` — all combinable and de-duplicated automatically.
- 🌳 **Full nested-reply extraction** — every reply at every depth, not just the first rendered page.
- ➕ **Automatic "load more comments" expansion** via Reddit's own `/api/morechildren` endpoint — the exact gap that leaves most **reddit comment scraper python** scripts stuck at a partial thread.
- ✅ **A two-stage completeness/backfill pass** that re-checks the thread after the first expansion and fills in anything still missing, then reports the result numerically instead of leaving you to guess.
- 🔓 **No Reddit API key, OAuth app, or login** — this is a genuine **reddit api alternative** and **praw alternative** for anyone who wants data without registering a developer app or living inside Reddit's official rate limits.
- 🎯 **Rich filtering** — score, date range, keywords, specific authors, and deleted/removed comments, applied only after the full thread is collected so filtering never distorts the coverage number.

Running on Apify also means this is not a script you babysit: built-in **monitoring** and run history, **scheduling** for recurring pulls, a full **REST API** and client SDKs for programmatic access, and automatic **proxy rotation** (datacenter → residential) if Reddit ever pushes back — all without extra setup.

***

### 🧵 What data can you extract from a Reddit thread?

In plain terms, every dataset row is one comment, and it carries four kinds of information:

- **Who said it** — the author's username, flair, whether they're the original poster, and whether they're a moderator or admin.
- **What they said** — the comment body as clean Markdown, as plain text (ready for **reddit sentiment analysis dataset** or LLM pipelines), and optionally the raw HTML.
- **Where it sits in the thread** — its parent comment, nesting depth, how many direct and total replies it has, and (optionally) the full chain of ancestor comments back to the post.
- **How it's doing** — upvote score, posting and edit timestamps, and deleted/removed status.

Every comment row can also carry the parent post's title, author, subreddit, score, and text, so you get a flat, self-contained table ready for **how to export reddit comments to csv/json** workflows — no separate join required. And running alongside all of that is the actor's signature feature: a **reddit scraper coverage report** showing exactly what fraction of Reddit's own reported comment count made it into your dataset, post by post.

***

### 🔄 How it works

1. **Resolve sources.** Every `urls`, `subreddits`, `searchQuery`, and `usernames` entry is normalized (any Reddit subdomain, short `redd.it` links, and share links all work) and merged into one de-duplicated post list.
2. **Fetch the thread.** Each post is loaded from old.reddit.com's HTML with the requested `commentSort`, and every visible comment is parsed with its exact parent and depth straight from the DOM nesting.
3. **Expand hidden sections.** Every collapsed "load more comments" stub is resolved automatically through Reddit's own `/api/morechildren` endpoint — this is how the actor answers **how to scrape all comments from a reddit post** instead of stopping at the first page, and how it avoids the classic **reddit load more comments not expanding** dead end.
4. **Run the completeness pass.** A second, targeted pass rechecks the thread for anything still missing after the first expansion and backfills it, in configurable rounds and batch sizes.
5. **Compute coverage.** The actor compares `comments_scraped` against `comments_reported_by_reddit` and produces `coverage_pct`, plus diagnostic counts (`morechildren_calls`, `backfill_requests`, `unresolved_stub_ids`, `truncated_subtrees_remaining`, `completeness_pass_converged`, `expansion_complete`) — the transparent answer to **how many comments did I actually get**.
6. **Filter, shape, and stream.** Score, date, keyword, and author filters are applied only after the full thread is in hand, then every kept comment (and optionally the post itself) is pushed live to your Apify Dataset — visible while the run is still going.

***

### 📝 Input parameters reference

*Full input parameter names, types, and defaults — grouped exactly as they appear in the actor's input form.*

#### 🚀 Start here — what to scrape

| Field | Type | Description | Default |
|---|---|---|---|
| `urls` | array | Reddit post/thread links — any subdomain (`www.`, `old.`, `new.`, `np.`, `m.`), short `redd.it` links, and share links accepted, bulk/one-per-line. **Required** if no other source is set. | `[]` |
| `subreddits` | array | Pull the top posts from these subreddits and scrape all of their comments. | `[]` |
| `searchQuery` | string | Find posts matching this text across Reddit (or inside one subreddit). | `""` |
| `searchInSubreddit` | string | Restricts `searchQuery` to this one subreddit. | `""` |
| `usernames` | array | Scrape comments of posts these Reddit users have commented in. | `[]` |

#### 📋 Post discovery

*Only used when discovering posts from subreddits or usernames — ignored for direct URLs.*

| Field | Type | Description | Default |
|---|---|---|---|
| `subredditSort` | string (enum) | `hot`, `new`, `top`, `rising`, `controversial`. | `hot` |
| `searchSort` | string (enum) | `relevance`, `hot`, `top`, `new`, `comments`. | `relevance` |
| `subredditTimeFilter` | string (enum) | `hour`, `day`, `week`, `month`, `year`, `all` — used by `top`/`controversial` sort and search. | `week` |
| `maxPostsPerSource` | integer | How many posts to pull per subreddit/search/username source (1–100000). Direct URLs always scrape in full. | `10` |

#### 💬 Comment extraction

*Controls how deep and how complete the comment collection is for every post.*

| Field | Type | Description | Default |
|---|---|---|---|
| `commentSort` | string (enum) | `top`, `best`, `new`, `controversial`, `old`, `qa`. | `top` |
| `maxCommentsPerPost` | integer | Caps how many comments are **written** per post; collection still runs in full first so filters/coverage stay accurate. `0` = unlimited. | `0` |
| `maxDepth` | integer | Only keep comments up to this nesting depth. `0` = unlimited depth. | `0` |
| `includeReplies` | boolean | Keep nested reply comments, not just top-level ones. | `true` |
| `expandAll` | boolean | Automatically reveal every collapsed "load more comments" section. | `true` |
| `completenessPass` | boolean | Extra pass that double-checks the thread for anything still missing and fills it in. | `true` |
| `maxMoreRequestsPerPost` | integer | Safety valve — caps how many "load more" requests one post can use. `0` = unlimited. | `0` |
| `maxBackfillRequests` | integer | Safety valve for the completeness pass. `0` = unlimited. | `0` |
| `maxBackfillRounds` | integer | How many rounds the completeness pass may run before it stops. | `6` |
| `backfillBatch` | integer | How many spots are rechecked per round during the completeness pass. | `60` |

#### 🎯 Filters

*All filters are optional and applied after the full thread is collected, so the coverage report always reflects the whole post.*

| Field | Type | Description | Default |
|---|---|---|---|
| `minScore` | integer | Only keep comments with at least this many upvotes. Empty = no minimum. | — |
| `dateFrom` | string (date) | Only keep comments posted on or after this date. | `""` |
| `dateTo` | string (date) | Only keep comments posted on or before this date. | `""` |
| `keywords` | array | Only keep comments whose text contains at least one of these words (or all, with the toggle below). | `[]` |
| `keywordsMatchAll` | boolean | On = a comment must contain every keyword; off = any one is enough. | `false` |
| `authors` | array | Only keep comments written by these usernames. | `[]` |
| `skipDeleted` | boolean | Drop comments whose text or author has been deleted or removed. | `true` |

#### 📦 Output shape

*Decide exactly what rides along with every comment row.*

| Field | Type | Description | Default |
|---|---|---|---|
| `includePostInfo` | boolean | Repeat the parent post's title, author, score and text on every comment row. | `true` |
| `includePostRecord` | boolean | Also save the post itself as a separate row, with the coverage report attached (`_meta`). | `false` |
| `includeThreadPath` | boolean | Attach each comment's full parent chain inline (`thread_path`) — ready-made context for LLM pipelines. | `false` |
| `includeBodyHtml` | boolean | Keep the original rendered HTML of the comment body (`body_html`) alongside markdown/plain-text. | `false` |
| `outputTree` | boolean | Save one row per post with all comments nested as replies, instead of one flat row per comment. | `false` |
| `authorKarma` | boolean | Fetch post/comment karma for every unique commenter. Adds one request per unique author. | `false` |

#### 🌍 Network

| Field | Type | Description | Default |
|---|---|---|---|
| `proxyConfiguration` | object | Runs with no proxy by default and self-escalates (datacenter → residential) only if Reddit pushes back. | `{"useApifyProxy": false}` |
| `browserFallback` | boolean | Last-resort retry of stubborn requests inside a real browser session. | `true` |

#### ⚡ Speed & politeness

| Field | Type | Description | Default |
|---|---|---|---|
| `concurrency` | integer | How many posts/comment batches to process at the same time (1–32). | `4` |
| `requestDelay` | number | Pause between requests, in seconds (random jitter added automatically). | `0.7` |
| `maxRetries` | integer | Attempts before a request gives up or the run escalates to the next network route. | `6` |

***

### 📤 Output example

Every comment is streamed to your dataset as it's found — here is one realistic row (with `includePostInfo` on, the actor's default):

```json
{
  "comment_id": "p00n6zh",
  "comment_fullname": "t1_p00n6zh",
  "parent_fullname": "t3_1v7tfx9",
  "parent_id": "1v7tfx9",
  "depth": 0,
  "author": "Zealousideal-Bid462",
  "author_fullname": "t2_k11lcbbt",
  "author_flair": null,
  "is_op": false,
  "distinguished": null,
  "is_stickied": false,
  "body": "Automate it with python and charge for LLM subscription",
  "body_plain": "Automate it with python and charge for LLM subscription",
  "score": 548,
  "is_score_hidden": false,
  "num_direct_replies": 0,
  "num_children": 21,
  "created_utc": 1785137981,
  "created_at": "2026-07-27T07:39:41Z",
  "is_edited": false,
  "edited_at": null,
  "is_deleted": false,
  "is_removed": false,
  "permalink": "https://old.reddit.com/r/Python/comments/1v7tfx9/python_automations_are_so_much_better_than_ai/p00n6zh/",
  "subreddit": "Python",
  "post_id": "1v7tfx9",
  "post_fullname": "t3_1v7tfx9",
  "post_title": "Python automations are so much better than AI Agents and LLMs",
  "post_url": "https://old.reddit.com/r/Python/comments/1v7tfx9/",
  "post_author": "hassanwithanh",
  "post_score": 869,
  "post_num_comments": 170,
  "post_flair": "Discussion",
  "post_selftext": "This is gonna be more of a rant than anything else...",
  "scraped_at": "2026-08-02T10:40:20Z"
}
```

If `includePostRecord` is on, the post itself is saved as an extra row carrying the `_meta` coverage object:

```json
{
  "post_id": "1v7tfx9",
  "record_type": "post",
  "_meta": {
    "comments_reported_by_reddit": 170,
    "comments_scraped": 168,
    "coverage_pct": 98.8,
    "morechildren_calls": 4,
    "backfill_requests": 2,
    "unresolved_stub_ids": 0,
    "truncated_subtrees_remaining": 0,
    "completeness_pass_converged": true,
    "expansion_complete": true,
    "comments_after_filters": 168
  }
}
```

#### 🔎 Output fields worth explaining

| Field | Meaning |
|---|---|
| `depth` | Nesting level — `0` for top-level comments, incrementing for each reply level. |
| `num_children` | Total descendant comments below this one, as reported by Reddit. |
| `is_score_hidden` | `true` when Reddit hides the score (e.g. very new comments). |
| `distinguished` | `"moderator"` or `"admin"` when the author is badge-flagged, otherwise `null`. |
| `thread_path` | (only with `includeThreadPath`) the ordered ancestor chain — `comment_id`/`author`/`body_plain` for each parent up to the post. |
| `_meta.coverage_pct` | `comments_scraped` ÷ `comments_reported_by_reddit` × 100 — the actor's headline completeness metric, attached to the post row when `includePostRecord` is on and always printed in the run log. |
| `_meta.expansion_complete` | `true` only when nothing was left uncollected, unresolved, or capped by a safety valve. |
| `author_post_karma` / `author_comment_karma` | Only present when `authorKarma` is on. |
| `body_html` | Only present when `includeBodyHtml` is on. |

***

### 🧩 Related Actors

If comment-thread depth and a quantified completeness guarantee aren't what you need for a given task, two companion actors cover broader Reddit discovery:

- **[Reddit Scraper - Posts, Comments, Search & Subreddits](https://apify.com/citrine_venus/reddit-scraper-posts-comments-search-subreddits)** — a general-purpose **reddit data scraper** for pulling posts, light comment sets, subreddit listings, and search results in bulk. Good for wide discovery across many subreddits or keywords at once.
- **[Reddit Post & Subreddit Extractor](https://apify.com/citrine_venus/reddit-post-subreddit-extractor)** — focused on **reddit post scraper** workflows: post metadata, subreddit feeds, and listing-level fields without diving deep into every reply chain.

**Reddit Post Comments Scraper** (this Actor) is purpose-built for the opposite job. Use it when you already know *which* post or thread you care about and need every comment and reply extracted with a measurable, per-post completeness guarantee — the `coverage_pct` figure the other two don't attempt to produce. Use the two actors above for **scrape reddit for research** style discovery across many posts, and this one when the comments themselves — all of them, nested replies included — are the deliverable.

***

### ❓ FAQ

#### 📜 Is it legal to scrape Reddit comments?

This Actor only collects **publicly available** data — the same comments any visitor can see on old.reddit.com without logging in. Scraping public web data is generally permitted in most jurisdictions, but you're responsible for how you use it: respect Reddit's Terms of Service, avoid collecting data from private or quarantined communities, and handle usernames and comment text in line with GDPR/CCPA if that applies to you. This is general information, not legal advice.

#### 🆚 How is this different from the official Reddit API or PRAW?

The official **Reddit API** requires a registered developer app, OAuth credentials, and is subject to Reddit's own rate limits and pricing changes — the same constraints **PRAW** (the popular Python wrapper) inherits. This Actor is a practical **reddit api alternative**: it reads old.reddit.com's public HTML directly, so there's **no Reddit API key** to request, no OAuth flow to implement, and no developer account to maintain. It's built specifically to answer **how to scrape reddit without api** access while still returning fully structured, deduplicated data.

#### 🕳️ How do I scrape all comments from a Reddit post, including deeply nested replies?

Leave `expandAll` and `completenessPass` on (both default to `true`) and set `maxCommentsPerPost` to `0` for unlimited. The Actor automatically resolves every "load more comments" stub through Reddit's `/api/morechildren` endpoint, then runs a second backfill pass to catch anything the first expansion missed — this is the direct answer to **how to get all replies from a reddit thread** without manual clicking.

#### 📊 Why isn't coverage ever exactly 100%?

Reddit's own reported comment count (`post_num_comments` / `comments_reported_by_reddit`) includes comments Reddit itself no longer renders — deleted, removed, or filtered by spam systems. A `coverage_pct` in the mid-90s to 100% range on a thread with any deletions is the realistic ceiling, and it's reported transparently rather than silently rounded up. Check `_meta.expansion_complete` — `true` means the completeness pass converged cleanly and nothing was left on the table.

#### 🔧 My "load more comments" section isn't expanding — what's wrong?

Confirm `expandAll` is `true` (it is by default) and that `includeReplies` is also on — hidden reply sections are skipped if replies are disabled entirely. For unusually large threads, raise `maxMoreRequestsPerPost` / `maxBackfillRequests` above their default `0` (unlimited) only if you specifically want a hard cap; otherwise leave them unlimited and let the safety valves stay out of the way.

#### 💰 How much does it cost to scrape Reddit with this Actor?

This Actor runs on Apify's pay-per-event pricing model, billed on the `comment_result` event — one charge per comment (or post record) actually saved to your dataset, with no separate compute or per-request billing to calculate yourself. To keep costs down, set `maxCommentsPerPost` to cap rows written per post and `maxPostsPerSource` to limit how many posts are pulled per source while testing. Check the Actor's Pricing tab on Apify Store for the live rate.

#### 📁 Can I export the results to CSV or JSON?

Yes. Every Apify dataset supports one-click export to JSON, CSV, Excel, XML, and RSS from the Output tab, or programmatic retrieval via the [Apify API](https://docs.apify.com/api/v2) and client SDKs — a direct answer to **how to export reddit comments to csv/json** without writing your own conversion script.

#### 🧠 Can I use this for sentiment analysis, LLM training data, or brand monitoring?

Yes — `body_plain` gives clean flat text ready for a **reddit sentiment analysis dataset** or **reddit comment scraper for llm training data** pipeline with no HTML cleanup needed, and `includeThreadPath` attaches each comment's full ancestor chain inline for multi-turn conversational context. For **reddit brand monitoring scraper** or **reddit data for market research** use cases, combine `keywords`, `authors`, and `minScore` filters with the `subreddits` or `searchQuery` discovery modes to track a specific topic or competitor across many threads at once.

#### 🌐 Do I need a proxy?

No. Runs start with **no proxy** by default. If Reddit pushes back, the Actor escalates automatically — first to a datacenter proxy, then to a residential proxy — and stays on that route for the rest of the run. You only need to configure `proxyConfiguration` manually if you want a specific country route or expect unusually heavy throughput.

***

### 🤝 Support

Found a bug, need a custom field, or want a private integration or bulk pipeline built around this Actor? Reach out at **<hello.dataminds@gmail.com>**. Issues and feature requests are also welcome on the Actor's Issues tab in Apify Console — and if it saved you time, a review helps other users find it.

# Actor input Schema

## `urls` (type: `array`):

📎 Links to the Reddit posts/threads to scrape. Any format works — `reddit.com`, `www.`, `old.`, `new.`, `np.`, `m.`, short `redd.it` links, and share links are all accepted and de-duplicated automatically. Bulk input supported.

## `subreddits` (type: `array`):

🗂️ Pull the top posts from these subreddits and scrape all of their comments — for example `Python`, `MachineLearning`. Combines with URLs, search and usernames in the same run.

## `searchQuery` (type: `string`):

🧭 Find posts matching this text across Reddit (or inside one subreddit below) and scrape their comments.

## `searchInSubreddit` (type: `string`):

📌 When set, the search query above only looks inside this subreddit.

## `usernames` (type: `array`):

🧑‍💻 Scrape the comments of posts these Reddit users have commented in — for example `spez`.

## `subredditSort` (type: `string`):

📊 How to order posts when pulling from a subreddit.

## `searchSort` (type: `string`):

📊 How to order results for the search query. `Most discussed` is usually the best pick for a comment scraper.

## `subredditTimeFilter` (type: `string`):

⏳ Time window for `top` / `controversial` subreddit sort and for search results.

## `maxPostsPerSource` (type: `integer`):

🎁 How many posts to pull from each subreddit, search or username source. Direct URLs always scrape in full regardless of this value.

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

📶 Order comments are collected in (mirrors Reddit's own sort options).

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

📏 Caps how many comments are WRITTEN per post — collection still runs in full first so filters and the coverage report stay accurate. `0` = unlimited.

## `maxDepth` (type: `integer`):

📐 Only keep comments up to this nesting depth (`0` = top-level only would be `1`). `0` = unlimited depth.

## `includeReplies` (type: `boolean`):

💬 Keep nested reply comments, not just top-level ones.

## `expandAll` (type: `boolean`):

🧵 Automatically reveal every collapsed "load more comments" section so the thread is collected in full, not just the first page.

## `completenessPass` (type: `boolean`):

🔬 An extra pass that double-checks the thread for anything still missing after the first expansion and fills it in. Recommended for big threads — leave this on.

## `maxMoreRequestsPerPost` (type: `integer`):

🧯 Safety valve for huge threads — caps how many "load more" requests one post can use. `0` = unlimited.

## `maxBackfillRequests` (type: `integer`):

🧯 Safety valve for the completeness pass. `0` = unlimited.

## `maxBackfillRounds` (type: `integer`):

🔂 How many rounds the completeness pass may run before it stops.

## `backfillBatch` (type: `integer`):

📊 How many spots are rechecked per round during the completeness pass.

## `minScore` (type: `integer`):

📈 Only keep comments with at least this many upvotes. Leave empty for no minimum.

## `dateFrom` (type: `string`):

⏳ Only keep comments posted on or after this date.

## `dateTo` (type: `string`):

⏳ Only keep comments posted on or before this date.

## `keywords` (type: `array`):

🧵 Only keep comments whose text contains at least one of these words (or all of them, with the toggle below).

## `keywordsMatchAll` (type: `boolean`):

☑️ On = a comment must contain every keyword. Off = any one keyword is enough.

## `authors` (type: `array`):

👤 Only keep comments written by these usernames. Leave empty to keep every author.

## `skipDeleted` (type: `boolean`):

🧹 Drop comments whose text or author has been deleted or removed.

## `includePostInfo` (type: `boolean`):

🔗 Repeat the parent post's title, author, score and text on every comment row — handy for flat CSV/Excel exports.

## `includePostRecord` (type: `boolean`):

📌 Also save the post itself as a separate row (with the coverage report attached), not just its comments.

## `includeThreadPath` (type: `boolean`):

🪜 Attach each comment's full parent chain inline — ready-made conversational context for LLM pipelines.

## `includeBodyHtml` (type: `boolean`):

🔧 Keep the original rendered HTML of the comment body alongside the markdown and plain-text versions.

## `outputTree` (type: `boolean`):

🗂️ Save one row per post with all of its comments nested as replies, instead of one flat row per comment.

## `authorKarma` (type: `boolean`):

🔍 Fetch post/comment karma for every unique commenter. Adds one extra request per unique author, so runs take longer.

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

🚦 By default the run uses NO proxy. If Reddit pushes back, it automatically retries on a datacenter proxy, then a residential proxy (3 attempts), and stays on the residential route for the rest of the run. Pick your own route here to override that.

## `browserFallback` (type: `boolean`):

🧭 As a last resort, retry stubborn requests inside a real browser session.

## `concurrency` (type: `integer`):

🏎️ How many posts / comment batches to process at the same time.

## `requestDelay` (type: `number`):

🕰️ A small pause keeps the run polite and stable. Random jitter is added automatically.

## `maxRetries` (type: `integer`):

🛡️ Attempts before a request gives up or the run escalates to the next network route.

## Actor input object example

```json
{
  "urls": [
    "https://www.reddit.com/r/Python/comments/1v7tfx9/python_automations_are_so_much_better_than_ai/"
  ],
  "subreddits": [],
  "searchQuery": "",
  "searchInSubreddit": "",
  "usernames": [],
  "subredditSort": "hot",
  "searchSort": "relevance",
  "subredditTimeFilter": "week",
  "maxPostsPerSource": 10,
  "commentSort": "top",
  "maxCommentsPerPost": 0,
  "maxDepth": 0,
  "includeReplies": true,
  "expandAll": true,
  "completenessPass": true,
  "maxMoreRequestsPerPost": 0,
  "maxBackfillRequests": 0,
  "maxBackfillRounds": 6,
  "backfillBatch": 60,
  "dateFrom": "",
  "dateTo": "",
  "keywords": [],
  "keywordsMatchAll": false,
  "authors": [],
  "skipDeleted": true,
  "includePostInfo": true,
  "includePostRecord": false,
  "includeThreadPath": false,
  "includeBodyHtml": false,
  "outputTree": false,
  "authorKarma": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "browserFallback": true,
  "concurrency": 4,
  "requestDelay": 0.7,
  "maxRetries": 6
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {
    "urls": [
        "https://www.reddit.com/r/Python/comments/1v7tfx9/python_automations_are_so_much_better_than_ai/"
    ],
    "maxPostsPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("citrine_venus/reddit-post-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 = {
    "urls": ["https://www.reddit.com/r/Python/comments/1v7tfx9/python_automations_are_so_much_better_than_ai/"],
    "maxPostsPerSource": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("citrine_venus/reddit-post-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 '{
  "urls": [
    "https://www.reddit.com/r/Python/comments/1v7tfx9/python_automations_are_so_much_better_than_ai/"
  ],
  "maxPostsPerSource": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call citrine_venus/reddit-post-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,citrine_venus/reddit-post-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/8mH5ht5DogpDlCHSz/builds/vbe28L93VzFv9ZmBD/openapi.json
