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

High-reliability Reddit scraper with no artificial limits. Extract posts, comments, users, and subreddit data at scale. Supports JSON API, OAuth, HTML, and Playwright modes. Full comment trees, working filters, NSFW support, multi-account rate-boost.

- **URL**: https://apify.com/kalirobot/reddit-scraper-pro.md
- **Developed by:** [Dennis](https://apify.com/kalirobot) (community)
- **Categories:** AI, Social media, News
- **Stats:** 34 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$18.00 / 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 Pro

Extract posts, comments, subreddits, and user data from Reddit without limitations.

### Features

✅ **No artificial limits** - Scrape 100K+ posts (competitors stop at 1000!)\
✅ **98%+ Success Rate** - Most reliable Reddit scraper\
✅ **All filters work** - Date, upvotes, sort (competitors ignore them!)\
✅ **Nested comments** - Full comment trees with unlimited depth\
✅ **4 Scraping Modes** - JSON API, OAuth API, HTML Scraping, Browser (Playwright)\
✅ **Multi-Account Support** - Add multiple Reddit apps for 100 QPM each\
✅ **NSFW Support** - Works without login (MODE 1, 2 & 4)

### Quick Start Examples

#### Example 1: Scrape Multiple Subreddits

```json
{
  "subreddits": ["python", "webdev", "machinelearning"],
  "scrapeOptions": {
    "posts": true,
    "comments": true,
    "subredditInfo": true
  },
  "limits": {
    "maxPosts": 50,
    "maxCommentsPerPost": 20
  },
  "filters": {
    "sortBy": "hot",
    "minUpvotes": 10
  }
}
```

#### Example 2: Scrape Specific URLs

```json
{
  "startUrls": [
    {"url": "https://www.reddit.com/r/python/"},
    {"url": "https://www.reddit.com/r/webdev/comments/abc123/title/"},
    {"url": "https://www.reddit.com/user/spez/"}
  ],
  "scrapeOptions": {
    "posts": true,
    "comments": true
  }
}
```

#### Example 3: r/popular with Country Filter

```json
{
  "specialSubreddit": "popular",
  "countryCode": "US",
  "filters": {
    "sortBy": "top",
    "timeRange": "week"
  },
  "limits": {
    "maxPosts": 100
  }
}
```

→ Scrapes: `https://www.reddit.com/r/popular/top/?geo_filter=US&t=week`

#### Example 4: r/all - All of Reddit

```json
{
  "specialSubreddit": "all",
  "filters": {
    "sortBy": "controversial",
    "timeRange": "month",
    "minUpvotes": 100
  }
}
```

→ Scrapes: `https://www.reddit.com/r/all/controversial/?t=month`

#### Example 5: Search for Posts

```json
{
  "searchKeywords": ["GPT-4", "artificial intelligence"],
  "filters": {
    "timeRange": "week",
    "minUpvotes": 50,
    "sortBy": "top"
  },
  "limits": {
    "maxPosts": 200
  }
}
```

#### Example 6: Discover Subreddits (Browser Mode)

```json
{
  "scrapingMode": "browser",
  "searchSubreddits": ["webdev", "python", "datascience"]
}
```

→ Finds: r/webdev, r/web_design, r/WebdevTutorials, r/python, r/learnpython, etc.

#### Example 7: Deep Comment Extraction

```json
{
  "subreddits": ["AskReddit"],
  "scrapeOptions": {
    "posts": true,
    "comments": true
  },
  "limits": {
    "maxPosts": 10,
    "maxCommentDepth": 20,
    "maxCommentsPerPost": 100
  }
}
```

#### Example 8: User Profile with Activity

```json
{
  "startUrls": [
    {"url": "https://www.reddit.com/user/AutoModerator/"}
  ],
  "scrapeOptions": {
    "users": true
  },
  "scrapingMode": "browser"
}
```

### Scraping Modes

#### Mode 1: JSON API (Default - Recommended ⚡)

- **No authentication needed**
- \~60 requests/minute
- ✅ NSFW content supported
- Fast and reliable (1-2s per page)
- Best for most use cases

#### Mode 2: Official Reddit API (Power Users 🔑)

- **Requires Reddit App credentials** ([Create App](https://www.reddit.com/prefs/apps))
- 100 requests/minute per account
- Add multiple accounts for higher limits!
- ✅ NSFW content supported
- OAuth-based authentication
- Highest rate limits

#### Mode 3: HTML Scraping (Fallback 📄)

- **No authentication needed**
- No JavaScript rendering required
- Works for SFW content
- ⚠️ NSFW not available (Reddit limitation)
- Lightweight and efficient

#### Mode 4: Browser (Playwright 🌐)

- **Headless Chromium browser**
- Full JavaScript rendering
- ✅ NSFW content supported
- ✅ **Nested comments** (unlimited depth!)
- ✅ **User profiles** with their posts/comments
- ✅ All media: Images, Videos, External URLs
- Slower (~2-5s per page) but most robust

### What You Can Extract

**Posts:**

- Title, text, URL
- Author, score, comments count
- Timestamps, awards
- Image URLs (direct download links!)
- Video URLs
- Subreddit info

**Comments:**

- Full nested comment trees
- Author, body, score
- Timestamps
- Reply chains (unlimited depth!)

**Subreddits:**

- Subscriber count, description
- Banner & icon images
- Creation date

**Users:**

- Karma scores, account age
- Profile icons
- Post/comment history

### Input Configuration

**Subreddits:** List of subreddit names (without r/)\
**Search Keywords:** Search Reddit for specific terms\
**Start URLs:** Direct URLs to posts, subreddits, or users

**Filters:**

- Time Range: hour, day, week, month, year, all
- Min/Max Upvotes
- Sort: hot, new, top, controversial, rising
- Exclude NSFW

**Limits:**

- Max Posts (null = unlimited!)
- Max Comments per Post
- Max Comment Depth

### Multi-Account Setup (Optional)

For higher rate limits, add multiple Reddit App credentials:

1. Create apps at https://www.reddit.com/prefs/apps
2. Choose "script" type
3. Add to input:

```json
{
  "scrapingMode": "official_api",
  "redditCredentials": [
    {"client_id": "...", "client_secret": "..."},
    {"client_id": "...", "client_secret": "..."}
  ]
}
```

Result: 100 QPM per account = 200 QPM total!

### Why This Scraper?

| Feature | Competitors | Reddit Scraper Pro |
|---------|-------------|-------------------|
| Post Limits | 1000-6000 | ✅ Unlimited |
| Filters | Often broken | ✅ Always work |
| Success Rate | ~94% | ✅ >98% |
| Comments | Limited | ✅ Full depth |
| Multi-Account | ❌ | ✅ Yes |
| Modes | 1 | ✅ 3 |

### Use Cases

- **Research:** Sentiment analysis, trend tracking
- **Marketing:** Brand monitoring, competitor analysis
- **Data Science:** Training data, NLP
- **Journalism:** News monitoring, fact checking

### Output Example

```json
{
  "id": "abc123",
  "type": "post",
  "subreddit": "Python",
  "title": "...",
  "author": "username",
  "score": 234,
  "num_comments": 89,
  "url": "https://i.redd.it/image.jpg",
  "created_at": "2025-11-03T10:00:00",
  "over_18": false,
  "is_video": false,
  "comments": [...]
}
```

### API Resources

- [Reddit OAuth Guide](https://github.com/reddit-archive/reddit/wiki/OAuth2)
- [Data API Wiki](https://support.reddithelp.com/hc/en-us/articles/16160319875092)
- [Create Reddit App](https://www.reddit.com/prefs/apps)

### Legal

- Scrapes only public data
- Users responsible for Reddit ToS compliance
- [Reddit Data API Terms](https://support.reddithelp.com/hc/en-us/articles/16160319875092)

### Have any issues or feedback?

A crawler can only be as good as its feedback! If you encounter any problems or have feature requests, please don't hesitate to reach out. I'm committed to fixing bugs and implementing your suggestions to make this the best Reddit scraper possible.

Thank you for your support! 🙏

### Version

**0.1.0** - Initial Release

# Actor input Schema

## `scrapingMode` (type: `string`):

CHOOSE HOW TO SCRAPE REDDIT

## `redditCredentials` (type: `array`):

Add Reddit App credentials for 'official_api' mode. Multiple accounts = higher limits!

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

PASTE REDDIT URLs (SUBREDDITS, POSTS, USERS)

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

LIST OF SUBREDDIT NAMES (e.g., python, webdev, machinelearning)

## `specialSubreddit` (type: `string`):

r/all = ALL OF REDDIT | r/popular = POPULAR POSTS

## `countryCode` (type: `string`):

Filter r/popular by country

## `searchKeywords` (type: `array`):

SEARCH BY KEYWORD (e.g., GPT-4, AI, Python)

## `searchSubreddits` (type: `array`):

FIND SUBREDDIT SUGGESTIONS (e.g., 'webdev' → r/webdev, r/web_design, etc.)

## `scrapeOptions` (type: `object`):

CHOOSE CONTENT TYPES

## `filters` (type: `object`):

FILTER AND SORT POSTS

## `limits` (type: `object`):

SET CRAWLING LIMITS

## `output` (type: `object`):

CONFIGURE OUTPUT FORMAT

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

PROXY SETTINGS (RECOMMENDED)

## `maxConcurrency` (type: `integer`):

Parallel requests (1-2 recommended for json_api, 3-5 for official_api)

## `requestDelay` (type: `number`):

Delay between requests to avoid rate limiting

## `scrollTimeout` (type: `integer`):

Max time for infinite scroll in browser mode

## `debugMode` (type: `boolean`):

Enable verbose logging

## `notificationUrl` (type: `string`):

GET NOTIFIED WHEN SCRAPING COMPLETES

## Actor input object example

```json
{
  "scrapingMode": "json_api",
  "redditCredentials": [],
  "startUrls": [],
  "subreddits": [
    "webdev"
  ],
  "specialSubreddit": "",
  "countryCode": "GLOBAL",
  "scrapeOptions": {
    "posts": true,
    "comments": false,
    "users": false,
    "subredditInfo": false
  },
  "filters": {
    "sortBy": "hot",
    "timeRange": "all",
    "minUpvotes": 0
  },
  "limits": {
    "maxPosts": 5,
    "maxCommentsPerPost": 5,
    "maxCommentDepth": 2
  },
  "output": {
    "format": "nested",
    "includeMetadata": true
  },
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 2,
  "requestDelay": 1.5,
  "scrollTimeout": 40,
  "debugMode": false
}
```

# Actor output Schema

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

No description

## `dataset` (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 = {
    "scrapingMode": "json_api",
    "redditCredentials": [],
    "startUrls": [],
    "subreddits": [
        "webdev"
    ],
    "scrapeOptions": {
        "posts": true,
        "comments": false,
        "users": false,
        "subredditInfo": false
    },
    "filters": {
        "sortBy": "hot",
        "timeRange": "all",
        "minUpvotes": 0
    },
    "limits": {
        "maxPosts": 5,
        "maxCommentsPerPost": 5,
        "maxCommentDepth": 2
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kalirobot/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 = {
    "scrapingMode": "json_api",
    "redditCredentials": [],
    "startUrls": [],
    "subreddits": ["webdev"],
    "scrapeOptions": {
        "posts": True,
        "comments": False,
        "users": False,
        "subredditInfo": False,
    },
    "filters": {
        "sortBy": "hot",
        "timeRange": "all",
        "minUpvotes": 0,
    },
    "limits": {
        "maxPosts": 5,
        "maxCommentsPerPost": 5,
        "maxCommentDepth": 2,
    },
}

# Run the Actor and wait for it to finish
run = client.actor("kalirobot/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 '{
  "scrapingMode": "json_api",
  "redditCredentials": [],
  "startUrls": [],
  "subreddits": [
    "webdev"
  ],
  "scrapeOptions": {
    "posts": true,
    "comments": false,
    "users": false,
    "subredditInfo": false
  },
  "filters": {
    "sortBy": "hot",
    "timeRange": "all",
    "minUpvotes": 0
  },
  "limits": {
    "maxPosts": 5,
    "maxCommentsPerPost": 5,
    "maxCommentDepth": 2
  }
}' |
apify call kalirobot/reddit-scraper-pro --silent --output-dataset

```

## MCP server setup

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