# 🔴 Reddit Scraper — Posts, Comments & Data (`nexgendata/reddit-scraper`) Actor

Extract posts, comments & subreddit data from Reddit. Monitor brand mentions, track discussions & build social listening tools. Get upvotes, awards & comment threads. Pay per post.

- **URL**: https://apify.com/nexgendata/reddit-scraper.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** Social media, AI
- **Stats:** 6 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🟧 Reddit Scraper — Posts, Comments, Subreddit & User Data

Extract structured data from any Reddit subreddit, search query, post URL, or user profile — including posts, full comment trees, scores, awards, flairs, and author metadata. Built as a pay-per-result **alternative to** Reddit's official API (OAuth-gated + 100 req/min), Pushshift (often offline), Brandwatch ($800/mo), Brand24 ($79-499/mo), and BuzzSumo for sentiment analysis, audience research, and competitive intel.

### Why Reddit Scraper Beats Reddit API, Pushshift, Brandwatch & Brand24

| Feature | NexGenData Reddit Scraper | Reddit API | Pushshift | Brandwatch | Brand24 |
|---|---|---|---|---|---|
| Cost | $0.002 / item, pay-per-result | Free but OAuth + 100/min | Free (often down) | $800+ / month | $79-499 / month |
| Posts per subreddit | Unlimited | Capped at 1,000 historical | Historical archive | Plan-gated | Plan-gated |
| Full comment trees | Yes | Yes (extra calls) | Yes | Limited | Limited |
| Search across all of Reddit | Yes | Yes | Yes | Yes | Yes |
| User-profile scrape | Yes | Yes (OAuth required) | Yes | Limited | Limited |
| Bulk export | JSON / CSV / Excel | DIY | DIY | Plan-gated | CSV |
| Auth required | Apify token | OAuth client + dev account | None (when up) | Account + plan | Account + plan |
| Monthly minimum | None | None | None | $800+ | $79+ |

Most researchers + marketing teams pick this actor **instead of** Reddit's official API because OAuth setup + the 100-req/min cap make any deep historical dive painful. **Cheaper than** Brandwatch for the Reddit slice and a **drop-in alternative to** Pushshift now that it's permanently rate-limited and frequently offline.

### What You Get

**Per post:**
- `id`, `subreddit`, `permalink`, `url`, `title`, `selftext`
- `author`, `author_id`, `author_premium`
- `score`, `upvote_ratio`, `num_comments`, `num_awards`
- `created_utc`, `flair`, `is_self`, `is_video`, `is_oc`, `is_nsfw`
- `media_url`, `thumbnail`

**Per comment (when enabled):**
- `id`, `parent_id`, `post_id`, `subreddit`
- `author`, `body`, `score`, `controversiality`
- `created_utc`, `depth`, `is_submitter`, `gilded`

### Use Cases

- **Brand / competitor monitoring** — track mentions across all of Reddit with weekly sweeps
- **Sentiment analysis** — bulk-export comment corpora for NLP and classification
- **Audience research** — discover what your ICP is actually discussing in niche subreddits
- **Content / SEO** — surface frequently-asked questions and pain points by topic
- **Product feedback mining** — find unfiltered feedback on your product + competitors
- **Crisis / PR monitoring** — detect viral threads before they hit Twitter or news
- **Academic research** — pull labeled-discussion datasets for political science, sociology, ML training

