# Reddit Subreddit Posts Scraper — Bulk Export (`toolzerhub/reddit-subreddit-posts-scraper`) Actor

Collect posts from any subreddit by Best, Hot, New, Top, or Rising. Paginate automatically, choose a maximum result count, and optionally enrich every item with complete post details.

- **URL**: https://apify.com/toolzerhub/reddit-subreddit-posts-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.40 / 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

**Pull a subreddit's post feed by sort mode, with automatic pagination up to a result cap you control.**

Reddit Subreddit Posts Scraper is the ToolzerHub monitoring tool for a single community. Point it at any subreddit name, pick Best, Hot, New, Top, or Rising, and it walks the feed page by page until it hits your Max Results limit or runs out of posts.

### Subreddit name and sort mode drive every feed pull

Only a subreddit name is required. Sort mode, a result cap, and an optional per-post detail add-on shape everything else about the run.

#### Scrape a subreddit feed

Enter a subreddit name, choose a sort mode, set Max Results, and enable Add Post Details when you need full post data for every item.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `subreddit_name` | string | Yes | Subreddit name (without r/), or a subreddit URL (https://www.reddit.com/r/<name>/). |
| `sort` | string | No | Sort order for the feed or listing. |
| `maxItems` | integer | No | Maximum number of items to save. Set 0 for no limit. |
| `enrichPostDetails` | boolean | No | Fetch full post detail for every post found in the feed. This makes one extra request per post. |

#### Example feed pull

```json
{
  "subreddit_name": "pics",
  "sort": "BEST",
  "maxItems": 20,
  "enrichPostDetails": false
}
```

### A post feed built for community monitoring

#### 📝 Post identity

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Reddit fullname or ID of the item (post, comment, or search result). |
| `post_id` | string | Reddit post ID. |
| `title` | string | Post or subreddit title when available. |
| `author` | string | Username of the post or comment author. |
| `subreddit` | string | Subreddit display name the item belongs to. |

#### 📊 Engagement signals

| Field | Type | Description |
| --- | --- | --- |
| `created_at` | string | Creation timestamp reported by the source payload. |
| `score` | number | Net score (upvotes minus downvotes) when available. |
| `upvotes` | number | Upvote count when reported separately from score. |
| `num_comments` | number | Number of comments on the post when available. |

#### 🔍 Optional detail payload

| Field | Type | Description |
| --- | --- | --- |
| `post_detail` | object | Full post detail payload, present when Add Post Details is enabled. |

#### Post feed preview

```json
{
  "post_id": "t3_1uw2gep",
  "title": "Cats being cats",
  "author": "Turbulent_Nerve3744",
  "subreddit": "pics",
  "score": 1250,
  "num_comments": 42
}
```

### Cost of a paginated feed pull

This Actor uses Apify pay-per-result pricing. You are charged for successful dataset results according to the Actor pricing shown on the Apify Pricing tab.

Apify's free credits may cover small test runs and up to the free result allowance configured for the Actor.

Use Max Results to bound a run before scaling to larger subreddits, users, or query lists.

### Responsible subreddit-data use

This Actor extracts publicly available Reddit content. It should not be used to collect private user data. Make sure your use case complies with applicable privacy laws, Reddit's terms, and your own legal obligations. If you are unsure, consult a qualified lawyer.

### Run this Actor from code

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")
run = client.actor("toolzerhub/reddit-subreddit-posts-scraper").call(run_input={
    "subreddit_name": "pics",
    "sort": "BEST",
    "maxItems": 20,
    "enrichPostDetails": false
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### Node.js

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

const client = new ApifyClient({ token: "YOUR_APIFY_API_TOKEN" });
const run = await client.actor("toolzerhub/reddit-subreddit-posts-scraper").call({
  "subreddit_name": "pics",
  "sort": "BEST",
  "maxItems": 20,
  "enrichPostDetails": false
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Look up a subreddit's profile or a single post

- [Reddit Subreddit Info Scraper — Stats & Details](https://apify.com/toolzerhub/reddit-subreddit-info-scraper) — Fetch a subreddit's public profile by name, including community information and available statistics. Enable the optional detail add-on to include style, settings, and highlights.
- [Reddit Post Scraper — Details by URL or ID](https://apify.com/toolzerhub/reddit-post-scraper) — Fetch complete Reddit post records by post ID or permalink URL, or batch multiple comma-separated post IDs in one run. Export structured post, author, content, and engagement data.
- [Reddit Search Scraper — Posts, Users & More](https://apify.com/toolzerhub/reddit-search-scraper) — Search Reddit by keyword across posts, users, subreddits, or comments. Choose the result type, paginate automatically, and export structured search results for research and monitoring.

### ToolzerHub support

Use the Issues tab on the Actor page for bug reports, missing fields, and feature requests.

Contact: contact@toolzerhub.com

# Actor input Schema

## `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.

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

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

## `enrichPostDetails` (type: `boolean`):

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

## Actor input object example

```json
{
  "subreddit_name": "pics",
  "sort": "BEST",
  "maxItems": 20,
  "enrichPostDetails": false
}
```

# Actor output Schema

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

Dataset containing all scraped data

# 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",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/reddit-subreddit-posts-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",
    "maxItems": 20,
}

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bzRvadfAoWJ55taUT/builds/JFlb9TacF0N3YIwwl/openapi.json
