# Reddit Scraper | All-In-One (`toolzerhub/reddit-scraper`) Actor

Extract Reddit posts, comments, users, and subreddits in one Actor. Add a subreddit, post URL, username, or search term and get post ID, title, author, score, comment count, karma, and subscriber counts. No Reddit account or API key required.

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

## Pricing

from $1.35 / 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

Pull Reddit posts, comments, users, subreddits, search results, and front-page feeds from one Actor. Give it a subreddit name, a post ID or permalink, a username, or a search term, and it returns structured rows — titles, authors, scores, comment counts, karma, subscriber counts. No Reddit account or API key required: every request goes through this Actor's own backend, never through Reddit's own API.

### Modes

Set **`scraperType`** to pick what this run collects. Each mode takes its own identifier below the picker.

| Mode | Returns | Needs | Or use the focused Actor |
|---|---|---|---|
| Subreddit feed | Posts from a subreddit, sorted Best/Hot/New/Top/Rising | `subreddit_name` | [Reddit Subreddit Posts Scraper](https://apify.com/toolzerhub/reddit-subreddit-posts-scraper) |
| Subreddit info | A subreddit's public profile and stats | `subreddit_name` | [Reddit Subreddit Info Scraper](https://apify.com/toolzerhub/reddit-subreddit-info-scraper) |
| Post | One post, or a batch of posts | `post_id` or `post_ids` | [Reddit Post Scraper](https://apify.com/toolzerhub/reddit-post-scraper) |
| Post comments | A post's comment tree, sorted Best/New/Top/Old | `post_id` | [Reddit Post Comments Scraper](https://apify.com/toolzerhub/reddit-post-comments-scraper) |
| User profile | A user's public profile | `username` | [Reddit User Profile Scraper](https://apify.com/toolzerhub/reddit-user-profile-scraper) |
| User posts | Everything a user has submitted | `username` | [Reddit User Posts Scraper](https://apify.com/toolzerhub/reddit-user-posts-scraper) |
| User comments | Everything a user has commented | `username` | [Reddit User Comments Scraper](https://apify.com/toolzerhub/reddit-user-comments-scraper) |
| Search | Posts, users, subreddits, or comments matching a keyword | `keyword` | [Reddit Search Scraper](https://apify.com/toolzerhub/reddit-search-scraper) |
| Feeds | Reddit's Home, Popular, Games, or News front page | `feed_type` (defaults to `home`) | [Reddit Feed Scraper](https://apify.com/toolzerhub/reddit-feed-scraper) |

**`scraperType`** is the only field this Actor marks required. Everything else is mode-specific, so leave the wrong field blank and nothing crashes at validation time — the run starts, then behaves per mode: **Post** stops immediately with `Provide either post_id or post_ids.` if both are empty. Every other mode without its identifier runs to completion and saves nothing, logging why — `No user profile found for username=undefined`, for example. Either way, check the run log before assuming a mode is broken; an empty dataset and a failed run are not the same thing here.

### One Actor or nine?

The nine modes above are also sold as their own focused Actors, each cheaper per result and scoped to one input. Reach for a focused Actor once you know exactly what you're pulling and want the smallest possible run — post lookups by ID, one subreddit's feed, one user's history. Reach for this Actor when you're still exploring a research question that spans more than one of those — a post plus its comment tree plus the author's other posts, say — because that's one Actor integration and one dataset schema instead of switching between several.

### Input

```json
{
  "scraperType": "post",
  "post_ids": "t3_1uw2gep, https://www.reddit.com/r/AskReddit/comments/1v03k9x/, 1v11abc"
}
```

`maxItems` (default `100`, `0` for no limit) caps paginated modes — subreddit feed, post comments, user posts, user comments, search, and feeds. Post, subreddit info, and user profile aren't paginated: they return one row (or one row per batched ID).

### Output

Field names vary by mode; a subreddit feed row and a search result don't carry the same columns. Across all nine modes, the fields you'll see are:

| Field | Contents |
|---|---|
| **`id`**, **`post_id`** | Reddit fullname or ID |
| **`subreddit_id`** | The subreddit's ID |
| **`username`** | Reddit username |
| **`title`** | Post or subreddit title |
| **`author`** | Username of the post or comment author |
| **`subreddit`** | Subreddit display name |
| **`created_at`** | Creation timestamp |
| **`score`** | Net score |
| **`upvotes`** | Upvote count, where reported separately |
| **`num_comments`** | Comment count |
| **`post_detail`**, **`subreddit_detail`**, **`user_detail`**, **`comment_detail`** | Full detail payload, present only when the matching add-on is on |

```json
{
  "post_id": "t3_1uw2gep",
  "subreddit_id": "t5_2tk95",
  "title": "[OC] Every subway system in the world, to scale",
  "author": "transit_nerd",
  "subreddit": "dataisbeautiful",
  "created_at": "2026-07-14T09:12:44.000Z",
  "score": 41203,
  "num_comments": 887
}
```

### Questions

**I set `scraperType` to `post` but nothing came back. Why?**
`post` needs either `post_id` or `post_ids` — the run throws `Provide either post_id or post_ids.` if both are blank. Every other mode fails quieter: leave `username` off **User Profile**, for example, and the run finishes clean with zero rows and a log line naming the missing field, rather than an error.

**How do I fetch 30 posts without 30 runs?**
Pass all 30 to `post_ids`, comma-separated — permalinks, bare IDs, and `t3_`-prefixed IDs can mix in the same list, and duplicates are collapsed before anything is requested. The Actor picks between three upstream batch sizes depending on how many IDs remain: single lookups under 5, 5-post batches from 5 to 24, and 30-post batches from 25 up. One run of 30 is cheaper than 30 runs of one.

**Some post or comment IDs returned no rows. Which ones?**
Deleted, removed, or private posts come back empty rather than failing the run. Compare the log's reported count against how many IDs you sent to see which were dropped.

**Why did my subreddit or user search return nothing?**
Reliably supported search types are `post` and `comment`. `user` and `subreddit` searches can come back with an empty result set from Reddit's own search backend — the run logs this rather than treating it as a broken query, and it's a platform limitation, not something a keyword change fixes.

**What does `Add Comment Replies` actually add?**
Reddit's comment tree ships collapsed reply threads as "load more" markers, not full comments. With the add-on off, those markers are skipped and never billed. With it on, each marker is saved as its own row carrying the cursor needed to expand that thread — turning it on can change your row count without changing how many real comments exist.

**Is a Reddit account or API key needed?**
No. Every mode goes through this Actor's own backend; no Reddit login, cookie, or API credential is ever sent.

### Related Actors

| Actor | Purpose |
|---|---|
| [Reddit Post Scraper](https://apify.com/toolzerhub/reddit-post-scraper) | Post lookups by ID or permalink, single or batched |
| [Reddit Post Comments Scraper](https://apify.com/toolzerhub/reddit-post-comments-scraper) | One post's comment tree |
| [Reddit Subreddit Posts Scraper](https://apify.com/toolzerhub/reddit-subreddit-posts-scraper) | One subreddit's feed |
| [Reddit User Posts Scraper](https://apify.com/toolzerhub/reddit-user-posts-scraper) | One user's post history |
| [Reddit Search Scraper](https://apify.com/toolzerhub/reddit-search-scraper) | Keyword search across posts and comments |

# Actor input Schema

## `scraperType` (type: `string`):

Choose the dataset for this run, then fill in the section for that mode below.

## `subreddit_name` (type: `string`):

Subreddit name (without r/), or a subreddit URL (https://www.reddit.com/r/<name>/).

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

Sort order for the feed or listing. Not every Reddit listing offers every order — one that doesn't applies its own default instead.

## `addonPostDetails` (type: `boolean`):

Fetch full post detail for every post found in the feed. This makes one extra request per post.

## `addonSubredditDetails` (type: `boolean`):

Fetch subreddit style, settings, and highlights alongside the base subreddit info.

## `post_id` (type: `string`):

Reddit post ID (e.g. t3\_1uw2gep), or a full post permalink URL.

## `post_ids` (type: `string`):

Comma-separated list of Reddit post IDs to batch-fetch instead of a single post\_id. Runs use posts/batch for up to 5 IDs and posts/batch-large above that.

## `sort_type` (type: `string`):

Sort order for the comment tree.

## `addonCommentReplies` (type: `boolean`):

Fetch nested reply threads for comments that have collapsed replies.

## `username` (type: `string`):

Reddit username (without u/), or a profile URL (https://www.reddit.com/user/<name>/).

## `addonUserDetails` (type: `boolean`):

Fetch trophy case and active-subreddit data alongside the base user profile.

## `keyword` (type: `string`):

Keyword or phrase to search Reddit for.

## `search_type` (type: `string`):

Type of Reddit content to search for.

## `feed_type` (type: `string`):

Which Reddit front-page feed to collect.

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

Maximum number of items to save. Set 0 for no limit.

## Actor input object example

```json
{
  "scraperType": "subredditFeed",
  "subreddit_name": "pics",
  "sort": "HOT",
  "addonPostDetails": false,
  "addonSubredditDetails": false,
  "post_id": "t3_1uw2gep",
  "post_ids": "t3_1uw2gep,t3_1uw2geq",
  "sort_type": "CONFIDENCE",
  "addonCommentReplies": false,
  "username": "Turbulent_Nerve3744",
  "addonUserDetails": false,
  "keyword": "cats",
  "search_type": "post",
  "feed_type": "home",
  "maxItems": 20
}
```

# Actor output Schema

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

Every record collected during this run

# 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 = {
    "subreddit_name": "pics",
    "post_id": "t3_1uw2gep",
    "post_ids": "",
    "username": "Turbulent_Nerve3744",
    "keyword": "cats",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/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 = {
    "subreddit_name": "pics",
    "post_id": "t3_1uw2gep",
    "post_ids": "",
    "username": "Turbulent_Nerve3744",
    "keyword": "cats",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("toolzerhub/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 '{
  "subreddit_name": "pics",
  "post_id": "t3_1uw2gep",
  "post_ids": "",
  "username": "Turbulent_Nerve3744",
  "keyword": "cats",
  "maxItems": 20
}' |
apify call toolzerhub/reddit-scraper --silent --output-dataset

```

## MCP server setup

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