# 🌟 Reddit Scraper Pro (`databuddy/reddit-scraper-pro`) Actor

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

## Pricing

from $0.003 / result

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Pro: Posts, Full Comment Trees, Communities & Users

Scrape Reddit **without login**: communities, posts, **complete comment trees** (including hidden "load more" replies), users and search results. You get **every field on every result**, with no slow "detailed mode" to switch on. Filter by keyword, upvotes, comment count, flair and date, and get **only new results** on scheduled runs.

**Only $2.50 per 1,000 results, and filtered, duplicate or failed results are never charged.**

### What you can scrape

| Input | Example |
|---|---|
| Community (with sort) | `https://www.reddit.com/r/worldnews/`, `/r/worldnews/top/?t=week`, `r/pasta` |
| Post / comment link | `https://www.reddit.com/r/x/comments/abc123/title/`, `…/abc123/title/def456/`, `https://redd.it/abc123` |
| Share link | `https://www.reddit.com/r/pics/s/AbCdE` |
| User | `https://www.reddit.com/user/name/`, `/user/name/comments/`, `/user/name/submitted/`, `u/name` |
| Search URL | `https://www.reddit.com/search/?q=news&sort=new`, `/r/python/search/?q=async&restrict_sr=1` |
| Popular | `https://www.reddit.com/r/popular/`, `/subreddits/leaderboard/` |
| Multireddit | `https://www.reddit.com/user/name/m/multi/` |
| Search terms | Any keyword, for posts, communities and users, across Reddit or inside one community |

### What you get

**Same field names as Reddit Scraper Lite**, so your integrations keep working. Each result is one row with a `dataType`:

- **Posts** (`dataType: "post"`):
  - The Lite fields: `id`, `parsedId`, `url`, `username`, `userId`, `title`, `communityName`, `body`, `html`, `link`, `numberOfComments`, `flair`, `upVotes`, `upVoteRatio`, `isVideo`, `isAd`, `over18`, `thumbnailUrl`, `imageUrls` (including **gallery images**), `videoUrls`, `createdAt`.
  - Plus: `score`, `authorFlair`, `domain`, `postHint`, `isStickied`, `isLocked`, `isSpoiler`, `isOriginalContent`, `awards`, `numCrossposts`, `crosspostParent`, `videoDurationSec`, `editedAt`, `communitySubscribers` and `distinguished`.
- **Comments** (`dataType: "comment"`):
  - The Lite fields: `id`, `url`, `parentId`, `username`, `body`, `html`, `createdAt`, `upVotes`, `numberOfReplies`.
  - Plus: **`depth`**, **`postId`**, **`postTitle`** and **`postUrl`** on every comment, `isSubmitter` (the poster replying), `isStickied`, `controversiality`, `awards` and `editedAt`.
- **Communities** (`dataType: "community"`):
  - `title`, `description`, `numberOfMembers`, **`activeUsers`**, `iconUrl`, `headerImage`, `createdAt`, `communityType`, `language` and `over18`.
- **Users** (`dataType: "user"`):
  - `postKarma`, `commentKarma`, `totalKarma`, `createdAt`, `isVerified`, `isModerator`, `isPremium`, `description` and `userIcon`.

On every row:

- `sourceUrl` or `searchTerm`: which of your inputs produced the row.
- `matchedKeywords`: why the row passed your keyword filter.
- `dataSource`: `json` for full data, or `rss` for the fallback.

### How it is better than Reddit Scraper Lite

| | Reddit Scraper Lite | Reddit Scraper Pro |
|---|---|---|
| Price | $3.40 / 1,000 | **$2.50 / 1,000** |
| Votes, ratio, comment count, media | Only in slower "include media links" mode | ✅ Always |
| Gallery images and video duration | Partial | ✅ |
| Hidden "load more" comments | — | ✅ Loaded automatically up to your limit |
| Comment depth, post title and post URL on comments | — | ✅ |
| Reply depth limit and comment order (top / new / controversial / Q\&A) | — | ✅ |
| Keyword filter for posts **and** comments, for brand monitoring | — | ✅ with `matchedKeywords` proof |
| Min upvotes, min comments, flair, leave out pinned or deleted | — | ✅ Filtered results are free |
| Start URLs **and** search terms in one run | Search ignored when URLs are given | ✅ Both run |
| Only new results on scheduled runs | — | ✅ |
| Share links (`/s/…`) and redd.it links | — | ✅ |
| Private, banned or missing input | Silent | ✅ Free row with the reason and how to fix it |
| Blocked by Reddit | Run fails | ✅ Proxy fallback, then RSS fallback |

