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

Scrape Reddit without login: posts and comments (with nested reply threads), user profiles, subreddit data, and search results. Fast, reliable, and cheap.

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

## Pricing

from $0.002 / post scraped

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/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 — Posts, Comments, Users & Subreddits

Scrape Reddit **without login or API keys**: posts and comments (with full nested reply threads), user profiles with karma, subreddit data, and search results. Reliable, fast, and priced to beat the alternatives.

### Features

- 📋 **Subreddit posts** — scrape any subreddit sorted by hot, new, top, rising, or controversial, with time filters
- 💬 **Comments** — full **nested reply threads**, with "load more" expansion, author, score, and timestamps
- 🔍 **Search** — Reddit-wide or within a specific subreddit, by relevance, top, new, or comment count
- 👤 **Users** — profile (karma, account age, verification) plus recent posts and comments
- 🖼️ **Rich post data** — score, upvote ratio, flair, awards, images/galleries, crossposts, media flags
- ⚡ **Reliable & cheap** — pure JSON (no browser), residential proxies to avoid blocks, automatic retries

### Input

Provide any combination of subreddits, post URLs, search queries, and usernames.

```json
{
  "subreddits": ["https://www.reddit.com/r/programming"],
  "searchQueries": ["rust vs go"],
  "postUrls": ["https://www.reddit.com/r/programming/comments/abc123/some_post/"],
  "usernames": ["spez"],
  "sort": "hot",
  "time": "week",
  "maxItems": 50,
  "includeComments": true,
  "maxComments": 100
}
```

| Field | Description |
|---|---|
| `subreddits` | Subreddit URLs or names to scrape posts from |
| `postUrls` | Direct post links (returns post + comments) |
| `searchQueries` | Search terms |
| `usernames` | Users to scrape (profile + recent activity) |
| `sort` | hot / new / top / rising / relevance / comments |
| `time` | hour / day / week / month / year / all (for top & search) |
| `maxItems` | Max posts per subreddit / query / user |
| `includeComments` | Attach nested comments to each post |
| `maxComments` | Max comments (incl. replies) per post |

### Output

Each post is one dataset item:

```json
{
  "type": "post",
  "id": "abc123",
  "title": "Show HN: I built ...",
  "author": "some_user",
  "subreddit": "programming",
  "score": 2453,
  "upvoteRatio": 0.97,
  "numComments": 312,
  "permalink": "https://www.reddit.com/r/programming/comments/abc123/...",
  "createdAt": "2026-07-01T12:34:00.000Z",
  "selftext": "...",
  "comments": [
    { "author": "u1", "body": "Great work!", "score": 88, "replies": [ … ] }
  ]
}
```

Users and subreddits are emitted as `type: "user"` and `type: "subreddit"` items.

### Common use cases

- **Market & brand research** — monitor mentions and sentiment across subreddits
- **Lead generation & community analysis** — find and profile active users
- **LLM / RAG data** — feed posts and comment threads into models
- **Trend tracking** — watch what rises in any subreddit over time

### FAQ

**Do I need a Reddit account or API key?**
No. The Actor scrapes public data through [Reddit](https://www.reddit.com)'s official OAuth API with no login required. For heavy usage you can optionally paste a free Reddit app client ID (from reddit.com/prefs/apps) to get a dedicated rate limit.

**How many posts and comments can I scrape per run?**
There's no fixed cap. `maxItems` limits posts per subreddit, query, or user, and `maxComments` limits comments (including nested replies) per post. Larger runs simply take longer and cost more per item.

**Is scraping Reddit legal?**
The Actor collects only publicly available data. You are responsible for using it in line with Reddit's terms and applicable laws — avoid collecting personal data you don't have a lawful basis to process.

**What's the output format?**
A structured JSON dataset with one item per post, user, or subreddit (comments nest inside their post). You can export it as JSON, CSV, or Excel from the Apify Console or API.

**Can I filter or limit results?**
Yes. Use `sort` (hot/new/top/rising/controversial), `time` filters, `maxItems`, `maxComments`, and the `includeComments` toggle to scope exactly what you collect.

### Related Actors

Building a broader social, news, or research dataset? Pair this with:

- [Telegram Channel Scraper](https://apify.com/hipersoft/telegram-scraper) — public posts from Telegram channels, no login.
- [Google News Scraper](https://apify.com/hipersoft/google-news-scraper) — headlines by keyword and topic from Google News RSS.
- [Hacker News Scraper](https://apify.com/hipersoft/hacker-news-scraper) — stories, comments, and users from Hacker News.
- [Website Content Crawler](https://apify.com/hipersoft/website-content-crawler) — crawl any site into clean text for LLM/RAG pipelines.

### Notes

Only public data is scraped via Reddit's official OAuth API — reliable and fast, with no login required. Cheap datacenter proxies are used by default (no expensive residential proxy needed).

For heavy usage, register a free Reddit app at reddit.com/prefs/apps and paste its client ID into the "Reddit app client ID" field for a dedicated rate limit.

# Actor input Schema

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

Subreddit URLs or names (e.g. "programming" or "https://www.reddit.com/r/programming"). Returns posts from each.

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

Direct links to Reddit posts. Each returns the post plus its comments (if enabled below).

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

Search Reddit and scrape the resulting posts.

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

Reddit usernames (e.g. "spez" or a profile URL). Returns the user's profile plus recent posts and comments.

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

How to sort subreddit and search results.

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

Time range for 'top' and search sorting.

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

Maximum posts to scrape per subreddit / search query / user.

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

Fetch comments with nested reply threads for each post (add-on, charged per comment).

## `maxComments` (type: `integer`):

Maximum comments (incl. nested replies) to fetch per post.

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

Proxy to use. Reddit's OAuth API works from datacenter IPs, so cheap datacenter proxies are used by default (they rotate IPs to avoid per-IP limits). No residential proxy needed.

## Actor input object example

```json
{
  "subreddits": [
    "https://www.reddit.com/r/programming"
  ],
  "sort": "hot",
  "time": "all",
  "maxItems": 50,
  "includeComments": false,
  "maxComments": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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": [
        "https://www.reddit.com/r/programming"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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": ["https://www.reddit.com/r/programming"] }

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/reddit-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 '{
  "subreddits": [
    "https://www.reddit.com/r/programming"
  ]
}' |
apify call hipersoft/reddit-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/8MS9Iyb8bOWs2AaIk/builds/MCphYLcMIWgsy4yC3/openapi.json
