# Reddit Scraper - Posts, Comments, Communities & Users (`silentflow/reddit-scraper-ppr`) Actor

Scrape Reddit posts, comments, subreddits, communities, and user profiles without login or API keys. Get titles, scores, upvotes, awards, flair, media, and full metadata as structured JSON. Search by keyword or subreddit, filter by date and NSFW, and export to JSON, CSV, or Excel.

- **URL**: https://apify.com/silentflow/reddit-scraper-ppr.md
- **Developed by:** [SilentFlow](https://apify.com/silentflow) (community)
- **Categories:** Social media, AI, Lead generation
- **Stats:** 11 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.30 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Reddit Scraper

**Turn any subreddit, thread, community, or user profile into clean structured data.** Posts, comments, communities, and users in a single run, in seconds not hours.

### How it works

![How it works](https://api.apify.com/v2/key-value-stores/SV4AhUDucNX2rbR64/records/how-it-works-v3.png)

1. **Search or paste a URL.** Type keywords (optionally scoped to one subreddit) or drop in subreddit, post, or user links, and choose what to pull: posts, comments, communities, users.
2. **Get structured JSON.** Every score, upvote ratio, comment count, flair, media link, karma, and timestamp, ready for your database, spreadsheet, or model.

### ✨ Why teams choose this over other Reddit scrapers

Stuck with a scraper that only pulls posts and comments? Running one that fails on every third request? Still copy-pasting threads into a spreadsheet by hand?

- 📦 **Four data types in one actor, not two.** Posts, comments, communities, and users. Most Reddit scrapers stop at posts and comments. Discover and qualify subreddits, then profile the people behind the threads, without switching tools.
- 🔓 **No login, no API keys, no quotas.** Pull public Reddit data straight to structured JSON. No account to create, no OAuth to wire, no developer app to register.
- 🎯 **Search or paste URLs, your choice.** Search all of Reddit by keyword, restrict a search to one subreddit, or drop in exact subreddit, post, or user URLs. Both modes return the same clean schema.
- 🧮 **Every signal Reddit exposes.** Upvotes, upvote ratio, comment counts, flair, media URLs, karma, community size, account age. Around 38 fields per record, the numbers you actually rank and filter on.
- 🕑 **Full sort and time control.** Hot, new, top, rising, most-comments, or relevance, over any window from the past hour to all time. Grab this week's top posts or a subreddit's all-time best in one call.
- 📈 **Scale from one thread to a full subreddit.** Pull a single post or sweep an entire subreddit's history, with no fixed cap on how many items a run returns.

### 🎯 What you can do with Reddit data

| Team | What they build |
|------|-----------------|
| **Brand & social** | Track every mention of a product or company across subreddits, with score and comment context |
| **Market research** | Map which communities discuss a topic, how large they are, and who drives the conversation |
| **Content & trends** | Surface this week's top and rising posts in any niche before they hit the mainstream |
| **Lead generation** | Find active users and niche subreddits around a topic to target outreach and community seeding |
| **Data science / ML** | Pull large post and comment corpora for sentiment, classification, and LLM training sets |
| **Academic research** | Study online communities, opinion dynamics, and user behavior at scale |
| **Product & CX** | Collect unfiltered feature requests and complaints straight from the communities that use you |

### 📥 Input parameters

#### URL scraping

| Parameter | Type | Description |
|-----------|------|-------------|
| `startUrls` | array | Reddit URL(s) to scrape (subreddits, posts, users, search pages) |

**Supported URL types:**

- Subreddits: `https://www.reddit.com/r/programming/`
- Subreddit sort: `https://www.reddit.com/r/programming/hot`
- Posts: `https://www.reddit.com/r/learnprogramming/comments/abc123/...`
- Users: `https://www.reddit.com/user/username`
- User comments: `https://www.reddit.com/user/username/comments/`
- Search: `https://www.reddit.com/search/?q=keyword`
- Popular: `https://www.reddit.com/r/popular/`
- Leaderboards: `https://www.reddit.com/subreddits/leaderboard/crypto/`

#### Search

| Parameter | Type | Description |
|-----------|------|-------------|
| `searches` | array | Keywords to search on Reddit |
| `searchCommunityName` | string | Restrict search to a specific subreddit (e.g. `programming`) |
| `searchTypes` | array | Types of results: `posts`, `communities`, `users` (default: posts) |

#### Sorting & filtering

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `sort` | string | `new` | Sort by: relevance, hot, top, new, rising, comments |
| `time` | string | `all` | Time filter: all, hour, day, week, month, year |
| `includeNSFW` | boolean | `true` | Include adult/NSFW content |
| `postDateLimit` | string | - | Only posts after this date (YYYY-MM-DD) |

#### Options & limits

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `includeComments` | boolean | `true` | Also scrape comments when visiting posts |
| `maxItems` | integer | `50` | Maximum total items to return (no fixed cap) |

### 📊 Output data

#### Post

```json
{
  "id": "t3_abc123",
  "parsedId": "abc123",
  "url": "https://www.reddit.com/r/programming/comments/abc123/example_post/",
  "username": "dev_user",
  "userId": "t2_abc123",
  "title": "Example Post Title",
  "communityName": "r/programming",
  "parsedCommunityName": "programming",
  "body": "Post body text...",
  "html": null,
  "numberOfComments": 42,
  "upVotes": 256,
  "upVoteRatio": 0.95,
  "isVideo": false,
  "isAd": false,
  "over18": false,
  "flair": "Discussion",
  "link": "https://example.com/article",
  "thumbnailUrl": "https://b.thumbs.redditmedia.com/...",
  "videoUrl": "",
  "imageUrls": ["https://i.redd.it/abc123.jpg"],
  "createdAt": "2024-06-01T12:00:00Z",
  "scrapedAt": "2024-06-02T10:30:00Z",
  "dataType": "post"
}
```

#### Comment

```json
{
  "id": "t1_xyz789",
  "parsedId": "xyz789",
  "url": "https://www.reddit.com/r/programming/comments/abc123/example_post/xyz789/",
  "parentId": "t3_abc123",
  "postId": "abc123",
  "username": "commenter",
  "userId": "t2_xyz789",
  "category": "programming",
  "communityName": "r/programming",
  "body": "Great post!",
  "html": "<div class=\"md\"><p>Great post!</p></div>",
  "createdAt": "2024-06-01T13:00:00Z",
  "scrapedAt": "2024-06-02T10:30:00Z",
  "upVotes": 15,
  "numberOfreplies": 3,
  "dataType": "comment"
}
```

#### Community

```json
{
  "id": "2fwo",
  "name": "t5_2fwo",
  "title": "Programming",
  "url": "https://www.reddit.com/r/programming/",
  "description": "Computer programming",
  "over18": false,
  "numberOfMembers": 5800000,
  "createdAt": "2006-01-25T00:00:00Z",
  "scrapedAt": "2024-06-02T10:30:00Z",
  "dataType": "community"
}
```

#### User

```json
{
  "id": "abc123",
  "url": "https://www.reddit.com/user/dev_user/",
  "username": "dev_user",
  "description": "Software engineer and open source enthusiast",
  "postKarma": 15000,
  "commentKarma": 42000,
  "over18": false,
  "createdAt": "2020-01-15T00:00:00Z",
  "scrapedAt": "2024-06-02T10:30:00Z",
  "dataType": "user"
}
```

### 🗂️ Data fields

| Category | Fields |
|----------|--------|
| **Identity** | id, parsedId, url, username, userId |
| **Content** | title, body, html, flair |
| **Community** | communityName, parsedCommunityName, category, numberOfMembers |
| **Engagement** | upVotes, upVoteRatio, numberOfComments, numberOfreplies, postKarma, commentKarma |
| **Media** | imageUrls, videoUrl, thumbnailUrl, link |
| **Flags** | isVideo, isAd, over18 |
| **Meta** | createdAt, scrapedAt, dataType |

### 🚀 Examples

#### Scrape a subreddit's hottest posts

```json
{
  "startUrls": [{"url": "https://www.reddit.com/r/programming/"}],
  "maxItems": 50,
  "sort": "hot"
}
```

#### Search Reddit for a topic across posts and communities

```json
{
  "searches": ["machine learning"],
  "searchTypes": ["posts", "communities"],
  "sort": "top",
  "time": "month",
  "maxItems": 100
}
```

#### Pull a thread with all its comments

```json
{
  "startUrls": [{"url": "https://www.reddit.com/r/learnprogramming/comments/lp1hi4/is_webscraping_a_good_skill_to_learn/"}],
  "includeComments": true,
  "maxItems": 100
}
```

#### Find active users around a topic

```json
{
  "searches": ["python"],
  "searchTypes": ["users"],
  "sort": "relevance",
  "maxItems": 50
}
```

#### Search inside a single subreddit

```json
{
  "searches": ["python"],
  "searchCommunityName": "programming",
  "sort": "new",
  "maxItems": 50
}
```

#### Get only fresh posts from a subreddit

```json
{
  "startUrls": [{"url": "https://www.reddit.com/r/technology/"}],
  "postDateLimit": "2026-03-01",
  "includeComments": false,
  "maxItems": 200
}
```

### 🤖 Copy to your AI assistant

Paste this block into Claude, ChatGPT, or Cursor to give it full context about this scraper:

```
You have access to the Reddit Scraper on Apify: silentflow/reddit-scraper-ppr

It scrapes public Reddit posts, comments, communities, and users. No login or API key needed.

Input schema:
- startUrls (array of {url}): Reddit URLs (subreddits, posts, users, search pages). Leave empty to use search.
- searches (array of strings): keywords to search Reddit. Requires startUrls empty.
- searchCommunityName (string): restrict a search to one subreddit.
- searchTypes (array): any of "posts", "communities", "users". Default ["posts"].
- sort (string): relevance | hot | top | new | rising | comments. Default "new".
- time (string): all | hour | day | week | month | year. Default "all".
- includeNSFW (boolean, default true)
- includeComments (boolean, default true): also pull comments when visiting posts.
- postDateLimit (string, YYYY-MM-DD): only posts after this date.
- maxItems (integer, default 50, no fixed maximum): total items returned.

Output: one JSON record per item with a "dataType" of post | comment | community | user.
- post: title, body, communityName, username, upVotes, upVoteRatio, numberOfComments, flair, imageUrls, videoUrl, createdAt, url
- comment: body, username, communityName, parentId, postId, upVotes, numberOfreplies, createdAt, url
- community: title, name, description, numberOfMembers, over18, createdAt, url
- user: username, description, postKarma, commentKarma, over18, createdAt, url

Use apify-client for Python or JavaScript. Filter items by dataType.
```

### 💻 Integrations

#### Build a brand-mention monitor (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("silentflow/reddit-scraper-ppr").call(run_input={
    "searches": ["your brand name"],
    "searchTypes": ["posts"],
    "sort": "new",
    "time": "week",
    "maxItems": 200
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["dataType"] == "post":
        print(f"[{item['upVotes']}▲ {item['numberOfComments']}💬] r/{item['parsedCommunityName']}: {item['title']}")
```

#### Track this week's top posts in a niche (JavaScript)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('silentflow/reddit-scraper-ppr').call({
    startUrls: [{ url: 'https://www.reddit.com/r/technology/' }],
    sort: 'top',
    time: 'week',
    includeComments: false,
    maxItems: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items
    .filter((i) => i.dataType === 'post')
    .sort((a, b) => b.upVotes - a.upVotes)
    .forEach((p) => console.log(`${p.upVotes}\t${p.title}`));
```

#### Export a run to CSV (dataset API)

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=csv&token=YOUR_API_TOKEN" -o reddit.csv
```

### 📈 Performance

| Metric | Value |
|--------|-------|
| Data types | Posts, Comments, Communities, Users |
| Items per page | up to 100 |
| Items per run | No fixed limit (set with `maxItems`) |
| Search modes | keyword, subreddit-scoped, URL |
| Login required | No |

### 💾 Data export

Every run writes to an Apify dataset you can export as JSON, CSV, Excel, XML, RSS, or HTML from the Storage tab, or pull programmatically:

```
https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=csv&token=YOUR_TOKEN
```

Connect it to Google Sheets, Airtable, or your warehouse with an Apify integration or a scheduled webhook.

### 💡 Tips for best results

1. **Scope your run with `maxItems`.** Request only the number of results you need, then scale up once the output looks right.
2. **Target specific subreddits.** Focused scraping returns cleaner, more relevant data than broad searches.
3. **Turn off comments when you only need posts.** Set `includeComments: false` to return post-level data only and cut the result count.
4. **Combine search types.** Use `searchTypes: ["posts", "communities"]` to find both discussions and the subreddits behind them in one run.
5. **Test with 10 items first.** Verify your input returns what you expect before launching a large scrape.

### ❓ FAQ

**Q: What exactly can it scrape?**
A: Public Reddit posts, comments, communities (subreddits), and user profiles, with full metadata. Four data types in one actor.

**Q: Do I need a Reddit account or API key?**
A: No. It reads publicly available data. No login, no OAuth, no developer app, no rate-limit quotas.

**Q: What is the difference between search and URL mode?**
A: Search mode takes keywords and queries all of Reddit (optionally scoped to one subreddit). URL mode takes exact subreddit, post, or user links. Both return the same schema.

**Q: Can I scrape communities and users, not just posts?**
A: Yes. Set `searchTypes` to include `communities` or `users`, or pass user and subreddit URLs directly. Most Reddit scrapers only return posts and comments.

**Q: How do I control how much data I get?**
A: Use `maxItems`. It caps the total number of results returned per run, across posts, comments, communities, and users.

**Q: What if a run finds no results?**
A: The run finishes cleanly with an empty dataset. Refine your search terms, sort, or time filter and run it again.

**Q: Can I scrape private subreddits?**
A: No. The scraper only accesses publicly available data.

**Q: Can I limit results to recent posts?**
A: Yes. Set `postDateLimit` (YYYY-MM-DD) to keep only posts after a given date, or use `time` to filter by past hour, day, week, month, or year.

**Q: How fresh is the data?**
A: Every item is fetched live at scrape time, so scores, comment counts, and karma reflect the moment of the run.

**Q: Why are some fields empty, like flair or media?**
A: Reddit only returns them when the post has them. `flair` is null for untagged posts, and `imageUrls`/`videoUrl` are empty for text posts.

### ⚖️ Legal

This Actor extracts publicly available data from Reddit. It does not bypass any login, paywall, or CAPTCHA, and does not access private subreddits or non-public content. Users are responsible for complying with Reddit's terms of service and applicable laws in their jurisdiction. The data returned is informational; verify accuracy for regulated use cases.

### 📬 Support

Need something this scraper doesn't do yet? We ship features fast.

- Feature requests go straight to our backlog
- Enterprise needs? We do custom integrations and high-volume plans
- Pricing questions? Check the Monetization tab on the actor page

Check out our other scrapers: [silentflow on Apify](https://apify.com/silentflow)

# Actor input Schema

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

Reddit URLs to scrape (posts, subreddits, users, etc.). Leave empty to use search instead.

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

Keywords to search on Reddit. Remove all Start URLs above to use search.

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

Restrict search to a specific subreddit (e.g. 'programming').

## `searchTypes` (type: `array`):

Types of results to include when searching.

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

How to sort results.

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

Filter results by time period.

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

Include adult/NSFW content in results.

## `includeComments` (type: `boolean`):

Also scrape comments when visiting posts.

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

Maximum total number of items (posts, comments, communities, users) to return.

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

Only return posts created after this date (YYYY-MM-DD). Automatically sorts by 'New'.

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

Either use Apify proxy, or provide your own proxy servers.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/pasta/comments/vwi6jx/pasta_peperoni_and_ricotta_cheese_how_to_make/"
    }
  ],
  "searches": [
    "artificial intelligence"
  ],
  "searchTypes": [
    "posts"
  ],
  "sort": "new",
  "time": "all",
  "includeNSFW": true,
  "includeComments": true,
  "maxItems": 50,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Complete Reddit data including: id, url, title, body, username, communityName, upVotes, numberOfComments, createdAt, scrapedAt, dataType (post/comment/community/user), and type-specific fields.

## `resultsCSV` (type: `string`):

CSV format export for spreadsheet analysis

## `resultsExcel` (type: `string`):

Excel format export

# 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/comments/vwi6jx/pasta_peperoni_and_ricotta_cheese_how_to_make/"
        }
    ],
    "searches": [
        "artificial intelligence"
    ],
    "searchTypes": [
        "posts"
    ],
    "sort": "new",
    "time": "all",
    "maxItems": 50,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("silentflow/reddit-scraper-ppr").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/comments/vwi6jx/pasta_peperoni_and_ricotta_cheese_how_to_make/" }],
    "searches": ["artificial intelligence"],
    "searchTypes": ["posts"],
    "sort": "new",
    "time": "all",
    "maxItems": 50,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("silentflow/reddit-scraper-ppr").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 '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/pasta/comments/vwi6jx/pasta_peperoni_and_ricotta_cheese_how_to_make/"
    }
  ],
  "searches": [
    "artificial intelligence"
  ],
  "searchTypes": [
    "posts"
  ],
  "sort": "new",
  "time": "all",
  "maxItems": 50,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call silentflow/reddit-scraper-ppr --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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