# Reddit Scraper - Neatrat ⚡ (`neatrat/reddit-scraper`) Actor

🚀 High-speed Reddit scraping. No API limits. No Proxies needed.

- **URL**: https://apify.com/neatrat/reddit-scraper.md
- **Developed by:** [Neatrat](https://apify.com/neatrat) (community)
- **Categories:** Social media, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 146 total users, 5 monthly users, 95.6% runs succeeded, 14 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.90 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Scraper - Neatrat ⚡

> 🚀 **High-speed Reddit scraping. No API limits. No proxy needed. Pay only for results.**

Get fresh Reddit posts, comments, subreddits, user pages, popular feeds, leaderboards, and search results as clean structured JSON, without touching the Reddit API, without managing proxies, and without paying for compute time you didn't use.

Built for **developers, marketers, researchers, data teams, and AI agents** who just want Reddit data to show up, correct and on time.

***

### Why Neatrat's Reddit Scraper?

- ⚡ **High-speed.** Runs finish in seconds, not minutes. Tuned to be the fastest Reddit scraper on Apify.
- 🔓 **No API limits.** Skip Reddit's rate limits, quotas, and app-registration paperwork.
- 🌐 **No proxy needed.** Residential proxies are included. Nothing to buy, configure, or rotate.
- 💸 **Pay only for results.** Flat **$3 per 1,000 stored items**. Standard Apify platform usage is billed separately. Blocked responses are never billed.
- 🧼 **Clean input.** Paste a Reddit link or a keyword. Done. No twenty toggles to learn.
- 🔎 **Auto URL detection.** Posts, comments, subreddits, users, searches, `r/popular`, and leaderboards all handled from one list.
- 🤖 **AI-agent friendly.** The same engine is exposed as an MCP (Model Context Protocol) server, so agents in Claude Desktop, Cursor, and VS Code can call Reddit scraping as a native tool.
- 🪶 **Lean runtime.** 512 MB is all it needs, which keeps Apify compute charges minimal on every plan.

### What you can scrape

| You give us | You get |
| --- | --- |
| A post URL | Full post with title, body, metadata, and expandable comment threads |
| A comment permalink | The comment with its ancestor context and replies |
| A subreddit URL | Post listings, with pagination and sort control |
| A user URL | Profile, submitted posts, or comment history |
| A search URL | Search results across Reddit or scoped to one subreddit |
| `r/popular` or `subreddits/leaderboard` | Trending posts or trending communities |
| Keywords | Keyword search across posts, communities, and users |

Everything comes back as **structured JSON**, one item at a time, straight to the Apify dataset. Stream it into Make, Zapier, n8n, Google Sheets, a webhook, or your own pipeline.

### Pricing

**$3 per 1,000 stored items**, plus standard Apify platform usage charges.

- Residential proxies included.
- Live Reddit fetches included.
- Dataset delivery included.
- Standard Apify compute and storage charges apply separately.
- Blocked responses are **never billed**. Requests are retried before being counted in the run summary.
- Runs stop when your maximum charge is reached.
- If no results can be retrieved because requests failed, the run is marked failed.

#### Trial limits for free-plan Apify users

Not on a paid plan yet? Try it using your Apify credits:

- **5 lifetime runs**
- **500 lifetime stored results**

When you hit the limit the actor exits cleanly and points you to a paid plan. Normal per-result and platform usage charges apply; these limits do not waive billing.

***

### How to use it

You can combine direct URLs and keyword searches in the same run.

#### Option 1 - Drop in Reddit URLs

Just paste the URLs. The actor figures out the rest.

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/programming/" },
    { "url": "https://www.reddit.com/r/programming/comments/173viwj/" },
    { "url": "https://www.reddit.com/user/spez" },
    { "url": "https://www.reddit.com/r/popular/" }
  ]
}
```

#### Option 2 - Search by keyword

```json
{
  "searchTerms": ["typescript", "bun runtime"],
  "searchTypes": ["posts", "communities"],
  "withinSubreddit": "programming",
  "searchSort": "new",
  "timeFilter": "week"
}
```

`searchTypes` accepts any combination of `"posts"`, `"communities"`, `"users"`.

#### Option 3 - Full-depth post crawl

Turn any post listing into a deep scrape that follows every post into its full comment thread:

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/generativeAI/" }],
  "crawlComments": true,
  "maxPosts": 10,
  "maxCommentsPerPost": 50
}
```

