# Reddit Post Scraper | No Login | No Cookie (`rexreus/reddit-post-scraper`) Actor

Fast, lightweight Reddit scraper for posts, specific categories/flairs, keywords, and comments in bulk. Zero browser bloat with HTTP/2 evasion & proxy rotation. Filter by min score, comments, date, & post type. Structured JSON ready for AI, LLM datasets, & market research.

- **URL**: https://apify.com/rexreus/reddit-post-scraper.md
- **Developed by:** [REXREUS D.O](https://apify.com/rexreus) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

<p align="center">
  <img src="https://api.apify.com/v2/key-value-stores/06XtAnxPDRIXwrVmt/records/reddit-post-scraper-banner" alt="Reddit Post Scraper Banner" width="100%" />
</p>

<h1 align="center">Reddit Post Scraper (Bulk, Filtered & Lightweight)</h1>

<p align="center">
  <b>High-throughput, browserless extraction of Reddit posts, categories/flairs, and relational comment trees.</b><br>
  Built with TypeScript, Node.js 20, Crawlee, and got-scraping for ultra-fast performance and minimal compute cost.
</p>

<p align="center">
  <a href="https://apify.com"><img src="https://img.shields.io/badge/Apify-Actor-orange?style=flat-square" alt="Apify Actor" /></a>
  <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/Language-TypeScript-blue?style=flat-square" alt="TypeScript" /></a>
  <a href="https://crawlee.dev/"><img src="https://img.shields.io/badge/Crawlee-got--scraping-green?style=flat-square" alt="Crawlee" /></a>
  <img src="https://img.shields.io/badge/Memory-256MB%20RAM-purple?style=flat-square" alt="256MB RAM" />
  <img src="https://img.shields.io/badge/Zero-Browser%20Bloat-brightgreen?style=flat-square" alt="No Browser" />
</p>

***

### ⚡ Why Reddit Post Scraper?

Most Reddit scrapers on the market rely on heavy headless browsers (Puppeteer or Playwright) that consume 1GB–2GB RAM, crash on dynamic DOM updates, and rack up hefty compute bills.

**Reddit Post Scraper** operates on a modern, **HTTP-first architecture** with browser-grade TLS/JA3 impersonation and HTTP/2 session pooling. It extracts thousands of posts per minute at **1/10th the compute cost** of browser scrapers.

#### Feature Comparison

| Feature | Reddit Post Scraper | Traditional Browser Scrapers |
|---|---|---|
| **Memory Footprint** | **256 MB – 512 MB RAM** | 1024 MB – 2048 MB RAM |
| **Speed / Latency** | **150ms – 400ms per request** | 2.5s – 5.0s per page |
| **Compute Cost** | **< $0.02 per 10,000 posts** | $0.25+ per 10,000 posts |
| **Bulk Subreddits** | **Yes** (parallel array) | Limited / sequential |
| **Category / Specific Flair Filter** | **Yes** (`flair: "Discussion"`) | No (boolean only) |
| **Engagement Thresholds** | **Yes** (`minScore`, `minComments`) | No (local post-filtering) |
| **Content Type Filtering** | **Yes** (`all`, `text`, `media`) | No |
| **Relational Comment Tree** | **Yes** (`depth`, `parentCommentId`) | Nested JSON or None |
| **Deduplication Monitor Mode** | **Yes** (Apify KVS caching) | No |
| **Browser Dependency** | **Zero (no Chromium)** | Requires Chromium binary |

***

### 🏗️ Architecture Flow

```
┌────────────────────────────────────────────────────────────────────────┐
│                          Input Configuration                           │
│     [Subreddits: Bulk]   [Search Keywords]   [Direct Reddit URLs]      │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│                   Lightweight HTTP/2 Evasion Engine                    │
│      • got-scraping (Chrome TLS / JA3 / HTTP/2 protocol frames)        │
│      • Apify Residential Proxy Pool (Session retirement on 401/403)    │
│      • Exponential backoff on 429 (Retry-After header handling)        │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │
                  ┌─────────────────┴─────────────────┐
                  ▼                                   ▼
        [Listing Extraction]               [Optional Comment Tree]
        • 100 posts per page               • Recursive tree traversal
        • Cursor token pagination          • Capped at maxCommentDepth
        • Reverse date early-exit          • Skip [deleted] / [removed]
                  │                                   │
                  └─────────────────┬─────────────────┘
                                    │
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│                       In-Memory Filter Pipeline                        │
│   ✓ minScore (upvotes)              ✓ Content Type (text vs media)     │
│   ✓ minComments                     ✓ NSFW Inclusion Guard             │
│   ✓ Specific Flair Matching         ✓ KVS Delta Deduplication          │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│                   Structured Apify Dataset Output                      │
│      Clean, relational records ready for AI/LLM pipelines & SQL       │
└────────────────────────────────────────────────────────────────────────┘
```

***

### ⚙️ Input Configuration

| Parameter | Type | Default | Description |
|---|---|---|---|
| `subreddits` | `array` | `["technology"]` | List of subreddit names or URLs to scrape in bulk. |
| `searchTerms` | `array` | `[]` | Keywords to search across Reddit or within the selected subreddits. |
| `startUrls` | `array` | `[]` | Direct URLs to specific posts, comments, or subreddits. |
| `sort` | `string` | `"hot"` | Sort order: `"hot"`, `"new"`, `"top"`, `"rising"`, or `"relevance"`. |
| `time` | `string` | `"all"` | Time window for top sort and searches: `"hour"`, `"day"`, `"week"`, `"month"`, `"year"`, `"all"`. |
| `flair` | `string` | `""` | Filter by specific flair string (e.g. `"Discussion"`, `"News"`, `"AI"`). |
| `postType` | `string` | `"all"` | Filter content: `"all"`, `"text"` (self posts), or `"media"` (images/videos). |
| `minScore` | `integer` | `0` | Minimum upvote threshold to eliminate zero-engagement noise. |
| `minComments` | `integer` | `0` | Minimum comment count threshold. |
| `postedAfter` | `string` | `""` | Filter out posts older than this UTC date (`YYYY-MM-DD`). |
| `postedBefore` | `string` | `""` | Filter out posts newer than this UTC date (`YYYY-MM-DD`). |
| `crawlComments` | `boolean` | `false` | Enable recursive comment extraction for scraped posts. |
| `maxCommentsPerPost`| `integer` | `25` | Maximum comments saved per post. |
| `maxCommentDepth` | `integer` | `3` | Maximum nesting depth for comment replies (1–10). |
| `skipDeletedComments`| `boolean` | `true` | Skip empty `[deleted]` and `[removed]` comments. |
| `includeNsfw` | `boolean` | `false` | Include 18+ adult content in results. |
| `maxPosts` | `integer` | `50` | Maximum posts to scrape across all queries. |
| `monitorMode` | `boolean` | `false` | Cache seen post IDs in Apify KVS to skip duplicates in cron runs. |
| `proxyConfiguration`| `object` | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` | Proxy settings. |

***

### 📊 Output Dataset Schema

The scraper emits clean, typed records discriminated by `dataType: "post" | "comment"`.

#### Sample Post Record (`dataType: "post"`)

```json
{
  "dataType": "post",
  "id": "t3_1h5xabc",
  "postId": "1h5xabc",
  "title": "New breakthroughs in open-source AI models",
  "body": "Detailed discussion about small language models...",
  "author": "tech_researcher",
  "subreddit": "technology",
  "subredditName": "r/technology",
  "score": 1420,
  "upvoteRatio": 0.94,
  "numComments": 312,
  "url": "https://www.reddit.com/r/technology/comments/1h5xabc/new_breakthroughs_in_opensource_ai_models/",
  "permalink": "/r/technology/comments/1h5xabc/new_breakthroughs_in_opensource_ai_models/",
  "postType": "text",
  "flair": "AI & Robotics",
  "mediaUrls": [],
  "isNsfw": false,
  "isPinned": false,
  "createdAt": "2026-09-04T12:30:00.000Z",
  "createdUtc": 1757008200,
  "scorePerHour": 48.96,
  "commentsCount": 312
}
```

#### Sample Comment Record (`dataType: "comment"`)

```json
{
  "dataType": "comment",
  "id": "t1_m89abc",
  "commentId": "m89abc",
  "postId": "1h5xabc",
  "parentCommentId": "t3_1h5xabc",
  "subreddit": "technology",
  "author": "commenter_one",
  "body": "The benchmark results on reasoning tasks are particularly impressive.",
  "score": 85,
  "depth": 1,
  "permalink": "https://www.reddit.com/r/technology/comments/1h5xabc/new_breakthroughs_in_opensource_ai_models/m89abc/",
  "createdAt": "2026-09-04T13:10:00.000Z",
  "createdUtc": 1757010600
}
```

***

### 💡 Practical Recipes

#### 1. High-Signal Tech Market Intelligence

Scrape high-engagement discussions from tech communities:

```json
{
  "subreddits": ["technology", "programming", "artificial"],
  "sort": "top",
  "time": "month",
  "minScore": 100,
  "minComments": 20,
  "postType": "text",
  "maxPosts": 100
}
```

#### 2. Category / Flair-Specific Filtering

Extract posts categorized under a specific flair tag (e.g. "Discussion"):

```json
{
  "subreddits": ["machinelearning"],
  "flair": "Discussion",
  "sort": "new",
  "maxPosts": 50
}
```

#### 3. Scheduled Brand Monitoring (Delta Mode)

Monitor competitor brand mentions every morning without duplicate records:

```json
{
  "searchTerms": ["ChatGPT", "Claude AI", "Gemini"],
  "sort": "new",
  "monitorMode": true,
  "maxPosts": 200
}
```

***

### 🛡️ Anti-Bot & Proxy Guide

Reddit enforces strict anti-scraping measures on non-residential IPs. To guarantee 100% reliable execution:

- **Apify Residential Proxies** (`apifyProxyGroups: ["RESIDENTIAL"]`) are enabled by default.
- The Actor automatically retires proxy sessions upon receiving HTTP 403 Forbidden to acquire a clean residential IP.
- HTTP 429 rate limit responses are handled with automatic backoff respecting the `Retry-After` header.

***

### ❓ Frequently Asked Questions (FAQ)

**Q: Do I need a Reddit API key or Reddit account?**\
A: No! The scraper uses public HTTP endpoints with browser-grade TLS emulation. No Reddit credentials or API registration required.

**Q: Can I scrape comments as well as posts?**\
A: Yes. Toggle `crawlComments: true`. Comments will be extracted up to your configured `maxCommentDepth` and saved as relational records.

**Q: Why are comments saved as separate records instead of nested inside the post?**\
A: Flat relational items prevent multi-megabyte JSON memory bloat and make querying in SQL, pandas, or vector databases trivial.

**Q: Does it work with private or quarantined subreddits?**\
A: No. Private and quarantined subreddits require authenticated account membership. The Actor cleanly skips and logs them without crashing.

**Q: How do I export data to CSV or Excel?**\
A: The Apify Console and API provide built-in one-click exports to CSV, JSON, Excel, and XML.

# Actor input Schema

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

List of subreddits to scrape (e.g. \['technology', 'artificial', 'programming']). Enter bare names or r/names.

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

Keywords to search across Reddit or within the selected subreddits (e.g. \['deep learning', 'openai']).

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

Direct URLs to Reddit posts, subreddits, or comments threads to scrape.

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

Listing sort order for subreddits and search queries.

## `time` (type: `string`):

Time filter when sorting by 'top' or searching.

## `flair` (type: `string`):

Filter posts by specific flair text (e.g. 'Discussion', 'News', 'AI'). Case-insensitive.

## `postType` (type: `string`):

Filter by content format: text discussions only, media (images/videos) only, or all.

## `minScore` (type: `integer`):

Skip low-quality posts with fewer upvotes than this threshold.

## `minComments` (type: `integer`):

Skip posts with fewer comments than this threshold.

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

Filter out posts older than this UTC date. Enables reverse-chronological early exit on new.json.

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

Filter out posts newer than this UTC date.

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

Enable recursive extraction of comments for scraped posts.

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

Maximum number of comments to extract per post when comment scraping is enabled.

## `maxCommentDepth` (type: `integer`):

Maximum nesting depth for replies (1 = top-level replies only, 3 = up to 3 levels deep).

## `skipDeletedComments` (type: `boolean`):

Do not save empty \[deleted] or \[removed] comment records to the dataset.

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

Whether to include Not-Safe-For-Work content in results.

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

Maximum total number of posts to collect across all subreddits and search queries.

## `monitorMode` (type: `boolean`):

Caches seen post IDs in Apify Key-Value Store. Subsequent runs will skip previously saved posts.

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

Apify Residential Proxy is highly recommended to prevent Reddit 403 Forbidden blocks.

## Actor input object example

```json
{
  "subreddits": [
    "technology"
  ],
  "searchTerms": [],
  "startUrls": [],
  "sort": "hot",
  "time": "all",
  "flair": "",
  "postType": "all",
  "minScore": 0,
  "minComments": 0,
  "crawlComments": false,
  "maxCommentsPerPost": 25,
  "maxCommentDepth": 3,
  "skipDeletedComments": true,
  "includeNsfw": false,
  "maxPosts": 50,
  "monitorMode": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset containing scraped Reddit posts and comments.

# 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 = {
    "subreddits": [
        "technology"
    ],
    "sort": "hot",
    "maxPosts": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("rexreus/reddit-post-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 = {
    "subreddits": ["technology"],
    "sort": "hot",
    "maxPosts": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("rexreus/reddit-post-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 '{
  "subreddits": [
    "technology"
  ],
  "sort": "hot",
  "maxPosts": 50
}' |
apify call rexreus/reddit-post-scraper --silent --output-dataset

```

## MCP server setup

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