# Reddit Comments Scraper – Threads & Replies (`chronometrica/reddit-comments-scraper`) Actor

Export public Reddit comments and replies from known post URLs. Get clean text, authors, scores, timestamps, parent IDs, reply depth, and permalinks with clear caps and row states—no Reddit login or API key.

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

## Pricing

from $2.39 / 1,000 reddit 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/platform/actors/running/actors-in-store#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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Comments Scraper – Threads & Replies

### 💬 What does Reddit Comments Scraper do?

Paste public Reddit post URLs and export the public comments and replies.

Use it for conversation research, customer language, public feedback, topic
analysis, moderation research, and loading Reddit discussions into a database.

Each dataset row is one unique public comment. Rows include stable comment and
parent IDs, post identity, comment depth, author, body, public score, time,
permalink, and clear missing-field notes.

This Actor uses logged-out public Reddit data. It does not use Reddit accounts,
cookies, OAuth, private groups, or private user data.

With Reddit Comments Scraper, you can:

- 💬 Export comments and replies from known public posts.
- 🌳 Keep parent IDs and reply depth when the public tree shows them.
- 🆔 Get stable post and comment IDs with canonical links.
- 🧹 Remove duplicate input URLs and duplicate comment IDs.
- 🚦 Keep deleted, removed, partial, and unavailable states clear.
- 📦 Download JSON, JSONL, CSV, Excel, XML, RSS, or HTML.

### ✅ Why choose this Reddit comments scraper?

- 🌳 **Keep the reply tree:** `parentId` and `depth` show how comments and
  replies connect.
- 📊 **Use flat, clean rows:** one comment per row works in CSV, Excel,
  databases, and LLM pipelines.
- 🚦 **Know what is missing:** caps, hidden branches, deleted comments,
  removed comments, and partial results are reported clearly.
- 🔑 **Skip Reddit setup:** no Reddit account, OAuth app, API key, or proxy
  setting is required.

### 📦 What data can I extract?

| Data group | Example fields |
| --- | --- |
| 🔗 Post identity | `inputUrl`, `canonicalPostUrl`, `postId`, `postTitle` |
| 💬 Comment identity | `commentId`, `parentId`, `permalink`, `depth` |
| 🧾 Comment details | `authorName`, `body`, `createdAt` |
| 📊 Public count | `score`, `scorePrecision` |
| 🚦 Availability | `unavailableFields`, `status`, `statusReason` |

Missing public values stay `null`. They are not guessed or changed to fake
zeroes.

### ⚙️ Can I use this Actor through an API?

Yes. Run it in Apify Console or through the Apify API, SDKs, webhooks,
schedules, and integrations.

### 🎯 Common uses

| Use case | How the data helps |
| --- | --- |
| 👂 Voice-of-customer research | Study public words, needs, and complaints. |
| 🧵 Conversation analysis | Rebuild reply links with stable parent IDs. |
| 📈 Topic research | Measure and compare public discussions. |
| 🧱 Data pipelines | Load flat comment rows into a database or tool. |
| 🛡️ Moderation research | Keep removed and deleted states clear. |

### 💵 Cost controls

You pay once for each useful public comment saved. Deleted and removed
placeholders are saved free because
they preserve the reply tree but do not contain usable comment text. Duplicate
comments, failed inputs, and run summaries are also free.

`maxCommentsPerPost` caps saved rows for each post, and the Actor stops when it
reaches the buyer's maximum charge. Start with 25 to 100 comments. Larger caps
can take more time and use more compute and data traffic. A small start fee
also applies as shown in the Store pricing table.

### 🚀 How do I use it?

1. Open the Actor in Apify Console.
2. Paste one or more public Reddit post URLs.
3. Set the comment cap for each post.
4. Click **Start**.
5. Open **Output** to view or download the rows.

### ⬇️ Input

