# Reddit Comments Scraper (`automly/reddit-comment-scraper`) Actor

Reddit Comments Scraper: Scrape Reddit comments from any post or from the top posts of a subreddit. Just add post links or subreddit names and get comment text, author, score, reply depth and date, in any Reddit sort order. No login. Export to Excel, CSV or JSON.

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

## Pricing

$4.50 / 1,000 comment produceds

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 - Post Threads & Subreddits

### What is Reddit Comments Scraper?

**Reddit Comments Scraper** is a tool that lets you **scrape comments and replies from Reddit posts**: comment text, author, score, date, reply depth and parent comment. Paste post links or add subreddits, click **Start**, and download the comments as Excel, CSV or JSON.

- 🧵 **Full threads:** includes the replies hidden behind "load more comments" on large threads
- 🗂️ **Subreddit mode:** add a subreddit and get the comments of its hot, new, top or rising posts
- 🔓 **No login:** no Reddit account, cookies or API key needed
- 💸 **Free to try:** the $5 of free usage every Apify account gets each month covers about 1,100 comments

### What can Reddit Comments Scraper do?

- Scrape all comments from a Reddit post
- Scrape **replies** too, each linked to the comment it answers
- Scrape up to **10,000 comments from each post**
- Scrape comments from the **latest or top posts of a subreddit**
- Sort Reddit comments by **best, top, new, controversial, old or Q\&A**
- Leave out deleted and removed comments, while keeping the replies under them
- Download Reddit comments to Excel, CSV, JSON, HTML or XML, or send them to Google Sheets, Make, Zapier and more

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

| | | |
|---|---|---|
| 💬 Comment text | 👤 Author username | ⬆️ Score |
| 📅 Publish date | ✏️ Edited flag and time | ↩️ Parent comment or post |
| 🪜 Reply depth | 🙋 Written by the post author | 📌 Pinned flag |
| 🛡️ Moderator flag | 🏆 Awards | 🙈 Collapsed flag and reason |
| 🔗 Comment link | 🏠 Subreddit | 🆔 Comment ID |
| 📰 Post ID | | |

### How to scrape Reddit comments

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **Reddit Comments Scraper**.
3. Paste one or more **post URLs**, or add **subreddits** to scrape the comments of their posts.
4. Choose the comment sort and how many comments you want, then click **Start**.
5. When the run finishes, download your comments as Excel, CSV, JSON, HTML or XML.

### How much does it cost to scrape Reddit comments?

Reddit Comments Scraper costs **$4.50 per 1,000 comments**. You pay only for the comments you get, and the same comment is never charged twice in a run.

For example, **1,000 comments cost $4.50**, and a post with 200 comments costs $0.90.

Every Apify account gets **$5 of free usage each month**, which covers about 1,100 comments. See the **Pricing** tab for the details.

### ⬇️ Input

There are two ways to use it. Paste **post links** to get the comments of those posts. Or leave the post links empty and add **subreddits**: the scraper picks the posts each subreddit shows and gets their comments. When you add post links, the subreddits are ignored.

Post links can be full links (`https://www.reddit.com/r/Python/comments/1w78kp5/showcase_thread/`) or just the post ID (`1w78kp5`). Subreddits can be a name (`python`), `r/python` or a full link.

| Setting | What it does |
|---|---|
| Post URLs or IDs | The posts to scrape comments from |
| Subreddits | Scrape comments from the posts of these subreddits (used only when no post link is given) |
| Post Sort (Subreddit Mode) | Which posts to pick from each subreddit: Hot (default), New, Top (all time) or Rising |
| Comment Sort | How comments are ordered: Confidence (Best) (default), Top, New, Controversial, Old or Q\&A |
| Max Comments | How many comments to get from each post link, from 1 to 10,000 (default 500). In subreddit mode, it is the total for the whole run, shared between the subreddits and their posts |
| Max Posts (Subreddit Mode) | How many posts to pick from each subreddit, from 1 to 100 (default 25) |

Example: every comment of one post, top comments first.

```json
{
  "postUrls": ["https://www.reddit.com/r/Python/comments/1w78kp5/showcase_thread/"],
  "commentSort": "top",
  "maxComments": 2000
}
```

Example: comments from the 10 newest posts of r/python.

```json
{
  "subreddits": ["python"],
  "sortBy": "new",
  "maxPosts": 10,
  "maxComments": 1000
}
```

### ⬆️ Output

You get one row per comment or reply. You can view the rows as a table in Apify Console or download them as Excel, CSV, JSON, HTML or XML. Here is a real reply:

```json
{
  "commentId": "p98s2ib",
  "postId": "1w78kp5",
  "parentId": "p7tzztd",
  "author": "hojat72elect",
  "body": "It's really fast and responsive. Well done! 👍🏼 \nThe UI looks nice as well.",
  "bodyHtml": null,
  "score": 1,
  "createdUtc": 1789164716,
  "edited": false,
  "depth": 1,
  "subreddit": "Python",
  "permalink": "/r/Python/comments/1w78kp5/showcase_thread/p98s2ib/",
  "isSubmitter": false,
  "stickied": false,
  "distinguished": null,
  "controversiality": null,
  "gilded": 0,
  "gildings": {},
  "totalAwardsReceived": 0,
  "collapsed": false,
  "collapsedReason": null
}
```

