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

Export every comment of any Reddit post: full reply trees with depth, parent IDs, scores, authors and dates, plus the post itself. Paste links or search by keyword.

- **URL**: https://apify.com/automly/reddit-post-comments-scraper.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Categories:** Social media, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 94.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.59 / 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 Post Comments Scraper

### What is Reddit Post Comments Scraper?

**Reddit Post Comments Scraper** exports **every comment of any Reddit post**: full reply trees with depth, parent comment, score, author and dates, plus one row for the post itself. Paste post links (or search by keyword), click **Start**, and download the comments as Excel, CSV or JSON.

- 🧵 **Whole threads:** opens the replies Reddit folds away behind "more replies" and "continue this thread"
- 🌳 **Rebuild the tree:** every comment carries its depth and the ID of the comment it answers
- 🔎 **No links? Search:** enter keywords and get the comments of the matching posts
- 🔓 **No login:** no Reddit account, cookies or API key needed

### What can Reddit Post Comments Scraper do?

- Scrape all comments and replies from one Reddit post or thousands
- Accept full post links, short links (`redd.it/...`) and bare post IDs
- Sort comments by **best, top, new, old, controversial or Q\&A**
- Export only the post rows (title, author, score, comment count) to pick threads first
- Find posts by keyword (with Reddit's search syntax) and export their comments
- Download to Excel, CSV, JSON, HTML or XML, or send the data to Google Sheets, Make, Zapier and more

### What data can you extract from Reddit comments?

| | | |
|---|---|---|
| 💬 Comment text | 👤 Author and author ID | ⬆️ Score |
| 📅 Created and edited dates | 🪜 Reply depth | ↩️ Parent comment ID |
| 🧮 Number of replies | 🙋 Written by the post author | 📌 Pinned and locked flags |
| 🛡️ Moderator or admin | 🏷️ Author flair | 🌐 Language |
| 🔗 Comment link | 📰 Post title and subreddit | 🧾 Post score, upvote ratio, comment count, media |

### How to scrape Reddit post comments

1. Click **Try for free**.
2. Paste a post link into **Post URL or ID** (or several into **More post URLs or IDs**).
3. Set **Max comments per post** (0 = every comment) and turn on **Expand all reply threads** for the complete tree.
4. Click **Start** and download your data from the **Output** tab.

### ⬇️ Input

| Setting | What it does |
|---|---|
| Post URL or ID | One Reddit post: a full link, a short link or the post ID |
| More post URLs or IDs | More posts, one per line; they are read side by side |
| Search keywords | Used when no link is given: the comments of the posts matching each keyword |
| Max posts per keyword | How many matching posts per keyword (1-250, default 25) |
| Keyword sort order | Which matching posts to take: most relevant, top, newest, hot or most comments |
| Comment sort order | Best (default), top, new, old, controversial or Q\&A |
| Max comments per post | The most comments per post (default 200; 0 = every comment) |
| Expand all reply threads | Also open every collapsed reply chain, for the complete tree |
| Posts only (no comments) | Only the post rows |
| Include the post row | One row with the post before its comments (on by default) |

```json
{
    "postUrl": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/",
    "postUrls": ["https://www.reddit.com/r/AskReddit/comments/1xggpqu/", "redd.it/1xmyviu"],
    "sort": "top",
    "maxCommentsPerPost": 0,
    "expandAllComments": true
}
```

### ⬆️ Output

Each post gives one **post** row and its **comment** rows. Posts are read side by side, so rows of different posts can interleave: group them by `_post_id`.

```json
{
    "_type": "comment",
    "_post_id": "t3_1xggpqu",
    "id": "t1_19rpmp65cp6gz",
    "parentId": null,
    "depth": 0,
    "author": "jawndell",
    "authorId": "t2_4v94pk8h",
    "body": "Currently on an international first class flight with lie flat seats. I get it.",
    "score": 24165,
    "createdAt": "2026-10-27T02:55:22.874000+0000",
    "editedAt": null,
    "childCount": 437,
    "permalink": "/r/AskReddit/comments/1xggpqu/whats_a_rich_people_thing_you_tried_once_and/19rpmp65cp6gz/",
    "url": "https://www.reddit.com/r/AskReddit/comments/1xggpqu/whats_a_rich_people_thing_you_tried_once_and/19rpmp65cp6gz/",
    "isSubmitter": false,
    "isStickied": false,
    "distinguishedAs": null,
    "languageCode": "en",
    "subreddit": "AskReddit",
    "postTitle": "What's a 'rich people' thing you tried once and immediately understood why they do it?"
}
```

`parentId` is `null` for a top-level comment and the ID of the answered comment for a reply, so `id` + `parentId` rebuild the whole tree. The post row has the title, author, subreddit and its subscribers, score, upvote ratio, comment count, dates, text, link, flair, image, video and gallery links.

### How can I use Reddit comments data?

- **Market and product research:** read what people really say about a product, brand or competitor
- **Sentiment analysis:** score comments and weigh them by their votes
- **AI and LLM data:** collect real question-and-answer threads for training or evaluation
- **Academic research:** study how discussions branch and develop over time
- **Customer support insight:** find recurring problems in support and feedback threads

### Use it from your own code

Run it through the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients, schedule it, or connect it to Make, Zapier, n8n or Google Sheets. AI agents can call it through the Apify MCP server.

### Scrape more Reddit data

| Actor | What it does |
|---|---|
| [Reddit Search Scraper](https://apify.com/automly/reddit-search-scraper) | Posts and comments matching your keywords, across Reddit or inside chosen subreddits |
| [Reddit Scraper](https://apify.com/automly/reddit-ultimate-scraper) | Subreddits, users, posts and search in one actor |

### ❓FAQ

#### How many comments can I get from one post?

All of them that Reddit shows. Set **Max comments per post** to 0 and turn on **Expand all reply threads**. A thread of 5,789 comments returned 5,535 comments in about a minute.

#### Why do I get fewer comments than the number shown on the post?

Reddit's count includes deleted, removed and spam-filtered comments that nobody can read, and on some very busy threads Reddit stops listing comments before the end. With **Expand all reply threads** on, such a thread is read a second time in another order to reach more of them. Most busy threads we measured return 94-97% of Reddit's count; on one where Reddit stopped early, the second read lifted it from 54% to 83%. Deleted comments have no text, so they are left out; the replies under them are kept (their `parentId` then points to a comment that is not in the data).

#### What happens with a deleted post or a wrong link?

The post is reported as not found in the run's log and summary, and the run still finishes successfully with the other posts. You are charged only for rows you get.

#### Do I need a Reddit account?

No. The actor reads public Reddit pages only. Private and quarantined communities cannot be read.

#### Is it legal to scrape Reddit?

This actor collects public data only. Personal data is protected by laws such as the GDPR; scrape it only with a legitimate reason, and check Reddit's terms and your local rules. If unsure, ask a lawyer.

# Actor input Schema

## `postUrl` (type: `string`):

One Reddit post, e.g. https://www.reddit.com/r/IAmA/comments/z1c9z/, redd.it/z1c9z or z1c9z.

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

More posts, one per line, e.g. https://www.reddit.com/r/AskReddit/comments/1xggpqu/. Full links, short links (redd.it/<id>) and IDs all work. Posts are read side by side.

## `queries` (type: `array`):

No links? Enter keywords, e.g. best CRM for startups, and the comments of the matching posts are exported. Reddit's search syntax works: "exact phrase", OR, -exclude, subreddit:name, title:word. Ignored when post links are given.

## `maxPostsPerQuery` (type: `integer`):

How many matching posts to export comments from, per keyword (1-250).

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

Which matching posts a keyword picks: Reddit's most relevant, top-voted, newest, hot or most-commented.

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

How each post's comments are ordered. Best is Reddit's default.

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

The most comments exported from each post, e.g. 500. Set 0 for every comment.

## `expandAllComments` (type: `boolean`):

Also open every collapsed reply chain ("more replies", "continue this thread") so the whole tree is exported. Without it, deep replies Reddit folds away are skipped.

## `postsOnly` (type: `boolean`):

Export only the post rows (title, author, score, comment count, dates), no comments.

## `includePost` (type: `boolean`):

Export one row with the post itself before its comments. Turn off to get comments only.

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

Proxy servers used to reach Reddit. The default works for most runs.

## Actor input object example

```json
{
  "postUrl": "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/",
  "maxPostsPerQuery": 25,
  "searchSort": "relevance",
  "sort": "best",
  "maxCommentsPerPost": 200,
  "expandAllComments": false,
  "postsOnly": false,
  "includePost": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Every post and comment row of this run.

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

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

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

```

## MCP server setup

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