### Pricing (pay per event)

| Event | When | Price |
|---|---|---|
| `result` | One saved post, comment, community or user | $0.0025 ($2.50 per 1,000) |

The run stops cleanly at your **Maximum cost per run**. Results that are filtered out, duplicates, seen in earlier runs, or from inputs that fail are never charged.

### Example inputs

**Brand monitoring: new posts and comments that mention you, daily:**

```json
{
  "searches": ["acme cloud"],
  "keywords": ["acme"],
  "postDateLimit": "1 day",
  "maxPostCount": 100,
  "maxComments": 50,
  "skipPreviouslyScraped": true
}
```

**A community's top posts this week, with the 20 best comments each:**

```json
{ "startUrls": [{ "url": "https://www.reddit.com/r/startups/top/?t=week" }], "maxPostCount": 50, "maxComments": 20 }
```

**One discussion, every comment:**

```json
{ "startUrls": [{ "url": "https://www.reddit.com/r/learnprogramming/comments/lp1hi4/" }], "maxComments": 5000 }
```

### Example output (shortened)

```json
{
  "id": "t3_144w7sn",
  "parsedId": "144w7sn",
  "url": "https://www.reddit.com/r/HonkaiStarRail/comments/144w7sn/my_luckiest_10x_pull_yet/",
  "username": "YourKingLives",
  "title": "My Luckiest 10x Pull Yet",
  "communityName": "r/HonkaiStarRail",
  "numberOfComments": 42,
  "upVotes": 1500,
  "upVoteRatio": 0.98,
  "imageUrls": ["https://preview.redd.it/yod3okjkgx4b1.jpg?auto=webp&s=…"],
  "postHint": "image",
  "createdAt": "2023-06-09T05:23:15.000Z",
  "dataType": "post",
  "dataSource": "json"
}
```

Inputs that return nothing come back as free rows (`dataType: "error"`), for example `"status": "restricted"` for a private community. Each has `error` and `fixHint`. The possible statuses are `not_found`, `restricted`, `no_results`, `unsupported`, `blocked` and `invalid_input`.

### Run summary

Each run saves a `RUN_SUMMARY` in the key-value store. It contains:

- **Totals:** results saved by type and by data source, and the charged events.
- **Skips:** the reasons results were skipped (filters, duplicates, seen before).
- **Per input:** results saved, items checked, "load more" requests and why it stopped.
- **Data quality:** fill rates of the key fields.
- **Network:** which routes were used, how often Reddit blocked each one, and how often the RSS fallback was used.

### Tips and limits

- **Use residential proxy (the default).** Reddit blocks many datacenter IPs. Keep "Automatic proxy fallback" on.
- **Reddit lists stop near 1,000 posts.** This is Reddit's limit, not the actor's. For more, combine sorts (new, top, hot) or time ranges, or use search. Comments inside one post have no such cap.
- **Searching comments:** Reddit's public data may not support comment search. If it doesn't, you get a free row explaining that. Instead, search **posts** and set **"Only results mentioning"**; matching comments inside those posts are kept.
- **RSS fallback rows** (`dataSource: "rss"`) have title, text, author, time and link, but no vote or comment counts.

### FAQ

**Do I need a Reddit account or API key?** No.

**Can it read private communities?** No. They come back as a free `restricted` row.

# Actor input Schema

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

Reddit communities (/r/name, with optional /hot /new /top /rising), posts, comment links, users (/user/name, /comments, /submitted), search URLs, share links (/r/x/s/…), redd.it links, r/popular and multireddits.

## `searches` (type: `array`):

Keywords to search Reddit for. Used together with Start URLs (unlike the original, both run in one go).

## `searchCommunityName` (type: `string`):

Only search inside this community, e.g. "programming" or "r/programming". Empty = all of Reddit.

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

Find posts matching the search terms.

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

Reddit's public data may not offer comment search; if it doesn't, you get a free row explaining it. Tip: search posts + "Only results mentioning" to collect matching comments inside them.

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

Find communities matching the search terms.

## `searchUsers` (type: `boolean`):

Find users matching the search terms.

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