`depth` is 0 for a top-level comment, 1 for a reply to it, and so on. `parentId` is the comment a reply answers; for a top-level comment it is the post ID. `createdUtc` is the publish time in seconds since 1 January 1970 (UTC), and `isSubmitter` is true when the post's author wrote the comment.

Each run also saves a short report that lists any post or subreddit it could not scrape, with the reason (for example, a link that is not a Reddit post, or a private subreddit).

### How can I use Reddit comments data?

- **Audience research:** read what people really think about a product, topic or launch
- **Brand monitoring:** track what people say about your brand in the threads that matter to you
- **Product feedback:** collect feature ideas and complaints from a product's community
- **Sentiment analysis and AI:** build comment datasets for sentiment, topic or opinion analysis
- **Discussion analysis:** follow how a debate unfolds, reply by reply, with depth and parent links
- **Community management:** find the most upvoted and most controversial comments in a thread

### How to follow a Reddit discussion

1. Paste the post link and set **Comment Sort** to **New**.
2. Set **Max Comments** high enough to cover the whole thread.
3. [Schedule the actor](https://docs.apify.com/platform/schedules) to run every hour or every day.

Each run gives you the thread as it is now, ready to send to Slack, email or a spreadsheet with an [integration](https://apify.com/integrations).

### Use it from your own code

You can run Reddit Comments Scraper with the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("automly/reddit-comment-scraper").call(run_input={
    "postUrls": ["https://www.reddit.com/r/Python/comments/1w78kp5/showcase_thread/"],
    "maxComments": 1000,
})
for comment in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(comment["depth"], comment["author"], comment["body"])
```

### Scrape more Reddit data

| Actor | What it does |
|---|---|
| [Reddit Scraper - Posts, Comments, Users, Subreddits & Search](https://apify.com/automly/reddit-ultimate-scraper) | The all-in-one Reddit scraper: posts, full comment threads, user profiles, subreddits and search |
| [Reddit Scraper - Posts, Search & Subreddits](https://apify.com/automly/reddit-scraper) | Posts from any subreddit, sorted by hot, new, top or rising, or searched by keyword |
| [Reddit Keyword + Comment Thread Monitor](https://apify.com/automly/reddit-keyword-comment-monitor) | Posts and comments that mention your keywords, across the subreddits you choose |

### ❓FAQ

#### How much does it cost to scrape Reddit comments?

$4.50 per 1,000 comments, and you pay only for the comments you get. Every Apify account gets $5 of free usage each month. See [the cost section above](#how-much-does-it-cost-to-scrape-reddit-comments) and the **Pricing** tab.

#### How many comments can I scrape from one Reddit post?

Up to 10,000 comments from each post link. Large threads work, including the replies hidden behind "load more comments". Set **Max Comments** to the number you need.

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

Deleted and removed comments are left out, so the count on the post is often a little higher. The replies under a deleted comment are still included.

#### Why are `bodyHtml` and `controversiality` empty?

Reddit no longer provides these two fields. They stay in every row (as `null`) so your existing integrations keep working; use `body` for the comment text.

#### How does subreddit mode share out the comments?

In subreddit mode, **Max Comments** is the total for the run. It is split evenly between your subreddits, and then between the posts picked from each subreddit. To get more comments per post, raise **Max Comments** or lower **Max Posts (Subreddit Mode)**.

#### Do I need a Reddit account or API key?

No. You don't need a Reddit account, cookies or a Reddit API key.

#### Can I scrape comments from private subreddits?

No. Only public posts and subreddits can be scraped. Posts in private, banned or quarantined subreddits and links that are not Reddit posts are skipped and listed in the run report with the reason.

#### Can I connect Reddit Comments Scraper to other tools or AI agents?

Yes. You can start runs and read the results with the Apify API or the Python and JavaScript clients. You can also send the comments to Make, Zapier, n8n, Google Sheets or Slack, or call a webhook when a run finishes, with [Apify integrations](https://apify.com/integrations). AI assistants and agents can use Reddit Comments Scraper through the [Apify MCP server](https://mcp.apify.com).

#### Is it legal to scrape Reddit?

This scraper only collects comments that people chose to post publicly. It does not collect private data such as email addresses or phone numbers. Comments can still contain personal data, which may be protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

Reddit Comments Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by Reddit.

#### Something isn't working. What should I do?

Open the **Issues** tab and tell us the post link or subreddit, your settings and what you expected.

### ⭐ Your feedback

Have an idea or found a problem? Tell us on the **Issues** tab. If Reddit Comments Scraper saved you time, a short review on the **Reviews** tab helps other people find it.

# Actor input Schema

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

List of Reddit post URLs or base-36 post IDs to scrape comments from. Leave empty to use Subreddits mode instead.

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

List of subreddits to discover top posts and scrape their comments. Ignored if Post URLs are provided.

## `sortBy` (type: `string`):

How to sort the posts discovered in each subreddit.

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

How to sort comments within each post.

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

Maximum comments to return from each post URL; in subreddit mode, the total shared between the subreddits and their posts (1-10000).

## `maxPosts` (type: `integer`):

Maximum number of top posts to discover per subreddit (1-100)

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

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

## Actor input object example

```json
{
  "postUrls": [],
  "subreddits": [
    "python"
  ],
  "sortBy": "hot",
  "commentSort": "confidence",
  "maxComments": 500,
  "maxPosts": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `records` (type: `string`):

All comments produced by 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 = {
    "postUrls": [],
    "subreddits": [
        "python"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/reddit-comment-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": [],
    "subreddits": ["python"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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