# Reddit Subreddit Scraper — Posts, Scores & Comment Counts (`maged120/reddit-subreddit`) Actor

Scrape posts from any Reddit subreddit. Get titles, scores, comment counts, authors, timestamps, and links. Supports hot, new, top, and rising sort orders.

- **URL**: https://apify.com/maged120/reddit-subreddit.md
- **Developed by:** [Maged](https://apify.com/maged120) (community)
- **Categories:** Automation, Social media
- **Stats:** 12 total users, 4 monthly users, 89.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

### What does Reddit Subreddit Scraper do?

**Reddit Subreddit Scraper** extracts posts from any subreddit — hot, new, top, or rising — without needing a Reddit API key. Get post titles, scores, comment counts, authors, timestamps, flairs, and URLs for any subreddit, and export the results as structured JSON or CSV.

This Actor runs on the [Apify platform](https://apify.com), perfect for content discovery, trend analysis, niche community research, and competitive monitoring.

### Why use Reddit Subreddit Scraper?

- **No Reddit API key** — no OAuth setup, no rate limits
- **All sort modes** — hot, new, top (day/week/month/year/all-time), rising
- **Batch subreddits** — scrape multiple subreddits in one run
- **Content research** — find high-performing posts in any niche
- **Competitor monitoring** — track competitor mentions in relevant communities

### How to use Reddit Subreddit Scraper

1. Open the Actor and click **Try for free**
2. Enter subreddit names in the `subreddits` field
3. Choose a sort mode and time filter
4. Set the maximum number of posts
5. Click **Start** — results appear in the Output tab
6. Download as JSON, CSV, or Excel

### Input

```json
{
  "subreddits": ["Python", "MachineLearning", "datascience"],
  "sort": "hot",
  "time": "week",
  "maxPosts": 100
}
```

| Field | Type | Description | Default |
|---|---|---|---|
| `subreddits` | array | Subreddit names (without `r/`) | required |
| `sort` | string | `hot`, `new`, `top`, `rising` | `hot` |
| `time` | string | Time filter for `top`: `day`, `week`, `month`, `year`, `all` | `week` |
| `maxPosts` | integer | Max posts per subreddit | `100` |

### Output

Results are stored in the Apify dataset. Download in JSON, CSV, HTML, or Excel.

```json
{
  "subreddit": "Python",
  "sort": "hot",
  "title": "I built a tool that converts Python code to TypeScript automatically",
  "url": "https://www.reddit.com/r/Python/comments/example/",
  "author": "u/devbuilder",
  "score": 2341,
  "numComments": 187,
  "upvoteRatio": 0.95,
  "created": "2024-03-15T08:00:00Z",
  "flair": "Project",
  "isSelf": false,
  "thumbnail": "https://..."
}
```

### Output fields

| Field | Type | Description |
|---|---|---|
| `subreddit` | string | Subreddit name |
| `sort` | string | Sort mode used |
| `title` | string | Post title |
| `url` | string | Post URL |
| `author` | string | Post author |
| `score` | number | Net upvote score |
| `numComments` | number | Comment count |
| `upvoteRatio` | number | Upvote ratio (0–1) |
| `created` | string | Post creation timestamp |
| `flair` | string | Post flair |
| `isSelf` | boolean | True if text post, false if link post |

### Cost

Pay-per-result pricing:

| Volume | Estimated cost |
|---|---|
| 500 posts | ~$0.05–$0.25 |
| 5,000 posts | ~$0.50–$2.50 |
| 50,000 posts | ~$5–$25 |

### Tips

- Use `sort: "top"` with `time: "all"` to find the most acclaimed posts ever in a subreddit — great for content inspiration
- Schedule daily scrapes of `sort: "hot"` to build a trending-content feed
- Scrape multiple subreddits at once by adding them all to the `subreddits` array
- Use `sort: "new"` for near-real-time monitoring of fresh posts

### FAQ

**Does this require a Reddit account or API key?**
No — the Actor accesses Reddit's public listing pages.

**Can I scrape private or NSFW subreddits?**
Only public subreddits are supported.

**How many posts can I get per subreddit?**
Reddit typically exposes up to 1,000 posts per sort/time combination. Set `maxPosts` accordingly.

**Is this Actor maintained?**
Yes. Report bugs or feature requests in the Issues tab.

**Need help or have questions?**
Open an issue in the Issues tab or reach out on Discord: **maged03211**

# Actor input Schema

## `subreddit` (type: `string`):

Subreddit to use (e.g., 'web').

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

Time to search (e.g., 'year', 'month', 'week', 'day', or 'hour'). Only required if type is 'subreddit' or 'user'.

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

Time to search (e.g., 'year', 'month', 'week', 'day', or 'hour'). Only required if type is 'subreddit' or 'user'.

## `proxy_configuration` (type: `object`):

Leave the default Apify Residential proxy and do not select a specific country (leave it on automatic) for best results and to avoid rate limiting.

## `limit` (type: `integer`):

Maximum number of posts to retrieve (default: 25).

## Actor input object example

```json
{
  "subreddit": "web",
  "time": "all",
  "sort": "new",
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "limit": 10
}
```

# 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 = {
    "limit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/reddit-subreddit").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 = { "limit": 10 }

# Run the Actor and wait for it to finish
run = client.actor("maged120/reddit-subreddit").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 '{
  "limit": 10
}' |
apify call maged120/reddit-subreddit --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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