# Reddit Subreddit Posts Scraper (`scrapingdino/reddit-subreddit-posts-scraper`) Actor

Export posts from one or more subreddits across hot, new, top, rising, and controversial feeds. Structured feeds for monitoring and content research. $0.50 per 1,000 posts.

- **URL**: https://apify.com/scrapingdino/reddit-subreddit-posts-scraper.md
- **Developed by:** [Scraping Dino](https://apify.com/scrapingdino) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 posts

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/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 Subreddit Posts Scraper - Extract Hot, New, Top & Controversial Posts

### Overview

The **Reddit Subreddit Posts Scraper** collects posts from one or more subreddits across feed modes — Hot, New, Rising, Top, and Controversial. Set a time window for Top/Controversial and a per-subreddit result cap to build reliable community datasets.

Perfect for community managers, social listening platforms, researchers, and developers automating subreddit monitoring. Pass plain names (`askreddit`) or `r/`-prefixed values; the scraper normalizes them and returns **clean, structured JSON** for every post.

Use it for continuous brand tracking inside niche communities, competitor launch watches, or building training sets from high-signal subreddits.

### Features

- Multi-subreddit batch runs
- Feed modes: `hot`, `new`, `rising`, `top`, `controversial`
- Time filter for Top/Controversial: `hour` → `all`
- Per-subreddit `maxResults` (default 75, max 500)
- Accepts `askreddit` or `r/askreddit` forms
- Structured post summaries with scores, authors, and URLs
- Concurrent subreddit workers for speed
- Per-target error rows for resilient batches

### Use Cases

- **Brand monitoring** — Watch product mentions in target communities
- **Market research** — Sample discussions from category-defining subs
- **Competitor analysis** — Track competitor threads in industry subs
- **Trend monitoring** — Compare Hot vs Rising inside a niche
- **Content research** — Find high-upvote posts for content ideas
- **Lead generation** — Surface “looking for recommendations” posts
- **AI training datasets** — Curate domain-specific Reddit posts
- **Data analytics** — Measure engagement by subreddit and feed type
- **Academic research** — Export community corpora for coding

### Input

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `subreddits` | array of strings | **Yes** | — | Subreddit names (`python`, `r/python`, or community URLs). |
| `mode` | string | No | `"hot"` | Feed: `hot`, `new`, `rising`, `top`, `controversial`. |
| `time` | string | No | `"week"` | Time range when mode is `top` or `controversial`. |
| `maxResults` | integer | No | `75` | Max posts per subreddit (1–500). |

**How parameters affect the run:** `mode` selects the listing algorithm. `time` is ignored for hot/new/rising. Larger `maxResults` increases pagination depth and runtime per subreddit.

#### Example input

```json
{
  "subreddits": ["SaaS", "startups", "r/Entrepreneur"],
  "mode": "top",
  "time": "month",
  "maxResults": 100
}
```

### Output

| Field | Type | Description |
|---|---|---|
| `subreddit` | string | Normalized subreddit |
| `mode` / feed metadata | string | Feed used for the fetch |
| `id` | string | null | Post ID |
| `name` | string | null | Fullname |
| `kind` | string | null | Kind (`t3`) |
| `title` | string | null | Title |
| `author` | string | null | Author |
| `score` | number | null | Score |
| `numComments` | number | null | Comments |
| `createdUtc` | number | string | null | Created |
| `permalink` | string | null | Permalink |
| `url` | string | null | Link URL |
| `body` | string | null | Selftext excerpt |

Error rows include `type: "error"`, the subreddit, and `error` message.

### Example Output

```json
{
  "subreddit": "SaaS",
  "mode": "top",
  "time": "month",
  "id": "1mn8901",
  "name": "t3_1mn8901",
  "kind": "t3",
  "title": "We hit $10k MRR with a boring vertical CRM — lessons learned",
  "author": "bootstrap_founder",
  "score": 1540,
  "numComments": 248,
  "createdUtc": 1715600000,
  "permalink": "https://www.reddit.com/r/SaaS/comments/1mn8901/we_hit_10k_mrr_with_a_boring_vertical_crm/",
  "url": "https://www.reddit.com/r/SaaS/comments/1mn8901/we_hit_10k_mrr_with_a_boring_vertical_crm/",
  "body": "No VC, no Twitter fame — just weekly customer interviews and ruthless prioritization..."
}
```

### Related Scrapers

- **Reddit Subreddit Scraper** — About info, rules, similar communities
- **Reddit Popular Posts Scraper** — Sitewide trending feeds
- **Reddit Search Scraper** — Keyword discovery across Reddit
- **Reddit Comment Tree Scraper** — Pull comments for posts you collect here

# Actor input Schema

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

Subreddit names to scrape posts from. Enter one per line — plain names or r/name are accepted.

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

Choose which subreddit feed to scrape.

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

Only applies when Feed Type is Top or Controversial.

## `maxResults` (type: `integer`):

Maximum number of posts to scrape per subreddit.

## Actor input object example

```json
{
  "subreddits": [
    "askreddit",
    "python"
  ],
  "mode": "hot",
  "time": "week",
  "maxResults": 75
}
```

# Actor output Schema

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

Default dataset items produced by this Actor.

# 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": [
        "askreddit",
        "python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingdino/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 = { "subreddits": [
        "askreddit",
        "python",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingdino/reddit-subreddit-posts-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": [
    "askreddit",
    "python"
  ]
}' |
apify call scrapingdino/reddit-subreddit-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapingdino/reddit-subreddit-posts-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/VF8Y9n9OVmh9wqOZH/builds/OHX8Ih1QvoBMCI4Dg/openapi.json
