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

Export every comment of Reddit posts, nested replies included, as flat rows with depth, parent id, score and author. Paste post URLs or pick subreddits. Keyword and score filters, buying-intent tags, monitor mode for new comments. No proxy or API key. Pay only for results.

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

## Pricing

from $1.00 / 1,000 dataset items

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

Paste Reddit post links and get **every comment in the thread**, with all nested replies, as clean flat rows. Each row has the comment text, author, score, depth and parent id, so you can rebuild the tree or just read it in a spreadsheet. The scraper expands Reddit's "load more comments" and "continue this thread" links for you, up to the limit you set.

No Reddit account, API key or proxy needed. It reads Reddit the way the official mobile app does.

**Built for:**

- **Market and product researchers** reading what real users say in big discussion threads
- **Brand and community managers** exporting the reactions to a launch, an announcement or a viral post
- **Lead-gen agencies** finding commenters who ask for recommendations ("looking for", "alternative to")
- **AI and data teams** building sentiment, Q\&A or fine-tuning datasets from Reddit discussions

### What you get

One row per comment (`type: comment`), plus an optional header row per post (`type: post`).

#### Comment rows

| Field | Description |
| --- | --- |
| `id`, `url` | Comment id and permalink |
| `post_id`, `post_title`, `post_url` | The thread it belongs to |
| `parent_id` | What it replies to: `t3_…` = the post (top-level comment), `t1_…` = another comment |
| `depth` | 0 for top-level comments, 1 for replies to them, and so on |
| `text` | Comment body (markdown as written) |
| `author`, `author_id`, `is_submitter` | Who wrote it, and whether they are the original poster |
| `score`, `awards`, `distinguished`, `is_stickied` | Upvotes and moderator flags |
| `created_at` | ISO-8601 UTC timestamp |
| `subreddit` | Community name |
| `intent_matches` | Buying-intent phrases found in the comment (editable list) |
| `scraped_at` | When the row was collected |

#### Post rows (on by default, switch off with *Include a row for each post*)

`id`, `url`, `title`, `text`, `subreddit`, `subreddit_subscribers`, `author`, `score`, `upvote_ratio`, `num_comments`, `created_at`, `flair`, `is_nsfw`, `domain`, `external_url`, `media_urls`, `intent_matches`.

With *Enrich authors* on, rows also get `author_karma` and `author_created_at` (account creation date).

### Use cases

