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

Reddit Scraper - Posts, Comments, Subreddits & Users

- **URL**: https://apify.com/abdullahbilal-y/reddit-scraper.md
- **Developed by:** [Abdullah Bilal](https://apify.com/abdullahbilal-y) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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 & Users

### What does Reddit Scraper do?

This Actor scrapes **[Reddit](https://www.reddit.com) posts and comments** four ways: **subreddits**, **keyword searches**, **user profiles** and **post URLs**. Every post comes back with its **title, text, author, score, upvote ratio, comment count, flair, link and timestamp**, and comments keep their **thread structure** (parent, depth), so you can rebuild the conversation.

No Reddit account, login or API key is needed. Running on Apify gives you an API, scheduling, webhooks, and exports to JSON, CSV, Excel and Google Sheets.

**Want sentiment, buying intent and lead signals on every row?** The same scraper with built-in AI analysis and AI filters is **[Reddit Scraper with Jev AI](https://apify.com/abdullahbilal-y/reddit-jev-ai-scraper)**.

### Why use it?

- **Market and product research** — see what a community actually talks about.
- **Brand monitoring** — search for your product or a competitor and collect every mention.
- **Content ideas** — find the questions people keep asking in your niche.
- **Datasets** — build clean post-and-comment datasets for analysis or model training.

### How to use it

1. Click **Try for free**.
2. Pick a **mode**: Subreddits, Keyword search, Users, or Post URLs.
3. Fill the matching field.
4. Optional: set **filters** (minimum score, minimum comments, exclude NSFW) and **comments**.
5. Press **Start**, then download from the **Output** tab.

### Input

| Field | Description |
|---|---|
| `mode` | `subreddit`, `search`, `user` or `post` |
| `subreddits` / `searchQueries` / `usernames` / `postUrls` | What to scrape, depending on mode |
| `sort`, `timeFilter` | Hot / new / top / rising, or search relevance; time range for top and search |
| `maxItems` | Posts read per subreddit, query or user (up to 1,000) |
| `includeComments`, `maxCommentsPerPost`, `commentSort` | Also collect the comment threads of the posts you keep |
| `minScore`, `minComments`, `excludeNsfw` | Filters, applied before results reach your dataset |

Example:

```json
{
  "mode": "subreddit",
  "subreddits": ["SaaS", "startups"],
  "sort": "top",
  "timeFilter": "week",
  "maxItems": 100,
  "minComments": 5,
  "includeComments": true,
  "maxCommentsPerPost": 25
}
```

### Output

Posts and comments are separate results. Download as JSON, HTML, CSV or Excel.

```json
{
  "type": "post",
  "id": "t3_1wl2t46",
  "title": "anything similar to notion that's not obsidian?",
  "text": "my biggest issue with obsidian is it does not nicely group pages together...",
  "subreddit": "Notion",
  "author": "lunar-waves",
  "score": 75,
  "upvoteRatio": 0.94,
  "numComments": 60,
  "flair": "Question",
  "createdAt": "2026-09-20T00:55:16+00:00",
  "url": "https://www.reddit.com/r/Notion/comments/1wl2t46/..."
}
```

#### Data fields

| Field | Description |
|---|---|
| `type` | `post` or `comment` |
| `title`, `text` | Post title and body, or comment text |
| `subreddit`, `author`, `score`, `numComments`, `upvoteRatio`, `flair`, `postType`, `domain`, `linkUrl`, `nsfw` | Reddit metadata |
| `postId`, `parentId`, `depth` | Comment threading |
| `createdAt`, `url` | Timestamp and permalink |
| `sourceSubreddit`, `searchQuery`, `sourceUser`, `sourcePostUrl` | Which of your inputs produced the row |

### How much does it cost to scrape Reddit?

See the **Pricing** tab for current numbers. Reddit only answers residential IPs, so runs use Apify's residential proxy, which is already set in the input. **Rows removed by your filters are never charged**, and if you set a maximum cost for a run, the Actor stops scraping when it is reached.

### Tips

- **Use `sort: new` with a daily schedule** to monitor a subreddit or keyword as it happens.
- **Use `top` with a time range** for the highest-signal posts of the week, month or year.
- **Comments multiply results.** Turn on `includeComments` only when you need the threads.

### FAQ

**Do I need a Reddit account or API key?**
No. Only publicly visible content is collected, with no login.

**Why did I get fewer posts than `maxItems`?**
Reddit ends its listings at roughly 1,000 posts, and its search serves 7 posts per page and usually stops after 100–250 per query — add more queries to cover more ground. Small communities simply have fewer posts. The run log says how many pages Reddit served and why it stopped.

**Why do search results have shorter text than subreddit results?**
Reddit's search pages carry each post's title and a short snippet, not the full body. For full post text, scrape the subreddit instead.

**Why did User mode return newest posts when I asked for top?**
For some accounts Reddit renders an empty page for the top- or hot-sorted list. Rather than return nothing, the Actor falls back to the account's newest posts and says so in the run log.

**How many comments can I get per post?**
Reddit shows 25 comments per view. Above 25, the Actor combines several sort orders to collect more — typically 20–90 per busy thread, capped at your `maxCommentsPerPost` (up to 100).

**Why doesn't Post URL mode return the post itself?**
Reddit does not expose a single post's details through the pages this Actor reads, so Post URL mode returns the comment thread. For post details, use Subreddit, Search or User mode with `includeComments`.

### Legal and disclaimer

This Actor collects only **publicly available Reddit content**, with no login and no access to private communities or messages. You are responsible for how you use the data, including compliance with Reddit's terms, GDPR, CCPA and other applicable law. Posts and comments can contain personal data — only process it where you have a valid legal basis.

### Support

Found a bug or want a feature? Open a ticket on the **Issues** tab.

# Actor input Schema

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

Pick one. Each mode uses its own input field below.

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

Names, r/names or subreddit URLs.

## `searchQueries` (type: `array`):

Keywords or phrases. Reddit search syntax works, e.g. 'notion alternative subreddit:productivity'.

## `usernames` (type: `array`):

Usernames, u/names or profile URLs.

## `postUrls` (type: `array`):

Full Reddit post links. Returns the comment thread of each post.

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

Subreddits: hot, new, top, rising. Search: relevance, hot, top, new, comments. Users: new, hot, top. Unsupported values fall back to the mode's default.

## `timeFilter` (type: `string`):

Used by Top sort and by search.

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

How many posts to read per subreddit, query or user. Pages are fetched automatically. Reddit itself stops around 1,000 posts per listing, and search usually stops after 100-250 per query.

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

Fetch the comment thread of every post that passes your filters. Each comment is returned (and billed) as its own result.

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

Includes visible nested replies. Reddit shows 25 comments per view; above 25, the Actor merges several sort orders to collect more (up to 100). Very large threads will not be returned in full.

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

Which comments come first.

## `minScore` (type: `integer`):

Drop results below this score. Filtered rows are not charged.

## `minComments` (type: `integer`):

Drop posts with fewer comments. Filtered rows are not charged.

## `excludeNsfw` (type: `boolean`):

Drops results Reddit marks as NSFW. Best effort: it relies on Reddit's own marking.

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

Required, and already set. Reddit blocks Apify's server IPs and datacenter proxies; residential proxies work reliably.

## Actor input object example

```json
{
  "mode": "subreddit",
  "subreddits": [
    "SaaS",
    "startups"
  ],
  "searchQueries": [
    "notion alternative"
  ],
  "sort": "hot",
  "timeFilter": "week",
  "maxItems": 10,
  "includeComments": false,
  "maxCommentsPerPost": 25,
  "commentSort": "best",
  "excludeNsfw": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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 = {
    "subreddits": [
        "SaaS",
        "startups"
    ],
    "searchQueries": [
        "notion alternative"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("abdullahbilal-y/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 = {
    "subreddits": [
        "SaaS",
        "startups",
    ],
    "searchQueries": ["notion alternative"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("abdullahbilal-y/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 '{
  "subreddits": [
    "SaaS",
    "startups"
  ],
  "searchQueries": [
    "notion alternative"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call abdullahbilal-y/reddit-scraper --silent --output-dataset

```

## MCP server setup

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