# Reddit Comments Scraper: Body, Author, Score & Depth (`scrapers_lat/reddit-comments-scraper`) Actor

Scrape every comment from any Reddit post or subreddit, including nested replies. Extract body text, author, score, awards, controversiality, depth and parentId to rebuild the thread. Export to JSON, CSV or Excel. No API key.

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

## Pricing

from $6.15 / 1,000 results

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: Body, Author, Score & Depth](https://scrapers.lat/banners/reddit-comments-scraper.png)](https://console.apify.com/actors/aufsURfBwo2u5pYqc/input)

## Reddit Comments Scraper: Body, Author, Score & Depth

The most complete Reddit comments scraper available. It returns every comment field Reddit exposes, including body, author and author fullname, flair, score, controversiality, awards, thread depth, parent ID and edit timestamp, so you can rebuild the full comment tree from post URLs or a subreddit's recent posts.

Here is one real result, with every field the actor returns:

```json
{
  "id": "ndjx0ts",
  "body": "At least 1 and sadly that isn't even a joke.",
  "author": "Microphone_Assassin",
  "authorFullname": "t2_627cu",
  "authorFlairText": null,
  "score": 194,
  "controversiality": 0,
  "totalAwards": 0,
  "postId": "1ndskqc",
  "postTitle": "Why do you think President Trump ordered all US Flags at half staff for the death of a Political Commentator, but not for the death of actual Legislators?",
  "postUrl": "https://www.reddit.com/comments/1ndskqc/",
  "subreddit": "AskReddit",
  "parentId": "t1_ndjqwi1",
  "isTopLevel": false,
  "depth": 6,
  "isSubmitter": false,
  "isStickied": false,
  "edited": "2025-09-11T00:55:06.000Z",
  "permalink": "https://www.reddit.com/r/AskReddit/comments/1ndskqc/why_do_you_think_president_trump_ordered_all_us/ndjx0ts/",
  "createdAt": "2025-09-11T00:48:25.000Z",
  "observedAt": "2026-08-03T02:52:27.304Z",
  "error": null
}
```

### What it does

The actor pulls comments from the Reddit post URLs you provide, or from the recent posts of the subreddits you name, sorts them the way you choose, walks the reply tree to the depth you set, and writes one normalized record per comment to the run's dataset. Each record carries the comment body, author and author fullname, score, controversiality, awards, thread depth, parent ID, edit status and a direct permalink, so you can reconstruct the whole discussion.

You can combine post URLs and subreddits in one run. Reddit dates are normalized to ISO 8601, and missing values are returned as `null`.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the top comments from one AskReddit post.

```json
{
  "maxComments": 50,
  "postUrls": ["https://www.reddit.com/r/AskReddit/comments/1ndskqc/"],
  "sort": "top"
}
```

### Billing and limits

- **Pay per result.** You are charged per comment record returned (`result` event). See the [pricing tab](https://apify.com/scrapers_lat/reddit-comments-scraper/pricing) for the current per-result price.
- **No charge on failure.** If a run errors, the actor writes a single item with a populated `error` field and does not charge for it. Empty runs cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 comments per run. Upgrade for higher `maxComments`.
- **Depth affects volume.** A larger `maxDepth` walks deeper reply trees and returns more comments per post.

### FAQ and troubleshooting

**A run returned an error like "post not found". Why?**
The post may have been deleted, removed, or made private since it was linked. Provide a live post URL. Failed runs are not charged.

**How do I get only top-level comments?**
Set `maxDepth` to `0`. Use `1` to include direct replies, and leave it empty to walk the whole tree.

**Can I pull comments from a whole subreddit?**
Yes. List subreddit names in `subreddits` and the actor pulls comments from their recent posts. Combine with `postUrls` in the same run.

**Is this an official Reddit tool?**
No. This actor is independent and has no affiliation with Reddit. It reads only data that is publicly available on reddit.com.

# Actor input Schema

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

Maximum number of comments to collect. Optional.

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

How deep to walk reply threads. 0 = top-level comments only, 1 = top-level plus direct replies, and so on. Leave empty to walk every level.

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

Reddit post permalinks to pull comments from (https://www.reddit.com/r/<sub>/comments/<id>/...).

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

Subreddit names (with or without r/) to pull comments from their recent posts.

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

How to sort comments within each post.

## Actor input object example

```json
{
  "maxComments": 10,
  "postUrls": [
    "https://www.reddit.com/r/AskReddit/comments/1ndskqc/"
  ],
  "subreddits": [],
  "sort": "top"
}
```

# 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 = {
    "maxComments": 10,
    "postUrls": [
        "https://www.reddit.com/r/AskReddit/comments/1ndskqc/"
    ],
    "subreddits": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/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 = {
    "maxComments": 10,
    "postUrls": ["https://www.reddit.com/r/AskReddit/comments/1ndskqc/"],
    "subreddits": [],
}

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

```

## MCP server setup

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