```json
{
    "postUrls": [
        "https://www.reddit.com/r/LocalLLaMA/comments/abc123/example/"
    ],
    "maxCommentsPerPost": 100
}
````

#### 🎛️ Settings

| Setting | What it controls |
| --- | --- |
| `postUrls` | One to 50 public Reddit post URLs. |
| `maxCommentsPerPost` | Unique comment cap per post, from 1 to 500. |

Connection recovery is automatic. You do not need to choose or supply a proxy.

### ⬆️ Output sample

```json
{
    "platform": "reddit",
    "inputUrl": "https://www.reddit.com/r/LocalLLaMA/comments/abc123/example/",
    "canonicalPostUrl": "https://www.reddit.com/r/LocalLLaMA/comments/abc123/example/",
    "postId": "t3_abc123",
    "postTitle": "Example public post",
    "commentId": "t1_def456",
    "parentId": "t3_abc123",
    "depth": 0,
    "authorName": "example_user",
    "body": "Example public comment",
    "score": 12,
    "scorePrecision": "displayed",
    "createdAt": "2026-07-19T19:00:00.000Z",
    "permalink": "https://www.reddit.com/r/LocalLLaMA/comments/abc123/example/def456/",
    "unavailableFields": [],
    "status": "ok",
    "statusReason": null,
    "observedAt": "2026-07-19T20:00:00.000Z"
}
```

### 🧾 Run summary

The `OUTPUT` record reports URLs received, threads resolved, comments found,
rows saved, billable and free rows, duplicate comments merged, hidden branches
remaining, cap use, whether the run finished, and a result for each input URL.

### 🚦 Status and availability fields

- `ok`: the public comment was read with its normal fields.
- `deleted`: Reddit shows the comment as deleted.
- `removed`: Reddit shows the comment as removed.
- `partial`: the Actor saved public comments but more may remain.
- `failed`: the public post could not be read.
- `unavailableFields`: lists fields Reddit did not show for that comment.

### 🔒 Source boundary

The Actor reads logged-out public Reddit data only. It does not log in, use user
cookies, solve account checks, read private subreddits, or collect private data.

### ⚠️ Limits

The cap is a maximum, not a promise. Large threads may have public comments
outside the bounded work for one run. Deleted or removed comments may lack an
author, body, score, or time. Some public views can show fewer details. Check
`unavailableFields` and `OUTPUT.hiddenBranchesRemaining`.

### ❓ FAQ

#### Does it need a Reddit API key or account?

No.

#### Does it collect every comment?

It collects up to the chosen cap. The summary marks a thread partial when the
cap is reached or public branches may still remain.

#### Is the output a nested comment tree?

The dataset uses one flat row per comment so it exports cleanly to CSV, Excel,
and databases. Use `parentId` and `depth` to rebuild the reply tree.

#### How are duplicates removed?

Input posts are matched by stable post ID. Comments are merged by stable
comment ID.

### 🛟 Support

Include the Apify run ID, one affected post URL, what you expected, and what you
received.

# Actor input Schema

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

Full reddit.com post URLs containing /comments/POST\_ID/. Up to 50 URLs per run.

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

Maximum comment rows to save from each post. Default: 100.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.reddit.com/r/LocalLLaMA/comments/1ui241x/the_number_1_public_enemy_of_opensource/"
  ],
  "maxCommentsPerPost": 100
}
```

# Actor output Schema

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

No description

## `output` (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 = {
    "postUrls": [
        "https://www.reddit.com/r/LocalLLaMA/comments/1ui241x/the_number_1_public_enemy_of_opensource/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chronometrica/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/LocalLLaMA/comments/1ui241x/the_number_1_public_enemy_of_opensource/"] }

# Run the Actor and wait for it to finish
run = client.actor("chronometrica/reddit-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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/LocalLLaMA/comments/1ui241x/the_number_1_public_enemy_of_opensource/"
  ]
}' |
apify call chronometrica/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=chronometrica/reddit-comments-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Comments Scraper – Threads & Replies",
        "description": "Export public Reddit comments and replies from known post URLs. Get clean text, authors, scores, timestamps, parent IDs, reply depth, and permalinks with clear caps and row states—no Reddit login or API key.",
        "version": "1.0",
        "x-build-id": "3T9GQzCsn9H9Shsia"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/chronometrica~reddit-comments-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-chronometrica-reddit-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/chronometrica~reddit-comments-scraper/runs": {
            "post": {
                "operationId": "runs-sync-chronometrica-reddit-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/chronometrica~reddit-comments-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-chronometrica-reddit-comments-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "postUrls"
                ],
                "properties": {
                    "postUrls": {
                        "title": "Reddit post URLs",
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "description": "Full reddit.com post URLs containing /comments/POST_ID/. Up to 50 URLs per run.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "maxCommentsPerPost": {
                        "title": "Maximum comments per post",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum comment rows to save from each post. Default: 100.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
