# Reddit Comments Scraper & API: Export Full Comment Threads (`quarra/reddit-comments-scraper`) Actor

Scrape Reddit comments from any post link: every comment and reply with text, score, author, date, depth and parent, the whole tree with no comment left out, or the thread as Markdown for LLMs. Date filters on comments, new comments only on a schedule.

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

## Pricing

from $2.20 / 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.
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

## Reddit Comments Scraper: Full Comment Threads

Paste Reddit post links and get all their comments: text, score, author, date, depth, parent and root comment, with
the post itself. Or get each thread as one Markdown record for an LLM. No login, no cookies, no API key. Export as
JSON, CSV or Excel, or read it through the Apify API.

- **The whole tree, no comment left out**: on a 1,650-comment thread, 263 of 263 recent comments down to depth 12 in
  our tests, each with `parentId`, `depth` and `rootCommentId`, so the thread can be rebuilt in a spreadsheet. The 2012
  Obama AMA: 22,806 comments in about 15 minutes, none missing.
- **Threads as Markdown for LLMs** (`outputFormat: threadMarkdown`): one record per post with its comment tree, 7.2
  times fewer characters than the same thread as JSON records, at the same price.
- **Comment date filters**: only the comments written after or before a date; the tree is still walked, so a new reply
  under an old comment is found.
- **Only new comments on a schedule**: turn on **Only new since the last run** and each run returns and charges only
  the comments earlier runs did not return.

**$2.50 per 1,000 comments, $2.50 per 1,000 posts**, less on paid plans, plus $0.005 per run. Posts that fail,
duplicates and comments outside your dates are not charged.

Optional **AI analysis** of each post and comment (sentiment, intent, entities, summary, pain point, business
signals, your own labels): **$0.50 per 1,000** analyzed records.

### Quick start

1. Paste post links into **Post URLs**, one per line.
2. **Max comments per post** comes set to 50 for the example: empty it for the whole thread, or set your own cap.
3. Click **Start** and read the comments in the run's **Output** tab.

Through the API:

```json
{
  "startUrls": ["https://www.reddit.com/r/IAmA/comments/z1c9z/"],
  "commentSort": "top",
  "maxCommentDepth": 2
}
```

New comments of a launch thread, each hour:

```json
{
  "startUrls": ["https://www.reddit.com/r/technology/comments/1x3b0mi/"],
  "onlyNew": true,
  "watchName": "launch-thread"
}
```

Like any Apify Actor, it can be scheduled, connected to webhooks, Make, Zapier, n8n, or called by AI agents through
Apify's MCP server.

### Output

One record for the post, then one per comment. A real comment from our benchmark thread (author replaced, some fields
left out):

```json
{
  "type": "comment",
  "id": "pd0smho",
  "url": "https://www.reddit.com/r/technology/comments/1wu4lnz/palantir_ceo_alex_karp_quietly_purchased_37000/pd0smho/",
  "postId": "1wu4lnz",
  "postTitle": "Palantir CEO Alex Karp quietly purchased 37,000 acres of forests in Sweden—and locals found out when hunters lost leases to use the property",
  "parentId": "t1_pd02xdu",
  "parentType": "comment",
  "rootCommentId": "pczzr78",
  "depth": 3,
  "subreddit": "technology",
  "author": "example_user",
  "body": "Not a Swede, but don’t want him there either. ",
  "createdAt": "2026-09-30T15:31:09Z",
  "score": 920,
  "scorePerHour": 8.72,
  "isDeletedOrRemoved": false,
  "scrapedAt": "2026-10-05T00:58:22Z"
}
```

| Field | What it holds |
|---|---|
| `body`, `score`, `createdAt` | the comment as written, its score and date |
| `parentId`, `parentType`, `rootCommentId`, `depth` | where it sits in the tree (0 = a top-level comment) |
| `postId`, `postTitle` | the post it belongs to |
| `isDeletedOrRemoved` | `true` for a comment deleted or removed after it got replies |

With `threadMarkdown`, each post is one `thread` record: title, counters, and the comment tree as indented Markdown
(author, score, date, text). The run summary is the `OUTPUT` record of the run's key-value store.

### AI analysis (optional)

