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

Extract every comment from any Reddit post URL — including collapsed, hidden, and deeply nested replies. Get comment text, author, upvotes, depth level, controversiality, reply counts, and timestamps. Filter by date. Flattened output with full thread context. No login or cookies needed.

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

## Pricing

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

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 — Discussion Replies and Thread Data

Export public comments and replies from Reddit post URLs. Collect discussion text, author names, scores, timestamps and reply relationships for research and conversation analysis.

### Quick start

1. Open an example below or enter your own public Reddit targets.
2. Choose a per-target result limit and `maxItems` for the whole run.
3. Run the Actor and export the dataset as JSON, CSV or Excel.

```json
{
  "postUrls": [
    "https://www.reddit.com/r/AskReddit/comments/1x3uinu/"
  ],
  "maxComments": 20,
  "maxItems": 21
}
```

### Example tasks

Copy a ready-to-use configuration and customize its targets or limits:

- [Export an AskReddit conversation with its post](https://apify.com/scrapesmith/reddit-comments-scraper/examples/reddit-comments-export-askreddit-conversation)
- [Collect Reddit comments for text analysis](https://apify.com/scrapesmith/reddit-comments-scraper/examples/reddit-comments-comments-only-text-analysis)
- [Sample five replies from a Reddit discussion](https://apify.com/scrapesmith/reddit-comments-scraper/examples/reddit-comments-sample-five-discussion-replies)
- [Collect a larger Reddit discussion research sample](https://apify.com/scrapesmith/reddit-comments-scraper/examples/reddit-comments-collect-discussion-research-sample)
- [Collect Reddit comments after a chosen date](https://apify.com/scrapesmith/reddit-comments-scraper/examples/reddit-comments-filter-comments-by-date)
- [Prepare Reddit replies for an AI summary](https://apify.com/scrapesmith/reddit-comments-scraper/examples/reddit-comments-prepare-replies-for-ai-summary)

### Inputs

| Input | Type | Purpose |
|---|---|---|
| `postUrls` | array | List of Reddit post URLs to scrape comments from, e.g. https://www.reddit.com/r/python/comments/abc123/title/ |
| `maxComments` | integer | Maximum number of comments to fetch for each post URL. |
| `commentDateLimit` | string | Only include comments posted on or after this date (format: YYYY-MM-DD). Leave empty to disable. |
| `skipPostData` | boolean | If enabled, the post itself is not included in the output — only its comments. |
| `maxItems` | integer | Maximum total dataset rows across all inputs, including any profile, community or original-post rows. |

### Output fields

| Field | Description |
|---|---|
| `id` / `parsedId` | Reddit's internal comment ID |
| `postUrl` | URL of the parent post |
| `postTitle` | Title of the parent post |
| `parentId` | ID of the parent comment (or post, for top-level comments) |
| `username` | Comment author |
| `body` | Full comment text |
| `upVotes` | Comment score |
| `depth` | Nesting depth in the comment tree |
| `controversiality` | Reddit's controversiality flag |
| `isSubmitter` | Whether the commenter is the original poster |
| `isStickied` | Whether the comment is pinned |
| `isScoreHidden` | Whether the score is hidden by Reddit |
| `isLocked` | Whether the comment thread is locked |
| `distinguished` | Moderator/admin distinguished status |
| `authorFlair` | Commenter's subreddit flair |
| `communityName` | Subreddit the comment belongs to |
| `url` | Direct permalink to the comment |
| `createdAt` | Comment creation timestamp (ISO format) |
| `scrapedAt` | Time the data was scraped |
| `numberOfreplies` | Number of direct replies to this comment |
| `dataType` | `post` or `comment` |

Optional fields depend on the record type and what Reddit makes public. Deleted authors, unavailable media and absent profile details can have empty values. Scores and comment counts are snapshots, not permanent totals.

### API, MCP and AI workflows

Use the Actor through the [Apify API](https://docs.apify.com/api/v2) or select it in the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). An AI agent can supply the same JSON inputs shown above, then use the returned dataset for summarization, classification or research. Sentiment analysis and summaries are downstream tasks; this Actor returns source data.

Connect datasets to n8n, Make, Zapier or your own Python and JavaScript workflows. Use Apify schedules for recurring runs and webhooks to trigger processing after completion. ChatGPT, Claude and LangChain workflows can consume the exported data through their configured integrations.

### Limits and frequently asked questions

**Do I need a Reddit account?** No Reddit login or personal Reddit API key is required. Apify API calls require your own Apify token.

**How many results can I collect?** The free allowance is 25 dataset rows. Paid runs honor your input and platform result limits, with a 100,000-row dataset ceiling. Per-target limits do not override the total cap. Set your Apify run timeout and budget to suit the job.

**Does a requested maximum guarantee that many rows?** No. Public availability, source pagination, filtering, duplicate removal and deleted content can reduce the count. This is not a complete historical archive.

**Are results unique?** IDs are deduplicated across the inputs in a run. Separate new runs can return the same records; use their IDs when maintaining a historical database.

**Can bulk runs continue while producing results?** Yes. There is no fixed internal runtime, request-count or page-count cutoff. Requested result limits still apply. Repeated failures, unavailable data or pagination without progress stop collection while preserving confirmed results.

**What does resume mean?** Saved checkpoints support continuation of the same run. Starting a fresh run creates a new dataset and does not automatically resume an older run.

**What is the price?** Check the current Pricing tab on this Actor. Your plan, result allowance and run budget determine which limits apply.

# Actor input Schema

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

List of Reddit post URLs to scrape comments from, e.g. https://www.reddit.com/r/python/comments/abc123/title/

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

Maximum number of comments to fetch for each post URL.

## `commentDateLimit` (type: `string`):

Only include comments posted on or after this date (format: YYYY-MM-DD). Leave empty to disable.

## `skipPostData` (type: `boolean`):

If enabled, the post itself is not included in the output — only its comments.

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

Hard cap on the total number of items (posts + comments) returned across all URLs.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.reddit.com/r/AskReddit/comments/1unskql/whats_cool_when_youre_1822_but_embarrassinglame/"
  ],
  "maxComments": 500,
  "skipPostData": false
}
```

# 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/AskReddit/comments/1unskql/whats_cool_when_youre_1822_but_embarrassinglame/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesmith/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/AskReddit/comments/1unskql/whats_cool_when_youre_1822_but_embarrassinglame/"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapesmith/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/AskReddit/comments/1unskql/whats_cool_when_youre_1822_but_embarrassinglame/"
  ]
}' |
apify call scrapesmith/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

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