# ⭐️ FREE Reddit Scraper Pro (`spry_wholemeal/reddit-scraper`) Actor

Free Reddit scraper that does what the paid ones do but better. No API keys needed, no usage fees. Pairs with ready-made n8n workflow templates for lead gen and content research.

- **URL**: https://apify.com/spry\_wholemeal/reddit-scraper.md
- **Developed by:** [Greg](https://apify.com/spry_wholemeal) (community)
- **Categories:** MCP servers, Social media, Agents
- **Stats:** 1,180 total users, 251 monthly users, 99.6% runs succeeded, 35 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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

## Reddit Scraper

Scrape posts, comments, and discover subreddits from Reddit — **no API credentials required**.

### What Can This Actor Do?

| Mode            | What You Get                     | Example Use Case                   |
| --------------- | -------------------------------- | ---------------------------------- |
| **📥 Scrape**   | Posts & comments from subreddits | Monitor r/startups for pain points |
| **🔍 Discover** | Find subreddits by keyword       | Find where your audience hangs out |
| **🔎 Search**   | Posts matching keywords          | Track brand mentions               |
| **🌐 Domain**   | Posts linking to websites        | Monitor your content sharing       |

***

### ⚡ Quick Start

#### Scrape Subreddits

```json
{
  "mode": "scrape",
  "listings": [
    { "subreddit": "entrepreneur", "maxPosts": 25 },
    { "subreddit": "startups", "maxPosts": 25 }
  ]
}
```

#### Search Reddit

```json
{
  "mode": "search",
  "searchTargets": [
    { "query": "best CRM software", "maxResults": 25 }
  ]
}
```

#### Discover Subreddits

```json
{
  "mode": "discover",
  "searchTerms": ["saas", "startup tools"],
  "maxResults": 25
}
```

#### Track Domain Mentions

```json
{
  "mode": "domain",
  "domainTargets": [
    { "domain": "mycompany.com", "maxResults": 25 }
  ]
}
```

***

### 📊 Output

Results are available in multiple dataset views:

- **All Results** — Everything scraped
- **Posts Only** — Just posts (no comments)
- **Comments Only** — Just comments
- **Discovered Subreddits** — Subreddits from Discover mode

**Post fields include:** `title`, `text`, `author`, `url`, `domain`, `created_utc_iso`, `permalink`, `listing_rank`, `score`, `num_comments`

**Comment fields include:** `text`, `author`, `created_utc_iso`, `permalink`, `score`, `depth`, `parent_id`

**Subreddit fields include:** `display_name`, `title`, `public_description`, `estimated_posts_per_day`, `estimated_posts_per_week`

***

### ✨ Key Features

- **Parallel execution** — All targets run simultaneously
- **Unauthenticated scraping** — Works without Reddit API credentials
- **Optional comments** — Fetch comments when needed
- **Smart proxies** — Automatic rotation to avoid blocks
- **No API keys** — Uses public Reddit data

***

### 🤖 MCP Server (AI Agent Integration)

Connect this Actor to Claude, Cursor, VS Code, or Windsurf as an MCP server. One command for Claude Code:

```bash
claude mcp add reddit-scraper \
  -e APIFY_TOKEN=<YOUR_APIFY_TOKEN> \
  -- npx -y @apify/actors-mcp-server@latest --actors spry_wholemeal/reddit-scraper
```

**[Full setup guide (all clients) →](https://github.com/gguyon0925/n8n-reddit-scraper/tree/main/mcp)** | **[Copy-paste agent prompts →](https://github.com/gguyon0925/n8n-reddit-scraper/tree/main/prompts)**

***

### 🧩 n8n Workflow Templates

Import-ready n8n workflows that use this Actor as the data source:

- **Lead Finder** — AI buying-intent scanner → Slack + Google Sheets
- **Subreddit Discovery** — Niche audience map
- **Content Machine** — Reddit threads → blog post drafts
- **Weekly Digest** — Email summary + AI trends

**[Browse templates & setup guides →](https://github.com/gguyon0925/n8n-reddit-scraper/tree/main/n8n)**

***

### 📋 Input Reference

#### Required Fields by Mode

| Mode       | Required Field      | Format                                    |
| ---------- | ------------------- | ----------------------------------------- |
| `scrape`   | `listings`          | `[{ "subreddit": "python" }]`             |
| `discover` | `searchTerms`       | `["saas", "startup", ...]`                |
| `search`   | `searchTargets`     | `[{ "query": "best CRM" }]`               |
| `domain`   | `domainTargets`     | `[{ "domain": "github.com" }]`            |

#### Sorting & Limits

| Field                           | Type   | Default     | Used In  | Description                                                              |
| ------------------------------- | ------ | ----------- | -------- | ------------------------------------------------------------------------ |
| `sort`                          | string | `hot`       | Scrape, Domain | `hot`, `new`, `top`, `rising`, `controversial`                      |
| `timeframe`                     | string | `week`      | Scrape, Search, Domain | `hour`, `day`, `week`, `month`, `year`, `all`             |
| `maxPosts`                      | number | 100         | Scrape   | Default max posts per listing target                                     |
| `maxResults`                    | number | 25          | Discover, Search | Max results per search/discovery target                            |
| `searchSort`                    | string | `relevance` | Search   | `relevance`, `hot`, `new`, `top`, `comments`                             |
| `maxResultsPerDomain`           | number | 500         | Domain   | Default max posts per domain target                                      |

Reddit may return fewer items than requested for some sorts, timeframes, or communities.

#### Comments

| Field                  | Type   | Default | Description                                   |
| ---------------------- | ------ | ------- | --------------------------------------------- |
| `includeCommentsMode`  | string | `none`  | `none` or `all` |
| `maxTopLevelComments`  | number | 50      | Max comments to fetch                         |
| `maxRepliesDepth`      | number | 3       | Reply depth setting                           |

**Comment modes:**

- `none` — Skip comments (fastest)
- `all` — Fetch for every post

#### Search Filters

| Field                 | Type    | Description                   |
| --------------------- | ------- | ----------------------------- |
| `restrictToSubreddit` | string  | Limit search to one subreddit |
| `authorFilter`        | string  | Only posts by this username   |
| `flairFilter`         | string  | Only posts with this flair    |
| `selfPostsOnly`       | boolean | Only text posts (no links)    |

#### Discover Options

| Field              | Type    | Default | Description                  |
| ------------------ | ------- | ------- | ---------------------------- |
| `estimateActivity` | boolean | true    | Calculate posts per day/week |
| `includeNsfw`      | boolean | false   | Include adult subreddits     |

#### Proxy Configuration

| Field                | Type   | Default     | Description                                            |
| -------------------- | ------ | ----------- | ------------------------------------------------------ |
| `proxyConfiguration` | object | Residential | **Highly recommended.** Reddit blocks without proxies. |

Default proxy config (works well):

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Other Settings

| Field | Type   | Default | Description                       |
| ----- | ------ | ------- | --------------------------------- |
| `tag` | string | —       | Label to identify this run's data |

#### Advanced (rarely needed)

| Field            | Type    | Default | Description                           |
| ---------------- | ------- | ------- | ------------------------------------- |
| `proxyCountry`   | string  | `US`    | ISO country code (US, GB, DE, etc.)   |
| `requestDelayMs` | number  | 100     | Milliseconds between requests         |
| `includeRaw`     | boolean | false   | Include raw Reddit payloads (debugging) |

***

### 🔧 Per-Target Overrides

Each mode supports easy arrays + optional advanced overrides. Example (scrape):

```json
{
  "mode": "scrape",
  "sort": "hot",
  "maxPosts": 25,
  "includeCommentsMode": "none",
  "listings": [
    { "subreddit": "python" },
    {
      "subreddit": "AskReddit",
      "sort": "top",
      "timeframe": "day",
      "maxPosts": 25,
      "includeCommentsMode": "all"
    }
  ]
}
```

Here, `r/python` uses defaults, while `r/AskReddit` overrides sort/timeframe/comments.

***

### 📈 Run Metadata

Each run stores statistics in the `OUTPUT` key-value record:

```json
{
  "mode": "scrape",
  "posts_scraped": 150,
  "comments_scraped": 2340,
  "http_stats": {
    "requests_made": 48,
    "requests_succeeded": 48,
    "rate_limits_hit": 0
  }
}
```

***

### ❓ Troubleshooting

#### "403 Forbidden" or "429 Too Many Requests"

**Cause:** Reddit is blocking your requests.

**Fix:** Enable Apify Proxy (residential works best):

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Empty results

**Check:**

- Subreddit name spelling (no `r/` prefix needed)
- `includeNsfw: true` if searching NSFW content
- `sort` + `timeframe` combination (e.g., `top` with `hour` may have few results)
- Subreddit may be private or quarantined

#### Comments seem incomplete

**Why:** Reddit may return only a subset of very large comment sections.

**What you get:** Comment text, author, timestamps, scores where available, and permalinks.

**Workaround:** Increase `maxTopLevelComments` if you need more comments.

#### Slow performance

**Tips:**

- Set `includeCommentsMode: "none"` if you don't need comments
- Use `includeCommentsMode: "all"` only when comments are required
- Reduce `scrape.maxPostsPerSubreddit` / `search.maxPostsPerQuery` for faster testing
- All targets run in parallel automatically

#### Rate limits despite using proxies

**Try:**

- Increase `requestDelayMs` to 200-500
- Change `proxyCountry` to a different region (GB, DE, CA)
- The scraper automatically retries with exponential backoff

***

### License

Apache-2.0

# Actor input Schema

## `mode` (type: `string`):

Choose one operation for this run. Configure the matching section below.

## `listings` (type: `array`):

Used when Operation Mode is Scrape. Add one item per subreddit. Use the subreddit name without the r/ prefix.

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

Fallback sort for Scrape or Domain targets that do not set their own sort.

## `timeframe` (type: `string`):

Fallback timeframe for targets that do not set their own timeframe.

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

Fallback max posts for Scrape targets that do not set their own limit.

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

Used when Operation Mode is Discover. Add one keyword or phrase per line.

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

Discover: max subreddits per keyword. Search: fallback max posts for search targets without their own limit.

## `estimateActivity` (type: `boolean`):

Discover only: estimate recent posting activity for discovered communities.

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

Discover and Search only: include adult/NSFW results.

## `searchTargets` (type: `array`):

Used when Operation Mode is Search. Add one item per query.

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

Fallback sort for Search targets that do not set their own sort.

## `restrictToSubreddit` (type: `string`):

Optional fallback subreddit restriction for Search targets without their own restriction.

## `authorFilter` (type: `string`):

Optional: only include posts by this Reddit username.

## `flairFilter` (type: `string`):

Optional: only include posts with this flair text.

## `selfPostsOnly` (type: `boolean`):

Only include text posts.

## `domainTargets` (type: `array`):

Used when Operation Mode is Domain. Add one item per domain.

## `maxResultsPerDomain` (type: `integer`):

Fallback max posts for Domain targets that do not set their own limit.

## `includeCommentsMode` (type: `string`):

Optional comment collection for Scrape, Search, and Domain modes.

## `maxTopLevelComments` (type: `integer`):

Maximum top-level comments to collect for each post. Use 0 for the maximum supported by Reddit.

## `maxRepliesDepth` (type: `integer`):

How many reply levels to include. 0 means top-level comments only.

## `tag` (type: `string`):

Optional label added to every output record, for example competitor\_research.

## `includeRaw` (type: `boolean`):

Include raw source data in each output record. Useful for debugging, but makes outputs much larger.

## `requestDelayMs` (type: `integer`):

Delay between requests in milliseconds.

## `customUserAgent` (type: `string`):

Optional advanced override. Usually not needed.

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

Recommended for reliable runs on Apify.

## `proxyCountry` (type: `string`):

Country code to request from Apify Proxy.

## `proxyRotationStrategy` (type: `string`):

How proxy sessions are assigned across requests.

## `proxyPoolSize` (type: `integer`):

Used with Sticky pool. Larger values spread parallel work across more sessions.

## Actor input object example

```json
{
  "mode": "scrape",
  "listings": [
    {
      "subreddit": "entrepreneur",
      "sort": "hot",
      "timeframe": "week",
      "maxPosts": 25
    },
    {
      "subreddit": "startups",
      "sort": "new",
      "timeframe": "week",
      "maxPosts": 25
    }
  ],
  "sort": "hot",
  "timeframe": "week",
  "maxPosts": 100,
  "searchTerms": [
    "saas",
    "startup"
  ],
  "maxResults": 25,
  "estimateActivity": true,
  "includeNsfw": false,
  "searchTargets": [
    {
      "query": "machine learning",
      "searchSort": "top",
      "timeframe": "week",
      "maxResults": 50
    },
    {
      "query": "deep learning",
      "searchSort": "new",
      "restrictToSubreddit": "MachineLearning",
      "maxResults": 25
    }
  ],
  "searchSort": "relevance",
  "selfPostsOnly": false,
  "domainTargets": [
    {
      "domain": "mycompany.com",
      "sort": "hot",
      "timeframe": "week",
      "maxResults": 100
    },
    {
      "domain": "competitor.com",
      "sort": "top",
      "timeframe": "month",
      "maxResults": 50
    }
  ],
  "maxResultsPerDomain": 500,
  "includeCommentsMode": "none",
  "maxTopLevelComments": 50,
  "maxRepliesDepth": 3,
  "includeRaw": false,
  "requestDelayMs": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "proxyCountry": "US",
  "proxyRotationStrategy": "sticky_pool",
  "proxyPoolSize": 10
}
```

# Actor output Schema

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

All scraped posts, comments, or subreddits

## `posts_only` (type: `string`):

View only posts (excluding comments)

## `comments_only` (type: `string`):

View only comments (excluding posts)

## `output_info` (type: `string`):

Run statistics including HTTP request counts and success rates

# 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 = {
    "listings": [
        {
            "subreddit": "entrepreneur",
            "sort": "hot",
            "timeframe": "week",
            "maxPosts": 25
        },
        {
            "subreddit": "startups",
            "sort": "hot",
            "timeframe": "week",
            "maxPosts": 25
        }
    ],
    "searchTerms": [
        "saas",
        "startup"
    ],
    "searchTargets": [
        {
            "query": "startup marketing",
            "searchSort": "relevance",
            "timeframe": "week",
            "maxResults": 25
        },
        {
            "query": "saas pricing",
            "searchSort": "new",
            "timeframe": "week",
            "maxResults": 25
        }
    ],
    "domainTargets": [
        {
            "domain": "github.com",
            "sort": "hot",
            "timeframe": "week",
            "maxResults": 100
        },
        {
            "domain": "medium.com",
            "sort": "new",
            "timeframe": "week",
            "maxResults": 50
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("spry_wholemeal/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 = {
    "listings": [
        {
            "subreddit": "entrepreneur",
            "sort": "hot",
            "timeframe": "week",
            "maxPosts": 25,
        },
        {
            "subreddit": "startups",
            "sort": "hot",
            "timeframe": "week",
            "maxPosts": 25,
        },
    ],
    "searchTerms": [
        "saas",
        "startup",
    ],
    "searchTargets": [
        {
            "query": "startup marketing",
            "searchSort": "relevance",
            "timeframe": "week",
            "maxResults": 25,
        },
        {
            "query": "saas pricing",
            "searchSort": "new",
            "timeframe": "week",
            "maxResults": 25,
        },
    ],
    "domainTargets": [
        {
            "domain": "github.com",
            "sort": "hot",
            "timeframe": "week",
            "maxResults": 100,
        },
        {
            "domain": "medium.com",
            "sort": "new",
            "timeframe": "week",
            "maxResults": 50,
        },
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("spry_wholemeal/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 '{
  "listings": [
    {
      "subreddit": "entrepreneur",
      "sort": "hot",
      "timeframe": "week",
      "maxPosts": 25
    },
    {
      "subreddit": "startups",
      "sort": "hot",
      "timeframe": "week",
      "maxPosts": 25
    }
  ],
  "searchTerms": [
    "saas",
    "startup"
  ],
  "searchTargets": [
    {
      "query": "startup marketing",
      "searchSort": "relevance",
      "timeframe": "week",
      "maxResults": 25
    },
    {
      "query": "saas pricing",
      "searchSort": "new",
      "timeframe": "week",
      "maxResults": 25
    }
  ],
  "domainTargets": [
    {
      "domain": "github.com",
      "sort": "hot",
      "timeframe": "week",
      "maxResults": 100
    },
    {
      "domain": "medium.com",
      "sort": "new",
      "timeframe": "week",
      "maxResults": 50
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call spry_wholemeal/reddit-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/RGEBfXu0TSc1siPLb/builds/KkZgRw3s603jzurax/openapi.json