### Quick Start (Python)

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("nexgendata/reddit-scraper").call(run_input={
    "subreddits": ["startups", "SaaS"],
    "max_posts": 500,
    "include_comments": True,
    "sort": "new"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["score"])
````

### Pricing — Pay Per Item

- **Actor start:** $0.005
- **Item:** $0.002

A 500-post daily subreddit sweep with comments = $1.005-3.005/day. A 10,000-post research corpus = $20.005. **No monthly minimum.**

### Related NexGenData Social + Discussion Actors

| Use case | Actor |
|----------|-------|
| Reddit brand monitor (Brandwatch alt, sentiment) | [reddit-brand-monitor](https://apify.com/nexgendata/reddit-brand-monitor?fpr=2ayu9b) |
| Reddit subreddit trends | [reddit-subreddit-trends](https://apify.com/nexgendata/reddit-subreddit-trends?fpr=2ayu9b) |
| Hacker News scraper (stories + comments) | [hacker-news-scraper](https://apify.com/nexgendata/hacker-news-scraper?fpr=2ayu9b) |
| HN Show HN tracker (launches) | [hn-show-hn-tracker](https://apify.com/nexgendata/hn-show-hn-tracker?fpr=2ayu9b) |
| Indie Hackers product launches | [indie-hackers-products-tracker](https://apify.com/nexgendata/indie-hackers-products-tracker?fpr=2ayu9b) |
| Product Hunt daily launches | [product-hunt-launches-scraper](https://apify.com/nexgendata/product-hunt-launches-scraper?fpr=2ayu9b) |
| YouTube comments scraper | [youtube-comments-scraper](https://apify.com/nexgendata/youtube-comments-scraper?fpr=2ayu9b) |
| Weibo hot-search tracker (China) | [weibo-hot-search-tracker](https://apify.com/nexgendata/weibo-hot-search-tracker?fpr=2ayu9b) |
| Zhihu Q\&A tracker (China) | [zhihu-qa-tracker](https://apify.com/nexgendata/zhihu-qa-tracker?fpr=2ayu9b) |

### FAQ

**Q: Does it require a Reddit account or OAuth?**
A: No. It uses Reddit's public JSON endpoints. Zero setup beyond entering your subreddits / queries.

**Q: Comment-tree depth?**
A: Full tree by default. You can cap depth with `max_comment_depth` if you only want top-level engagement.

**Q: Historical posts beyond 1,000?**
A: Reddit's listing API caps at ~1,000 historical posts per subreddit-sort. For deeper history, query by date range and sort variants (top of week / month / year / all).

**Q: NSFW + private subreddits?**
A: Public NSFW subreddits are accessible. Private (invite-only) subreddits aren't — Reddit's auth wall applies.

**Q: How does it differ from reddit-brand-monitor?**
A: This is the general scraper — posts, comments, profiles. Reddit Brand Monitor is the keyword-monitoring + sentiment + analytics layer on top, optimized for brand tracking.

***

### How NexGenData Pricing Works

Every NexGenData actor uses **pay-per-event** pricing — you only pay for results that actually land in your dataset. No monthly minimum, no seat fees, no surprise overage bills.

- **Actor Start:** a single-event charge each time you spin the actor up (scaled to memory size)
- **Result / item:** charged per item written to the default dataset
- **No charge** for retries, internal proxy rotation, or failed sub-requests — those are absorbed by the platform

### Apify Platform Bonus

New to Apify? Sign up with the NexGenData [referral link](https://www.apify.com/?fpr=2ayu9b) — you get free platform credits on signup (enough for several thousand free results) and you help fund the maintenance of this actor fleet.

### Integration Surface

Every actor in the NexGenData catalog can be triggered from:

- **Apify console** — point-and-click run
- **Apify API** — REST + webhooks
- **Apify Python / JS SDKs** — programmatic batch
- **Zapier, Make.com, n8n** — official integrations
- **MCP** — many actors are exposed as MCP tools for Claude / ChatGPT / Cursor agents
- **Schedules** — built-in cron for daily / weekly / monthly runs
- **Webhooks** — POST results to any HTTPS endpoint on dataset write

### Support

NexGenData maintains 260+ Apify actors and ships updates regularly. Bug reports via the Apify console issues tab get a response within 24 hours. Roadmap requests are welcome — high-demand features ship in the next version.

Home: [thenextgennexus.com](https://thenextgennexus.com)
Full catalog: [apify.com/nexgendata](https://apify.com/nexgendata?fpr=2ayu9b)

# Actor input Schema

## `searchQuery` (type: `string`):

Keywords to search for across Reddit posts and comments.

## `subreddit` (type: `string`):

Specific subreddit to search within (without r/ prefix). Leave empty to search all of Reddit.

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

How to sort search results: relevance, hot, top, new, or comments.

## `maxResults` (type: `integer`):

Maximum number of posts to return (1-100).

## `includeComments` (type: `boolean`):

Fetch top-level comments for each post. Slower but provides discussion data.

## Actor input object example

```json
{
  "searchQuery": "artificial intelligence",
  "sort": "relevance",
  "maxResults": 25,
  "includeComments": 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 = {
    "searchQuery": "artificial intelligence"
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/reddit-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 = { "searchQuery": "artificial intelligence" }

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/reddit-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "artificial intelligence"
}' |
apify call nexgendata/reddit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/reddit-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🔴 Reddit Scraper — Posts, Comments & Data",
        "description": "Extract posts, comments & subreddit data from Reddit. Monitor brand mentions, track discussions & build social listening tools. Get upvotes, awards & comment threads. Pay per post.",
        "version": "0.0",
        "x-build-id": "zopn4HQ6kIGgM3qBc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~reddit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-reddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~reddit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-reddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~reddit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-reddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searchQuery"
                ],
                "properties": {
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Keywords to search for across Reddit posts and comments."
                    },
                    "subreddit": {
                        "title": "Subreddit",
                        "type": "string",
                        "description": "Specific subreddit to search within (without r/ prefix). Leave empty to search all of Reddit."
                    },
                    "sort": {
                        "title": "Sort By",
                        "enum": [
                            "relevance",
                            "hot",
                            "top",
                            "new",
                            "comments"
                        ],
                        "type": "string",
                        "description": "How to sort search results: relevance, hot, top, new, or comments.",
                        "default": "relevance"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of posts to return (1-100).",
                        "default": 25
                    },
                    "includeComments": {
                        "title": "Include Comments",
                        "type": "boolean",
                        "description": "Fetch top-level comments for each post. Slower but provides discussion data.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
