# 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:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0017 / 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.
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?

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** into clean JSON, CSV or Excel: **posts and comments** (with full nested reply threads), **user profiles** with karma, **subreddit** data and **search results**. No login and no account needed. Fast and reliable.

![Reddit Scraper input — subreddits, search queries and comment options in the Apify Console](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/reddit-scraper-input.png?v=2)

### What does the Reddit Scraper do?

The Reddit Scraper collects public data from Reddit by subreddit, post URL, search query or username. It returns structured records for posts, nested comments, users and subreddits — score, upvote ratio, flair, awards, images, timestamps and more — ready to export or push into your own pipelines.

### What data can you scrape from Reddit?

- 📋 **Subreddit posts** — any subreddit sorted by hot, new, top, rising or controversial, with time filters
- 💬 **Comments** — full nested reply threads with author, score and timestamps
- 🔍 **Search** — Reddit-wide or within a 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 and media flags

### Use cases

- **Market & brand research** — monitor mentions and sentiment across subreddits.
- **Community analysis & lead gen** — find and profile active users on a topic.
- **LLM / RAG datasets** — feed posts and comment threads into your models.
- **Trend tracking** — watch what rises in any subreddit over time.
- **Content & competitor monitoring** — follow discussions about a product or niche.

### How to scrape Reddit data

1. Add the Reddit Scraper to your Apify account.
2. Paste any combination of subreddits, post URLs, search queries or usernames.
3. Choose a `sort` order and `time` filter, and toggle `includeComments`.
4. Set `maxItems` and `maxComments`, then click **Run**.
5. Export the dataset as JSON, CSV or Excel, or pull it via the Apify API.

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

### What you get

![Reddit Scraper output example — posts with score, comments and subreddit as structured JSON](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/reddit-scraper-output.png?v=5)

Each post is one dataset item; users and subreddits are emitted as `type: "user"` and `type: "subreddit"` items.

```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": [ … ] }
  ]
}
```

#### Output schema

| Field | Type | Description |
|---|---|---|
| `type` | string | Item type: `post`, `comment`, `user` or `subreddit`. |
| `id` | string | Reddit's base-36 identifier for the item. |
| `fullId` | string | Reddit fullname (prefixed identifier, e.g. `t3_abc123`). |
| `title` | string | Post title. |
| `author` | string | Username of the author. |
| `authorFullId` | string | Reddit fullname of the author. |
| `subreddit` | string | Subreddit name. |
| `subredditPrefixed` | string | Subreddit name with the `r/` prefix. |
| `selftext` | string | Body text of a self/text post. |
| `url` | string (URL) | URL the post points to (external link or Reddit permalink). |
| `permalink` | string (URL) | Permanent Reddit link to the post. |
| `score` | integer | Net score (upvotes minus downvotes). |
| `upvoteRatio` | number | Ratio of upvotes to total votes. |
| `numComments` | integer | Number of comments on the post. |
| `createdUtc` | integer | Creation time as a Unix timestamp. |
| `createdAt` | string (ISO date) | Creation time in ISO 8601. |
| `flair` | string | Post flair text. |
| `domain` | string | Domain of the linked content. |
| `isSelf` | boolean | Whether the post is a text/self post. |
| `isVideo` | boolean | Whether the post hosts a video. |
| `over18` | boolean | Whether the post is marked NSFW. |
| `spoiler` | boolean | Whether the post is marked as a spoiler. |
| `stickied` | boolean | Whether the post is pinned in the subreddit. |
| `locked` | boolean | Whether commenting is locked. |
| `thumbnail` | string | Thumbnail image reference. |
| `totalAwards` | integer | Total number of awards received. |
| `numCrossposts` | integer | Number of times the post was crossposted. |
| `images` | array | List of image/gallery URLs attached to the post. |
| `comments` | array | Nested comment threads (when comments are included). |

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

### FAQ

**Do I need a Reddit account or login?**
No. Just add your inputs and run — no account, login or setup required.

**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.

**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). Export 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.

**Can I connect it to other tools?**
The Reddit Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

### Notes

Original clean-room implementation. Returns only public data; you are responsible for compliance with Reddit's terms. Not affiliated with Reddit.

# 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 configuration. Leave the default — it is tuned for reliable results.

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

# Actor output Schema

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

The scraped results as dataset items.

# 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(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": [
    "https://www.reddit.com/r/programming"
  ]
}' |
apify call hipersoft/reddit-scraper --silent --output-dataset

```

## MCP server setup

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