- **Launch and announcement feedback:** export all replies to your (or a competitor's) launch post and sort them by score.
- **Customer research:** pull the top threads of r/SaaS, r/smallbusiness or your niche every week and read the pain points in one sheet.
- **Lead generation:** set *Only comments containing* to "recommend, alternative, looking for" and get the people asking for a tool like yours.
- **Monitoring a thread:** schedule the actor on a long-running discussion with *Only new since last run* and receive only the new comments.
- **AI datasets:** question/answer pairs and opinion data with the thread structure kept (`parent_id`, `depth`).

### Input

| Field | Default | What it does |
| --- | --- | --- |
| `postUrls` | – | Reddit post links (`reddit.com/r/…/comments/<id>/…`, `redd.it/<id>`) or bare post ids |
| `subreddits` | – | Optional: read the threads of the top or newest posts of these subreddits instead |
| `listingSort`, `timeFilter` | top, week | Which subreddit posts (top of the week, hot, new, rising, controversial) |
| `maxPostsPerSubreddit` | 10 | Threads per subreddit |
| `maxCommentsPerPost` | 500 | Comments per thread (up to 10,000; "load more" links are expanded until this is reached) |
| `commentSort` | confidence | Reddit's comment order: best (confidence), top, new, controversial, old, qa |
| `minCommentScore` | – | Skip comments with fewer upvotes (skipped comments are not charged) |
| `commentKeywords` | – | Keep only comments containing one of these words or phrases |
| `includePostRows` | true | One `post` row per thread before its comments |
| `intentKeywords` | built-in list | Phrases tagged in `intent_matches` |
| `enrichAuthors` | false | Add author karma and account age (one extra call per new author, up to 300) |
| `onlyNewSinceLastRun` | false | Monitor mode: skip comments an earlier run with the same input already returned |
| `postedAfter`, `postedBefore` | – | Subreddit mode: only posts in this date range |
| `includeNsfw` | false | Subreddit mode: include NSFW posts (a post URL you paste is always scraped) |
| `maxItems` | 1000 | Stop after this many rows in total |
| `proxyConfiguration` | off | Optional Apify Proxy for very large runs |

#### Example input

```json
{
  "postUrls": ["https://www.reddit.com/r/webscraping/comments/1r5712p/"],
  "maxCommentsPerPost": 500,
  "commentSort": "top"
}
```

#### Example output (comment row)

```json
{
  "type": "comment",
  "id": "o5i30l4",
  "url": "https://www.reddit.com/r/webscraping/comments/1r5712p/scrapling_v04_is_here_effortless_web_scraping_for/o5i30l4/",
  "post_id": "1r5712p",
  "post_title": "Scrapling v0.4 is here - Effortless Web Scraping for the Modern Web",
  "parent_id": "t1_o5hjjyo",
  "depth": 1,
  "text": "I have fixed it, thanks for pointing that out",
  "subreddit": "webscraping",
  "author": "0xReaper",
  "is_submitter": true,
  "score": 12,
  "created_at": "2026-02-15T13:12:19Z",
  "intent_matches": [],
  "source": "comments"
}
```

### How many comments and how fast

The first request for a thread returns up to 200 comments; each "load more" expansion adds about 10–15. A thread with 1,000 comments takes about a minute. Reddit answers about 500 requests per 10 minutes per IP: without a proxy the actor waits when that limit is reached, with Apify Proxy it switches to a fresh IP instead. Deleted and removed comments are not returned, so a thread usually yields somewhat fewer rows than Reddit's comment counter shows.

### Scheduling and integrations

Schedule the actor in Apify Console (hourly, daily) with *Only new since last run* to follow a thread or a subreddit. Send results to Google Sheets, Slack, a webhook, Make or Zapier with Apify integrations, or read the dataset through the Apify API as JSON, CSV or Excel.

### Use with AI assistants

The actor can be called from AI agents through the Apify MCP server (`mcp.apify.com`): ask your assistant to "export the comments of this Reddit thread" and it runs the actor and reads the rows.

### FAQ

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

**Does it get all comments?** It returns every comment Reddit serves for the thread, up to `maxCommentsPerPost`, including collapsed replies. Deleted or removed comments are not served by Reddit.

**Can I scrape comments of many posts at once?** Yes, paste as many post URLs as you like, or use subreddits to pick threads automatically.

**Is NSFW content included?** Posts you paste by URL are always scraped. In subreddit mode NSFW posts are skipped unless you switch on *Include NSFW*.

**Some fields are empty.** Reddit's current app API no longer exposes `controversiality`, author flair and edit time for comments, so those columns stay empty.

**Is scraping Reddit legal?** The actor reads publicly visible content without logging in. You are responsible for how you use the data, including Reddit's terms and privacy laws such as the GDPR.

# Actor input Schema

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

Reddit post links (https://www.reddit.com/r/<sub>/comments/<id>/...), short links (redd.it/<id>) or bare post ids. Every comment of each post is returned, replies included.

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

Instead of (or besides) post URLs: scrape the comment threads of the top or newest posts of these subreddits, e.g. 'webscraping' or 'r/SaaS'.

## `listingSort` (type: `string`):

Only used with 'Subreddits'.

## `timeFilter` (type: `string`):

Time window for 'Top' and 'Controversial' subreddit posts.

## `maxPostsPerSubreddit` (type: `integer`):

How many posts per subreddit to read comments from.

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

Upper limit per post. 'Load more' links and collapsed replies are expanded until this many comments are collected or the thread is exhausted.

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

Which comments come first when a post has more than the cap.

## `minCommentScore` (type: `integer`):

Skip comments with fewer upvotes than this (skipped comments are not charged). Leave empty to keep all.

## `commentKeywords` (type: `array`):

Keep only comments whose text contains at least one of these words or phrases (case-insensitive). Leave empty to keep all.

## `includePostRows` (type: `boolean`):

Adds one 'post' row (title, text, score, comment count) per thread before its comments.

## `intentKeywords` (type: `array`):

Phrases that mark a buyer, seeker or complaint. Every post and comment gets an `intent_matches` list of the phrases it contains (case-insensitive, whole words). Clear the list to disable.

## `enrichAuthors` (type: `boolean`):

Add `author_karma`, `author_created_at` and `author_is_verified` to every post and comment (one extra API call per distinct author, up to 300 per run). Useful for ranking leads by account age and activity.

## `onlyNewSinceLastRun` (type: `boolean`):

Monitor mode: skip comments that an earlier run with the same input already returned, so a scheduled run only delivers new comments.

## `postedAfter` (type: `string`):

Subreddit mode: only posts created on or after this date (YYYY-MM-DD).

## `postedBefore` (type: `string`):

Subreddit mode: only posts created on or before this date (YYYY-MM-DD).

## `includeNsfw` (type: `boolean`):

Keep posts marked over-18.

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

Stops the run after this many rows (posts + comments).

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

Optional. Without a proxy the actor runs at Reddit's limit of about 500 API calls per 10 minutes per IP and waits when it is reached. Enable Apify Proxy for runs over many large threads: the actor switches to a fresh IP instead of waiting.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.reddit.com/r/webscraping/comments/1r5712p/"
  ],
  "listingSort": "top",
  "timeFilter": "week",
  "maxPostsPerSubreddit": 10,
  "maxCommentsPerPost": 500,
  "commentSort": "confidence",
  "includePostRows": true,
  "intentKeywords": [
    "looking for",
    "recommend",
    "recommendation",
    "alternative to",
    "alternatives to",
    "best tool",
    "best way to",
    "any suggestions",
    "suggestions?",
    "how do i",
    "how do you",
    "what do you use",
    "is there a",
    "is there any",
    "worth it",
    "pricing",
    "too expensive",
    "switch from",
    "switching from",
    "need help",
    "anyone know",
    "does anyone",
    "hire",
    "hiring",
    "freelancer",
    "for hire",
    "frustrated",
    "hate that",
    "wish there was"
  ],
  "enrichAuthors": false,
  "onlyNewSinceLastRun": false,
  "includeNsfw": false,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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/webscraping/comments/1r5712p/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/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/webscraping/comments/1r5712p/"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/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/webscraping/comments/1r5712p/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call axlymxp/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

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