***

### Input reference

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `startUrls` | `{ url }[]` | - | Reddit URLs to scrape. Posts, comments, subreddits, users, searches, popular, leaderboard. |
| `searchTerms` | `string[]` | - | Keywords to search for. |
| `searchTypes` | `("posts" \| "communities" \| "users")[]` | `["posts"]` | Which surfaces each keyword hits. |
| `withinSubreddit` | `string` | `null` | Restrict keyword post search to one subreddit (e.g. `programming`). |
| `searchSort` | `"relevance" \| "new" \| "comments" \| "top"` | `"new"` | Sort order for keyword post search. |
| `timeFilter` | `"all" \| "hour" \| "day" \| "week" \| "month" \| "year"` | `"all"` | Time window for searches and top/controversial sorts. |
| `postSort` | `"hot" \| "new" \| "top" \| "rising" \| "controversial"` | `"hot"` | Sort for subreddit listings when the URL doesn't specify one. |
| `crawlComments` | `boolean` | `false` | Treat post listings as discovery and fetch full comments for every post. |
| `pages` | `integer` | empty | Optional cap on listing pages (25 results each). Empty fetches until your max caps are reached. For posts, the number of comment expansion rounds (1 when empty). |
| `includeNsfw` | `boolean` | `true` | When `false`, NSFW items are filtered out before billing. |
| `maxItems` | `integer` | `100` | Total dataset cap for the whole run. |
| `maxPosts` | `integer` | `25` | Cap per post-style listing. |
| `maxComments` | `integer` | `100` | Global cap on nested comments stored across all full-post fetches. |
| `maxCommentsPerPost` | `integer` | `20` | Per-post cap on nested comments. |
| `maxCommunities` | `integer` | `10` | Cap for community search and leaderboard. |
| `maxUsers` | `integer` | `25` | Cap for user search. |
| `requestTimeoutSecs` | `integer` | `160` | Per-request timeout. |

***

### Example inputs

**Single subreddit feed**

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/programming/" }],
  "maxPosts": 25,
  "maxItems": 25
}
```

**One post with deep comment expansion**

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/programming/comments/173viwj/" }
  ],
  "pages": 3,
  "maxCommentsPerPost": 200,
  "maxItems": 1
}
```

**Keyword search scoped to one subreddit**

```json
{
  "searchTerms": ["typescript"],
  "searchTypes": ["posts"],
  "withinSubreddit": "programming",
  "searchSort": "new",
  "timeFilter": "week",
  "maxPosts": 50,
  "maxItems": 50
}
```

**Discovery plus full-post crawl**

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/generativeAI/" }],
  "crawlComments": true,
  "maxPosts": 10,
  "maxCommentsPerPost": 50,
  "maxItems": 10
}
```

**Mixed run**

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/popular/" },
    { "url": "https://www.reddit.com/user/spez" }
  ],
  "searchTerms": ["apify", "neatrat"],
  "searchTypes": ["posts", "communities"],
  "maxPosts": 15,
  "maxCommunities": 5,
  "maxItems": 120
}
```

***

### Output shape

Every dataset item carries a `dataType` and a `sourceType` so downstream pipelines can filter cleanly even when one run mixes post results, community previews, and user search hits.

Typical `dataType` values:

- `post`: full post with comments
- `comment-permalink`: a comment with ancestor context
- `communityDetails`: subreddit about-box
- `userProfile`: user about-box
- `postPreview`: one item from a post listing
- `commentPreview`: one item from a user comment listing
- `communityPreview`: one item from community search or leaderboard
- `userPreview`: one item from user search

Listing routes are flattened (one dataset item per preview). Single-resource routes store one item. When `crawlComments` is on, raw previews are dropped so you only pay for the full-comment post objects.

***

### Good use cases

- **Marketing**: track brand mentions, watch competitors, monitor product subreddits, find influencers.
- **Research**: pull public discussions about a topic, sample comment sentiment, build datasets.
- **Analytics**: snapshot subreddit activity over time, feed BI dashboards.
- **AI / LLM teams**: build RAG corpora from niche subreddits, keep LLM context fresh, ground agents with live Reddit signal.
- **Community & growth**: spot trending threads in your niche, catch support questions fast.

