# Reddit Scraper - Posts, Comments & Subreddits (`knowten/reddit-scraper`) Actor

Extract Reddit posts, nested comments, subreddits, search results, and user profiles with 180+ fields. No API key required.

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

## Pricing

from $0.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?

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 — Posts, Comments, Subreddits, Search & Profiles (No API Key)

Scrape Reddit posts, nested comments, entire subreddits, keyword search results, and user profiles — **no API keys, no login, and no rate limits**.

Built for AI agents, developers, and data teams: extracts clean, structured JSON with **180+ fields across 4 shapes** and works out of the box with Claude, ChatGPT/Codex, Cursor, and n8n via MCP and REST APIs.

***

### 🌟 What does Reddit Scraper do?

Reddit Scraper extracts posts, complete comment threads, user profiles, and community data directly from [Reddit](https://www.reddit.com/) without needing API keys, developer accounts, or OAuth authorization. Simply provide keywords, subreddits, or direct URLs, and get structured data in JSON, CSV, or Excel format.

- **✅ No API Keys or Accounts Required**: Bypass Reddit's 600 requests/10min API limits — no Reddit login, no OAuth setup, and no app approvals.
- **🗂️ Full Subreddit Scraping**: Deep-scrape entire subreddits far beyond the standard recent post limits.
- **💬 Complete Comment Threads**: Collect every comment on a post with full nested reply hierarchies and depth tracking.
- **📊 180+ Rich Structured Fields**: 75 post fields, 41 comment fields, 38 community fields, and 29 user profile fields — including video URLs, gallery assets, awards, and engagement rates.
- **🔍 Advanced Search & Scoping**: Search keywords across all of Reddit or restrict to specific subreddits (`withinCommunity`), with custom sort (`new`, `hot`, `top`, `relevance`) and time windows (`hour`, `day`, `week`, `month`, `year`, `all`).
- **📅 Precise Date & Flair Filters**: Extract content from specific date ranges (`postedAfter`/`postedBefore`, `commentedAfter`/`commentedBefore`) and filter by flairs (`onlyWithFlair`).
- **🔄 Export Anywhere**: JSON, CSV, Excel, XML, HTML · Integrates directly with n8n, Zapier, Make, and Model Context Protocol (MCP).

***

### 🤖 Built for AI Agents & MCP

Reddit Scraper is MCP-native: connect it as a tool to Claude Desktop, ChatGPT/Codex, Cursor, or your custom LLM pipeline to pull real-time Reddit discussions on demand:

```json
{
  "mcpServers": {
    "reddit": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.apify.com/?tools=knowten/reddit-scraper"]
    }
  }
}
```

Just ask your AI assistant:

- *"Find what Reddit is saying about \[Product] this week"*
- *"Pull the top 100 posts and comments from r/SaaS from the past month"*
- *"Extract all comments from this thread and summarize user sentiment"*

***

### 🚀 Three Ways to Scrape Reddit

| Mode | Input Parameter | Best For |
|---|---|---|
| 🔎 **Search Keywords** | `searchTerms` | Find posts, comments, or communities by topic across Reddit — or inside one subreddit with `withinCommunity`. Supports sort and time filters. |
| 🔗 **Direct URLs** | `startUrls` | Scrape a specific post, comment permalink, user profile, subreddit listing, or search results page. |
| 🗂️ **Full Subreddit Scrape** | `subredditUrls` | Deep-scrape entire communities (hundreds or thousands of posts) beyond the standard recent feed. |

***

### ⚙️ Input Configuration & Options

#### 1. Keyword Search

```json
{
  "searchTerms": ["artificial intelligence", "machine learning"],
  "withinCommunity": "r/technology",
  "searchPosts": true,
  "searchComments": false,
  "searchCommunities": false,
  "searchSort": "hot",
  "searchTime": "month",
  "maxPostsCount": 100,
  "includeNSFW": false
}
```

#### 2. Direct URLs with Comment Extraction

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/generativeAI/comments/1l64st7/have_we_reached_a_point_where_aigenerated_video/" }
  ],
  "crawlCommentsPerPost": true,
  "maxCommentsPerPost": 100
}
```

#### 3. Deep Subreddit Scraping with Date Window

```json
{
  "subredditUrls": ["r/buildapc", "r/SaaS"],
  "postedAfter": "2025-01-01",
  "postedBefore": "2025-12-31",
  "maxPostsCount": 500,
  "crawlCommentsPerPost": true,
  "maxCommentsPerPost": 25
}
```

#### 4. User Profile Scraping

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/user/spez" }
  ],
  "maxPostsCount": 20,
  "maxCommentsCount": 50
}
```

***

### 📊 Output Schema Contract (180+ Fields)

Every item in the dataset is a clean JSON object with a `dataType` discriminator:

| `dataType` | Fields | Description |
|---|---|---|
| `post` | 75 | Full Reddit submission with media assets, metrics, flair, author info, and engagement rates |
| `comment` | 41 | Nested comment with hierarchy, depth (0 = top level), score, parent IDs, and permalinks |
| `community` | 38 | Subreddit settings, description, rules list, member count, icons, and banner images |
| `user_profile` | 29 | User profile details, karma breakdown, snoovatar, bio, and account age |

#### Example Post Output (`dataType: "post"`)

```json
{
  "dataType": "post",
  "id": "t3_1abc123",
  "parsedId": "1abc123",
  "title": "What's the best tech stack for web scrapers in 2026?",
  "body": "Looking to build large-scale data extraction pipelines...",
  "bodyHtml": "<p>Looking to build large-scale data extraction pipelines...</p>",
  "authorName": "curious_dev",
  "authorId": "t2_xyz789",
  "parsedAuthorId": "xyz789",
  "communityName": "r/programming",
  "parsedCommunityName": "programming",
  "communityId": "t5_2qh55",
  "parsedCommunityId": "2qh55",
  "score": 1542,
  "upVotes": 1542,
  "upvoteRatio": 0.97,
  "commentsCount": 387,
  "postUrl": "https://www.reddit.com/r/programming/comments/1abc123/",
  "contentUrl": "https://www.reddit.com/r/programming/comments/1abc123/",
  "postType": "text",
  "flair": "Discussion",
  "domain": "self.programming",
  "subredditSubscribers": 4250000,
  "over18": false,
  "isSelf": true,
  "isVideo": false,
  "isGallery": false,
  "mediaType": "text",
  "hasMedia": false,
  "galleryCount": 0,
  "galleryImages": [],
  "mediaAssets": [],
  "videoUrl": null,
  "ageHours": 14.5,
  "scorePerHour": 106.34,
  "commentsPerHour": 26.68,
  "engagementTotal": 1929,
  "commentToScoreRatio": 0.25,
  "isHighEngagement": true,
  "titleLength": 48,
  "bodyLength": 142,
  "wordCount": 27,
  "createdAt": "2026-08-25T14:32:00.000Z",
  "crawledAt": "2026-08-26T13:00:00.000Z",
  "searchTerm": "web scrapers"
}
```

#### Example Comment Output (`dataType: "comment"`)

```json
{
  "dataType": "comment",
  "id": "t1_c123456",
  "parsedId": "c123456",
  "postId": "t3_1abc123",
  "parsedPostId": "1abc123",
  "parentId": "t3_1abc123",
  "parsedParentId": "1abc123",
  "parentKind": "post",
  "depth": 0,
  "body": "Node.js with Apify SDK and direct JSON endpoints is unbeatable for speed.",
  "bodyHtml": "<p>Node.js with Apify SDK and direct JSON endpoints is unbeatable for speed.</p>",
  "authorName": "senior_engineer",
  "authorId": "t2_auth456",
  "communityName": "r/programming",
  "subredditName": "programming",
  "postTitle": "What's the best tech stack for web scrapers in 2026?",
  "postUrl": "https://www.reddit.com/r/programming/comments/1abc123/",
  "score": 234,
  "commentUpVotes": 234,
  "url": "https://www.reddit.com/r/programming/comments/1abc123/comment/c123456/",
  "ageHours": 12.1,
  "scorePerHour": 19.33,
  "commentCreatedAt": "2026-08-25T16:50:00.000Z",
  "crawledAt": "2026-08-26T13:00:00.000Z"
}
```

***

### 📈 Use Cases

- 🔍 **Brand & Reputation Monitoring**: Track brand mentions, customer sentiment, and complaints across thousands of subreddits in real-time.
- 📊 **Market Research & Consumer Insights**: Analyze pain points, feature requests, and authentic product reviews in niche communities.
- 🎯 **Lead Generation**: Identify high-intent discussions (`"recommend an alternative to X"`, `"looking for software that does Y"`).
- 🤖 **AI & ML Training Data**: Extract millions of posts and conversation trees for NLP datasets, sentiment models, and RAG pipelines.
- 🏆 **Competitive Intelligence**: Monitor competitor launches, pricing discussions, and comparison threads in `r/SaaS`, `r/Entrepreneur`, and industry subreddits.

***

### 📋 Run Summary & Reports

Every run generates two dedicated records in your default Key-Value store:

- **`RUN-SUMMARY` (JSON)**: Machine-readable summary containing execution duration, items delivered, requests finished, skipped targets, and input warnings.
- **`RUN-MAP.html`**: A visual HTML dashboard detailing the run's breakdown and stats.

***

### 🔌 Integration with n8n, Make & Zapier

Easily automate workflows by calling the actor synchronously or asynchronously:

**n8n HTTP Request Node Configuration:**

- **Method**: `POST`
- **URL**: `https://api.apify.com/v2/acts/knowten~reddit-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN`
- **Body**:

```json
{
  "searchTerms": ["SaaS"],
  "searchPosts": true,
  "maxPostsCount": 50
}
```

***

### ❓ FAQ

##### Do I need a Reddit account or API keys?

**No.** The scraper extracts publicly accessible Reddit data directly without requiring OAuth, developer apps, or login credentials.

##### What are the scraping limits?

There are no artificial rate limits. You can scrape thousands or millions of items, governed only by your Apify compute resources and configured caps (`maxPostsCount`, `maxCommentsPerPost`, etc.).

##### Can I export results to Excel or CSV?

**Yes.** All results in the dataset can be exported immediately to JSON, CSV, Excel (XLSX), XML, or HTML directly from the Apify console or REST API.

##### How do nested comments work?

When `crawlCommentsPerPost` is enabled, the actor recursively traverses the entire comment tree for each post, tagging each comment with its parent post ID, immediate parent ID, and nesting `depth` (0 = top-level, 1 = first reply, etc.).

***

### 📄 License

ISC

# Actor input Schema

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

Keywords or search phrases to search across Reddit. Each keyword runs as a separate query.

## `searchPosts` (type: `boolean`):

Enable to search for posts matching the search keywords.

## `searchComments` (type: `boolean`):

Enable to search for comments matching the search keywords.

## `searchCommunities` (type: `boolean`):

Enable to search for subreddits matching the search keywords.

## `withinCommunity` (type: `string`):

Search inside a specific subreddit only (e.g. r/technology, r/gaming, indiegames).

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

Sort order for keyword search results.

## `searchTime` (type: `string`):

Time filter for keyword search results and top listings.

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

Direct Reddit URLs: post links, comment permalinks, user profiles, subreddit pages, or search pages.

## `fastMode` (type: `boolean`):

Uses direct JSON API endpoints for search URLs, skipping unnecessary HTML parsing.

## `subredditUrls` (type: `array`):

Subreddit names (e.g. AskReddit, r/AskReddit) or community links to deep scrape.

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

Filter posts created on or after this UTC date (e.g. 2025-01-01).

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

Filter posts created on or before this UTC date (e.g. 2025-12-31).

## `commentedAfter` (type: `string`):

Filter comments created on or after this UTC date.

## `commentedBefore` (type: `string`):

Filter comments created on or before this UTC date.

## `onlyWithFlair` (type: `boolean`):

Keep only posts that have a flair assigned.

## `crawlCommentsPerPost` (type: `boolean`):

Collect full comment threads (including nested replies) for extracted posts.

## `includeNSFW` (type: `boolean`):

Include NSFW posts and communities in results.

## `maxPostsCount` (type: `integer`):

Maximum number of posts to collect.

## `maxCommentsCount` (type: `integer`):

Maximum number of comments to collect from keyword search.

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

Maximum number of comments to collect per post when comment crawling is enabled.

## `maxCommunitiesCount` (type: `integer`):

Maximum number of communities to collect.

## `proxy` (type: `object`):

Configure proxies to prevent rate limits and IP blocking. Apify Residential Proxy recommended.

## `mcpMode` (type: `string`):

How to deliver items to MCP connectors.

## `mcpMessage` (type: `string`):

Message template for MCP connectors with placeholders like {{title}}, {{postUrl}}, etc.

## `mcpComments` (type: `string`):

How to handle comments for MCP delivery.

## `mcpCommentsPerPost` (type: `integer`):

Number of top comments to bundle when mcpComments is set to bundle.

## `mcpMaxItems` (type: `integer`):

Maximum items to push through MCP connectors.

## `customLabels` (type: `object`):

Key-value pair of custom analysis labels if applicable.

## Actor input object example

```json
{
  "searchTerms": [
    "Cats"
  ],
  "searchPosts": true,
  "searchComments": false,
  "searchCommunities": false,
  "searchSort": "new",
  "searchTime": "all",
  "startUrls": [],
  "fastMode": true,
  "subredditUrls": [],
  "onlyWithFlair": false,
  "crawlCommentsPerPost": false,
  "includeNSFW": false,
  "maxPostsCount": 100,
  "maxCommentsCount": 100,
  "maxCommentsPerPost": 100,
  "maxCommunitiesCount": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "mcpMode": "perPost",
  "mcpMessage": "**{{title}}**\n{{postUrl}}",
  "mcpComments": "ignore",
  "mcpCommentsPerPost": 5,
  "mcpMaxItems": 50,
  "customLabels": {}
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

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

No description

## `report` (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 = {
    "searchTerms": [
        "Cats"
    ],
    "startUrls": [],
    "subredditUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("knowten/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 = {
    "searchTerms": ["Cats"],
    "startUrls": [],
    "subredditUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("knowten/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 '{
  "searchTerms": [
    "Cats"
  ],
  "startUrls": [],
  "subredditUrls": []
}' |
apify call knowten/reddit-scraper --silent --output-dataset

```

## MCP server setup

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