Turn on **AI analysis** and every post and comment gets an `aiAnalysis` object next to its own fields:
**$0.50 per 1,000 analyzed records, every field and signal included**. A real result (post "Best and inexpensive CRM
for small businesses" in r/CRM, analyzed October 14, 2026, with two labels of our own; some entities left out):

```json
"aiAnalysis": {
  "language": "en",
  "sentiment": "mixed",
  "sentimentScore": -0.2,
  "emotion": "anticipation",
  "intent": "seeking_recommendation",
  "category": "software",
  "topics": ["crm alternatives", "hubspot pricing", "small business software"],
  "entities": [{"name": "HubSpot", "type": "brand"}, {"name": "Zoho", "type": "brand"}, {"name": "Pipedrive", "type": "brand"}],
  "summary": "A user seeks a cheaper CRM alternative to HubSpot that retains key features like lead tracking and reporting for their small businesses.",
  "painPoint": "HubSpot is becoming too expensive",
  "wantsHelp": true,
  "buyingSignal": true,
  "mentionsPrice": true,
  "featureRequest": false,
  "isVendor": false,
  "relevance": null,
  "labels": {"switching": true, "budget": true}
}
```

| Field | What it holds |
|---|---|
| `sentiment`, `sentimentScore` | positive, negative, neutral or mixed, and a score from -1 to 1 |
| `emotion` | the main emotion (joy, frustration, anger, curiosity, confusion, none…) |
| `intent` | what the author wants: question, seeking_recommendation, complaint, praise, purchase_intent, comparison, announcement, self_promotion, discussion, humor |
| `category`, `topics`, `entities` | a category, up to 3 topics, and the brands, products, companies, people and places named |
| `summary`, `painPoint` | one English sentence, and the problem or frustration the author expresses (or null) |
| `wantsHelp`, `buyingSignal`, `mentionsPrice`, `featureRequest`, `isVendor` | business signals, true or false: asks for help, ready to buy or pay, names a price or budget, asks for a feature, sells or builds what they talk about |
| `relevance` | search results only (in [Reddit Search Scraper](https://apify.com/quarra/reddit-search-scraper)): how much the record is about the query, 0 to 1 |
| `labels` | your own yes/no labels |

**Your own labels**: up to 5, as `{"label_name": "what makes it true"}`, for example
`{"switching": "The author wants to switch from one product to another"}`. Included in the price.

- Charged once per record analyzed in full. Deleted, removed, bot (AutoModerator) and empty records are not analyzed
  and not charged. If an analysis fails, the record is still delivered (and charged as usual), its
  `aiAnalysisStatus` is `failed` with the reason in `aiAnalysisError`, and the analysis is not charged.
- Any language in, summaries in English. The first ~2,500 characters of a very long text are analyzed.
- Works with the one-record-per-item output format (not the Markdown thread format).
- It adds time: about a minute and a half per 100 records.

### Inputs

- **Post URLs**: reddit.com and old.reddit.com links, redd.it links, share links, gallery or v.redd.it links, or a
  comment permalink.
- **Max comments per post**: empty = the whole thread, even with tens of thousands of comments; 0 = the post only.
- **Max comment depth**: empty = all levels; 0 = top-level comments only.
- **Comment sort**: Reddit's default order, top, new, controversial, old, Q\&A.
- **Comments posted after / before**.
- **AI analysis** and **Your own labels**: the optional analysis described above.
- **Output format**: one record per item, or each thread as one Markdown record.
- **Only new since the last run** and **Watch name**, for scheduled runs.

### Pricing

Pay per event:

| Apify plan | Comments | Posts |
|---|---|---|
| Free | $2.50 / 1,000 | $2.50 / 1,000 |
| Starter | $2.40 / 1,000 | $2.40 / 1,000 |
| Scale | $2.30 / 1,000 | $2.30 / 1,000 |
| Business and above | $2.20 / 1,000 | $2.20 / 1,000 |

AI analysis (optional): $0.50 / 1,000 analyzed records on every plan.

Plus the start: $0.005 per GB of run memory. A full 1,650-comment thread came to about $3.91 on the Free plan in our tests. The
Markdown format is charged the same way (one post, plus one comment per comment in the record). Not charged: posts
that fail, error records, duplicates, comments outside your dates, comments already returned to a watch. Set
**Maximum cost per run** in the run options and the run stops before going over it.

### Limits

- Reddit does not serve deleted comments that have no replies; they are counted in the run summary, not returned.
- Quarantined communities are visible to logged-in accounts only. The Actor reports them and does not log in.

### FAQ

**How fast is it?** A 1,650-comment thread in about 4 minutes.

**Do I need a Reddit account or API key?** No account, no cookies, no API key. Platform costs are included in the
price.

**Is it legal?** It collects public comments any logged-out visitor can see. Reddit's terms and privacy law (GDPR in
the EU) apply to how you use the data.

**Does the Actor send anything to Quarra?** Only when a run fails or runs out of time: the Actor, its build, the error type, the line of our code where it happened, and the memory and time the run was given, so we can fix it fast. Never your input, your results, your account or the run ID.

### Related tools from Quarra

- [Reddit Scraper](https://apify.com/quarra/reddit-scraper): subreddits, searches, post URLs and users in one Actor.
- [Reddit Search Scraper](https://apify.com/quarra/reddit-search-scraper): posts and comments by keyword.
- [Reddit Subreddit Scraper](https://apify.com/quarra/reddit-subreddit-scraper): the posts of any subreddit.

# Actor input Schema

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

Post URLs, one per line: reddit.com and old.reddit.com links, redd.it links, share links, gallery or v.redd.it links, or a comment permalink. Each one returns the post and its comment tree.

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

Empty = the complete thread, even with tens of thousands of comments. 0 returns the post only. With Only new, each run returns up to this many comments of a thread that earlier runs did not return.

## `maxCommentDepth` (type: `integer`):

Empty = all levels. 0 = top-level comments only, 1 = plus direct replies, and so on. Deeper branches are not even requested (faster).

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

Order of comments inside each thread (Best is Reddit's default).

## `commentsPostedAfter` (type: `string`):

Only comments written after this date (2026-10-01, or 12 hours), in threads and user histories. The tree is still walked, so a new reply under an old comment is found (reading stops after 10,000 comments in a row outside your dates); only matching comments are saved and charged.

## `commentsPostedBefore` (type: `string`):

Only comments written before this date.

## `aiAnalysis` (type: `boolean`):

Adds aiAnalysis to every post and comment: language, sentiment and score (-1 to 1), emotion, intent (question, recommendation request, complaint, praise, purchase intent, comparison…), category, topics, named brands, products and people, a one-sentence English summary, the pain point, and business signals (wants help, buying signal, mentions a price, feature request, vendor). Search results also get a relevance score (0 to 1) against your query. Charged once per post or comment analyzed in full; deleted, removed, bot or empty records and failed analyses are free. Works with the items output format.

## `aiLabels` (type: `object`):

Up to 5 yes/no labels of your own, as {"label_name": "what makes it true"}. Each analyzed record gets labels: {label_name: true or false}. Example: {"switching": "The author wants to switch from one product to another", "budget": "The author states a budget"}. Included in the analysis price.

## `outputFormat` (type: `string`):

Thread Markdown: one record per post with its whole comment tree as indented Markdown (author, score, date, text), about 7 times fewer characters than the same thread as JSON. A thread too big for one record (over ~20,000 comments) comes as numbered parts. Same price: 1 post + 1 comment per comment included. Profiles stay normal records.

## `onlyNew` (type: `boolean`):

Remember what earlier runs of the same watch returned and output only new posts and new comments (with Include comments, also comments that earlier runs did not return under posts already seen; with Max comments per post, each run adds up to that many of them per thread, oldest included). Nothing already delivered is charged again, even after a run that timed out, was aborted or overlapped another. One run per watch at a time: a second one does nothing and charges nothing. Memory: key-value store quarra-reddit-watch-\<this Actor's ID, lowercase> of your account (a watch already kept in quarra-reddit-watch stays there). Set a watch name, then schedule the Actor.

## `watchName` (type: `string`):

Name of this watch's memory for 'Only new'. Recommended: runs with the same name share it even when you add or remove sources. Empty: the memory belongs to this exact set of inputs and filters, so adding a source starts a new watch that returns everything again (limits, output format and proxy don't count).

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

Connection. Keep the default (automatic). Costs are included in the price.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.reddit.com/r/IAmA/comments/z1c9z/"
  ],
  "maxCommentsPerPost": 50,
  "commentSort": "confidence",
  "aiAnalysis": false,
  "outputFormat": "items",
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every record: posts, comments, profiles, communities and Markdown threads, each with a type field.

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

Posts only (type post).

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

Comments with parentId, depth and rootCommentId (type comment).

## `threads` (type: `string`):

With outputFormat threadMarkdown: one record per post with its whole comment tree as Markdown.

## `summary` (type: `string`):

Per-input status, errors, posts dropped by filters, per-thread completeness and watch statistics.

# 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": [
        "https://www.reddit.com/r/IAmA/comments/z1c9z/"
    ],
    "maxCommentsPerPost": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("quarra/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": ["https://www.reddit.com/r/IAmA/comments/z1c9z/"],
    "maxCommentsPerPost": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("quarra/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": [
    "https://www.reddit.com/r/IAmA/comments/z1c9z/"
  ],
  "maxCommentsPerPost": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call quarra/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

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