# Reddit Comments Scraper (`piotrv1001/reddit-comments-scraper`) Actor

Export the comments of Reddit posts: text, author, score, date, depth, parent ID and permalink, with the post author's replies flagged. Sort by best, top, new, controversial, old or Q\&A. A Reddit comment scraper for sentiment analysis, monitoring and research. No login. Export JSON, CSV or Excel.

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

## Pricing

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

Export the **comments of any Reddit post**. The **Reddit Comments Scraper** saves each comment's text, author, score, date, depth in the thread, parent comment and link, so you can rebuild the whole discussion. Paste post links, pick a sort order (best, top, new, controversial, old or Q\&A) and set how many comments you want per post. Use it as a Reddit comment scraper for **sentiment analysis**, **market research**, **brand monitoring**, **lead generation** or AI training data. No Reddit account, no API key.

### ✨ Features

- 💬 **Full threads**: top-level comments and replies, with `depth` and `parentId` to rebuild the tree.
- 🔀 **Sort orders**: Best, Top, New, Controversial, Old or Q\&A, the same as on Reddit.
- 🔗 **Any post link**: full links, `redd.it` short links or bare post IDs. The same post given twice is scraped once.
- 🙋 **OP replies flagged**: `isSubmitter` marks comments written by the post's author.
- 🧹 **No placeholders**: deleted comments without text are skipped and not charged.
- 📦 **Export anywhere**: JSON, CSV, Excel, or the API.

### 🛠️ How It Works

1. **Paste post links**, one per line.
2. **Pick a sort order** and **Max comments per post**.
3. **Run the Scraper** and download the comments as JSON, CSV or Excel, or pull them through the API.

### ⚙️ Input

| Field                     | What it does                                                                                 |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| **Post URLs**             | Reddit post links, `redd.it` links or post IDs, one per line.                                |
| **Sort comments by**      | Best (default), Top, New, Controversial, Old or Q\&A.                                         |
| **Max comments per post** | Stop after this many comments for each post. Default 50.                                     |
| **Proxy configuration**   | Residential proxies are needed. The default works.                                           |

```json
{
    "postUrls": [
        "https://www.reddit.com/r/IAmA/comments/z1c9z/",
        "https://redd.it/1x8kmu7"
    ],
    "sort": "top",
    "maxItems": 500
}
```

#### How many comments can I get?

Reddit first shows about 25 comments, then loads the rest in small batches. The Actor opens those batches, top-level comments first and then replies, until it reaches your limit. On a thread with 2,092 comments, a full run saved 1,440 comments with replies down to depth 5 (69% of the count) in about 5 minutes. The rest are comments that Reddit no longer shows to visitors who are not logged in (removed or deleted), plus replies below depth 5, which Reddit moves to separate "Continue this thread" pages. When a post has fewer comments than your limit, the status message tells you how many were found.

Up to a few hundred comments per post take well under a minute. A full 2,000-comment thread takes about 5 minutes.

### 💰 Pricing

Pay only for the comments you get. No monthly rental.

| Event           | Price                                    | What you get                                    |
| --------------- | ---------------------------------------- | ----------------------------------------------- |
| **Comment**     | $0.0008 per comment ($0.80 per 1,000)    | One comment with all fields below               |
| **Actor start** | $0.00005 per run                         | Charged once when the run starts.               |

Examples: 1,000 comments = $0.80 · 10,000 comments = $8.00. Removed posts and deleted comments without text are not charged.

### 📊 Sample Output Data

```json
{
    "id": "phfhty8",
    "postId": "1x8sr8s",
    "postTitle": "What’s a high paying but soul crushing career that people romanticize far too much?",
    "subreddit": "AskReddit",
    "parentId": "t3_1x8sr8s",
    "depth": 0,
    "author": "Dig_Carving",
    "body": "Any job with frequent air mileage. Brutal on health and relationships.",
    "score": 3905,
    "awards": 2,
    "createdAt": "2026-10-18T03:24:42.038Z",
    "url": "https://www.reddit.com/r/AskReddit/comments/1x8sr8s/comment/phfhty8/",
    "isSubmitter": false,
    "postUrl": "https://www.reddit.com/r/AskReddit/comments/1x8sr8s/whats_a_high_paying_but_soul_crushing_career_that/",
    "scrapedAt": "2026-10-21T10:29:14.778Z"
}
```

| Field         | Meaning                                                                                      |
| ------------- | -------------------------------------------------------------------------------------------- |
| `id`          | Comment ID                                                                                   |
| `parentId`    | `t3_<post id>` for a top-level comment, `t1_<comment id>` for a reply                        |
| `depth`       | 0 = top-level comment, 1 = reply to it, and so on                                            |
| `body`        | Comment text, with paragraph breaks                                                          |
| `score`       | Net upvotes                                                                                  |
| `isSubmitter` | The comment was written by the post's author (OP)                                            |
| `url`         | Permalink of the comment                                                                     |

### ❓ FAQ

**Do I need a Reddit account or API key?** No.

**Can I scrape Reddit comments for sentiment analysis?** Yes. Each row has the comment text, score and date; export to CSV or pull the dataset through the API into your analysis tool.

**How do I rebuild the comment tree?** Each reply's `parentId` is `t1_` plus the `id` of the comment it answers; top-level comments have `parentId` = `t3_` plus the post ID.

**Why are there fewer comments than the post's comment count?** Reddit's count includes removed and deleted comments, which are not shown, and very deep replies sit on separate pages. See "How many comments can I get?".

**Can I get the posts too?** This Actor saves comments. For posts of a subreddit, with or without their comments, use Reddit Subreddit Scraper; to find posts by keyword, use Reddit Search Scraper.

**Can I monitor new comments on a thread?** Yes. Schedule the Actor with sort "New" and a small limit; each run returns the newest comments.

# Actor input Schema

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

Reddit posts to get comments from, one per line: a post link (https://www.reddit.com/r/AskReddit/comments/1x8sr8s/...), a redd.it short link or a post ID.

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

Order in which comments are collected, as on Reddit. With a limit, this decides which comments you get first.

## `maxItems` (type: `integer`):

Stop after this many comments for each post. Top-level comments come first, then replies (see README for how deep a thread goes).

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

Residential proxies are needed for reliable results. The default works.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.reddit.com/r/IAmA/comments/z1c9z/",
    "https://redd.it/1x8kmu7"
  ],
  "sort": "best",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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/IAmA/comments/z1c9z/"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/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/IAmA/comments/z1c9z/"],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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