### For AI agents and MCP users

This scraper also ships as an **MCP (Model Context Protocol) server**, so AI agents in Claude Desktop, Cursor, VS Code, and other MCP-capable clients can call Reddit scraping as a native tool.

If you're building an agent and want it wired in as an MCP tool, reach out through the contact channel on the Apify store page and we'll share the MCP endpoint.

For everyone else, this Apify actor is the simplest way to turn Reddit into clean structured data without thinking about APIs, proxies, or rate limits.

### Support

Questions, feature requests, or custom use cases? Reach out through the Apify store page and we'll get back fast.

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search on Reddit. The options below (search targets, sort, time, community filter) only apply to this section. Independent from Direct URLs — you can use either or both, results are combined.

## `searchTypes` (type: `array`):

Which surfaces to search for each keyword. Pick any combination of posts, communities, and users.

## `withinSubreddit` (type: `string`):

Optional. When set, keyword post searches are restricted to this subreddit. Accepts `r/programming` or `programming`.

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

Sort order for keyword post searches.

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

Optional time window for keyword searches and top/controversial sorts.

## `startUrls` (type: `array`):

Reddit URLs to scrape. The actor auto-detects posts, comment permalinks, subreddits, user pages, search URLs, popular, and leaderboard pages — no need to pick the right endpoint manually. Use `/r/<subreddit>/about/` to scrape a subreddit's metadata (sidebar, description, rules) instead of its posts.

## `postSort` (type: `string`):

Sort used for subreddit listing URLs when the URL itself does not already pick a sort (e.g. `/r/programming/` vs `/r/programming/top/`).

## `crawlComments` (type: `boolean`):

When enabled, the actor also expands each post's comment tree (multiple comment pages). Full post bodies are always fetched for listing items regardless of this flag. Leave off for faster scrapes that only need post content.

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

When disabled, NSFW posts are filtered out before storage and never billed.

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

Global cap across the whole run. Each stored dataset item counts against this. Free Apify users are additionally capped at 500 total results across all runs.

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

Cap for post-style listings: subreddit feeds, popular, user posts, and keyword post search.

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

Global cap on nested comments stored across all full-post fetches. Also used as the listing cap for user comment pages.

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

Per-post cap on nested comments stored inside each full post result.

## `maxCommunities` (type: `integer`):

Cap for community-style listings: community search and leaderboard.

## `maxUsers` (type: `integer`):

Cap for user search results.

## `pages` (type: `integer`):

Optional. Caps each listing at this many pages (25 results per page, 10 for community search). Leave empty to fetch until the max caps above are reached. For posts and comment permalinks, this controls how many comment expansion rounds the scraper runs (1 when empty).

## Actor input object example

```json
{
  "searchTypes": [
    "posts"
  ],
  "searchSort": "new",
  "timeFilter": "all",
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/programming/"
    }
  ],
  "postSort": "hot",
  "crawlComments": false,
  "includeNsfw": true,
  "maxItems": 100,
  "maxPosts": 25,
  "maxComments": 100,
  "maxCommentsPerPost": 20,
  "maxCommunities": 10,
  "maxUsers": 25
}
```

# Actor output Schema

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

All scraped items with key fields: title, subreddit, author, score, comments, content, permalink, URL.

## `posts` (type: `string`):

Reddit posts and post previews only.

## `comments` (type: `string`):

Comment previews from user comment pages and comment searches.

## `communities` (type: `string`):

Subreddits from leaderboard or community search.

## `users` (type: `string`):

Users from user search or profile scrapes.

## `allFields` (type: `string`):

Full dataset with every field the scraper returned.

## `summary` (type: `string`):

Task counts, stored results, blocked/failed tasks, and error list.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/programming/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("neatrat/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 = { "startUrls": [{ "url": "https://www.reddit.com/r/programming/" }] }

# Run the Actor and wait for it to finish
run = client.actor("neatrat/reddit-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 '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/programming/"
    }
  ]
}' |
apify call neatrat/reddit-scraper --silent --output-dataset

```

## MCP server setup

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