Search order, and the order for community URLs without a sort in the URL ("relevance" means Hot for communities). A "Post date limit" switches to New automatically.

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

For Top / search: only posts from this period.

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

Stop after this many saved (and charged) results of any type. 0 = no limit.

## `maxPostCount` (type: `integer`):

Posts to save from each source. Reddit lists end near 1,000. 0 = no posts (e.g. community details only).

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

Comments (including replies) to save per post, top-rated first. Hidden "load more" comments are loaded automatically. 0 = none.

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

0 = only top-level comments, 1 = plus direct replies, and so on.

## `commentSort` (type: `string`):

Which comments come first (and so which are kept when "Max comments" is reached).

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

For community search and popular-community URLs.

## `maxUserCount` (type: `integer`):

For user search.

## `skipComments` (type: `boolean`):

Save posts without their comments.

## `skipUserPosts` (type: `boolean`):

For user URLs: save the profile only.

## `skipCommunity` (type: `boolean`):

For community URLs: do not save the community's own row (members, description…).

## `postDateLimit` (type: `string`):

Only posts newer than this: a date (2025-01-31) or a period ("7 days", "12 hours"). Switches listings to New and stops paging once posts get older.

## `commentDateLimit` (type: `string`):

Only comments newer than this (date or period).

## `keywords` (type: `array`):

Keep only posts (title, text, link) and comments that contain any of these words or phrases — whole words, any case. Matches are listed in "matchedKeywords". Ideal for brand monitoring.

## `minUpvotes` (type: `integer`):

Skip posts with fewer upvotes. 0 = off.

## `minPostComments` (type: `integer`):

Skip posts with fewer comments. 0 = off.

## `flairs` (type: `array`):

Keep only posts with one of these flairs (any case), e.g. "Question", "Discussion". Empty = all.

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

Turn off to leave out posts, communities and users marked 18+.

## `excludeStickied` (type: `boolean`):

Skip moderator-pinned posts at the top of communities.

## `excludeDeletedComments` (type: `boolean`):

Skip comments whose text was deleted or removed.

## `skipPreviouslyScraped` (type: `boolean`):

Remembers saved IDs in a named key-value store — ideal for scheduled monitoring (only new posts/comments each run).

## `dedupeStoreName` (type: `string`):

Key-value store used by "Skip results saved in previous runs".

## `rssFallback` (type: `boolean`):

If Reddit blocks the full data on every route, still return posts and comments from Reddit's RSS feeds (fewer fields: no votes or comment counts). Rows say dataSource = "rss".

## `ignoreStartUrls` (type: `boolean`):

For Zapier/Make integrations that always send a Start URLs field: ignore it and use only Search terms.

## `proxyFallback` (type: `boolean`):

If Reddit keeps blocking the chosen proxy, switch automatically to Apify residential, then datacenter proxy, then the server IP.

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

Reddit blocks many datacenter IPs. Residential works best.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/pasta/"
    }
  ],
  "searches": [],
  "searchCommunityName": "",
  "searchPosts": true,
  "searchComments": false,
  "searchCommunities": false,
  "searchUsers": false,
  "sort": "relevance",
  "time": "all",
  "maxItems": 0,
  "maxPostCount": 25,
  "maxComments": 20,
  "maxCommentDepth": 10,
  "commentSort": "top",
  "maxCommunitiesCount": 10,
  "maxUserCount": 10,
  "skipComments": false,
  "skipUserPosts": false,
  "skipCommunity": false,
  "postDateLimit": "",
  "commentDateLimit": "",
  "keywords": [],
  "minUpvotes": 0,
  "minPostComments": 0,
  "flairs": [],
  "includeNSFW": true,
  "excludeStickied": false,
  "excludeDeletedComments": true,
  "skipPreviouslyScraped": false,
  "dedupeStoreName": "reddit-scraper-pro-seen",
  "rssFallback": true,
  "ignoreStartUrls": false,
  "proxyFallback": true,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `failed` (type: `string`):

No description

## `runSummary` (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 = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/pasta/"
        }
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("databuddy/reddit-scraper-pro").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/pasta/" }],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("databuddy/reddit-scraper-pro").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/pasta/"
    }
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call databuddy/reddit-scraper-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,databuddy/reddit-scraper-pro"
        }
    }
}
```

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/1JvZvP6nF7ZFDKU18/builds/MabpjsLK2csyu0aPc/openapi.json
