# Reddit Scraper: Posts, Comments & Subreddit Monitor (`themineworks/reddit-scraper`) Actor

Scrape Reddit posts, comments, subreddits, search & user history. No login, pay per result, full nested comment trees, deep historical backfill. Use in Claude, ChatGPT & any MCP agent for market research, sentiment & AI training data.

- **URL**: https://apify.com/themineworks/reddit-scraper.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Social media, Lead generation, MCP servers
- **Stats:** 5 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 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/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 & Search (No Login)

> **Part of the Social & Market Research MCP.** This actor's data is also available to AI agents through our [Social & Market Research MCP server](https://apify.com/themineworks/social-research-mcp) — eight social, news and search-interest tools behind one endpoint. No result, no charge.

> ⚡ 25/25 runs succeeded in the last 30 days — small numbers, honestly reported · pay only per post delivered · no login, no cookies, no ban risk.
> 💸 Empty searches, blocked fetches and failed runs are never billed.

### Overview

Reddit's Data API now runs a paid commercial tier, and the old logged-out `.json` endpoints have gotten harder to rely on for anything beyond casual use. Reddit Scraper is the no-login alternative: it extracts public Reddit data four ways (by subreddit, search query, user history, or specific post URLs) and returns it as clean, structured records with full nested comment trees. Pick a mode, add a target, and get back structured JSON or CSV.

Every post record carries title, author, score, upvote ratio, flair, comment count, and every comment thread as deep as you want. No login, no cookies, no OAuth app required, though you can plug in your own Reddit client ID for higher limits.

Reliability posture: only a successfully delivered post record is billed under the `post-scraped` event. Blocked fetches, empty listings, and failed posts are never charged, you only pay for what actually lands in your dataset.

✅ No login required | ✅ No API key | ✅ Pay only for results | ✅ MCP-ready for AI agents

### Features

Four extraction modes. Subreddit, search, user history, or specific post URLs.
Full comment trees. Fetch nested replies to any depth per post.
Deep historical backfill. Cursor-based pagination lets you resume long runs.
All Reddit sorts. Hot, new, top, and rising, with timeframe scoping for top.
Optional client ID. Plug in your own Reddit OAuth client ID to raise the shared rate limit.

### How it works

Reddit's public browsing is rate-limited and its data endpoints are increasingly gated. This scraper reads public posts and comments the way a logged-out visitor does. No account, no cookies.

Choose a mode: subreddit (pull hot, new, top, or rising posts from any public sub), search (Reddit's full search syntax), user (a user's public post history), or post (specific URLs). The actor handles pagination for you and exposes an `after` cursor so you can resume long runs and do deep historical backfill across thousands of posts.

### 🧾 Input configuration

```json
{
  "mode": "subreddit",
  "subreddits": ["python"],
  "sortBy": "top",
  "timeframe": "week",
  "maxPosts": 25,
  "includeComments": true,
  "maxCommentsPerPost": 100,
  "maxDepth": 3
}
```

### 📤 Output format

This is a real record delivered by a live run against r/Python (sort=top, timeframe=week):

```json
{
  "id": "1uts313",
  "name": "t3_1uts313",
  "subreddit": "Python",
  "subreddit_id": "t5_2qh0y",
  "title": "What Every Python Developer Should Know About the CPython ABI",
  "author": "mttd",
  "author_fullname": "t2_6gkbb",
  "score": 73,
  "upvote_ratio": 0.86,
  "url": "https://www.reddit.com/r/Python/comments/1uts313/what_every_python_developer_should_know_about_the/",
  "permalink": "https://www.reddit.com/r/Python/comments/1uts313/what_every_python_developer_should_know_about_the/",
  "selftext": "It's true that you can happily write Python for years without needing to understand any of the content of this post... https://labs.quansight.org/blog/python-abi-abi3t",
  "is_self": true,
  "domain": "self.Python",
  "flair": "Resource",
  "num_comments": 20,
  "created_utc": 1783795286,
  "is_pinned": false,
  "is_locked": false,
  "awards_count": 0,
  "scraped_at": "2026-07-15T04:13:41.202Z",
  "comments": [
    {
      "id": "owy9ttz",
      "name": "t1_owy9ttz",
      "author": "No_Art_1022",
      "body": "I hit this wall hard when packaging a numpy-heavy ML pipeline for deployment. Built it locally on my M1 Mac, wheels installed fine, but the same package segfaulted instantly on our Linux CI runners...",
      "score": 24,
      "created_utc": 1783799557,
      "is_submitter": false,
      "depth": 0,
      "replies": [
        {
          "id": "owyxwxx",
          "name": "t1_owyxwxx",
          "author": "TronnaLegacy",
          "body": "Don't most popular libraries with extensions provide the binaries (via wheels if I recall)? Why would you be compiling yourself?",
          "score": 12,
          "created_utc": 1783806942,
          "is_submitter": false,
          "depth": 1,
          "replies": []
        }
      ]
    }
  ]
}
```

Post records carry these fields:

| Field | Description |
| --- | --- |
| 🆔 `id` / `name` | Reddit post ID (t3\_...) |
| 📚 `subreddit` / `subreddit_id` | Subreddit name and t5 ID |
| 🏷️ `title` | Post title |
| 👤 `author` | Author username |
| ⬆️ `score` / `upvote_ratio` | Score and ratio |
| 🌐 `url` / 🔗 `permalink` | Post URL and permalink |
| 📝 `selftext` | Body text (self posts) |
| 🎫 `flair` | Post flair |
| 💬 `num_comments` | Total comment count |
| 🕒 `created_utc` | Unix timestamp |
| 📌 `is_pinned` / 🔒 `is_locked` | Status flags |
| 🌳 `comments[]` | Optional nested comment array |
| 🕓 `scraped_at` | ISO 8601 extraction timestamp |

**One more row at the end of every run:** every run also ends with a final `_type: "info"` record — informational only, never billed — with a two-line nudge: how to put this actor on an automatic schedule (see "Run on a schedule" below), and a link to leave a Store review if it saved you time.

### 💼 Common use cases

**Market and product research**
Mine subreddits and search for what users actually say about a topic or product.
Track how sentiment shifts around a launch or a competitor.

**Sentiment analysis at scale**
Collect posts and full comment trees to score opinion across a category.
Feed clean text into your LLM or classifier without cleanup work.

**Community monitoring**
Track a subreddit's hot, new, or top feed on a schedule.
Flag surges in mentions or new threads about your brand.

**AI training and RAG data**
Build structured post-and-comment datasets for agents and models.
Backfill deep history with the cursor and re-run to keep it fresh.

### 🚀 Getting started

1. Open the actor on Apify and click Try for free.
2. Choose a mode: subreddit, search, user, or post.
3. Fill the matching field: subreddits, search query, Reddit username, or post URLs.
4. Set max posts, choose a sort (and timeframe for top), and optionally enable Include comments with max comment depth.
5. Click Save and Start, then download your data as JSON, CSV, or Excel, or pull it via API or MCP.

### 🔁 Run on a schedule

Turn this from a one-off pull into a standing feed with Apify's built-in Schedules — no code, no cron server of your own.

1. Run the actor once with the input you want repeated, then click **Save as a task** (top of the run form) — this keeps your exact input attached for every future run.
2. In the Apify Console, go to **Schedules** (left sidebar) → **Create new**.
3. Name it, set your timezone, and pick a frequency — a preset (hourly / daily / weekly) or a custom cron expression (e.g. `0 6 * * *` for daily at 6am).
4. Under **Actors or tasks to run**, add the task you saved in step 1.
5. Save. From then on it runs unattended on your schedule, billed the same pay-per-post way as a manual run — nothing is charged just for the schedule existing.

Prefer to automate the setup itself? Same thing via the API:

```bash
curl -X POST "https://api.apify.com/v2/schedules?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "reddit-scraper-daily",
    "cronExpression": "0 6 * * *",
    "isEnabled": true,
    "actions": [{ "type": "RUN_ACTOR", "actorId": "themineworks/reddit-scraper" }]
  }'
```

Full options — time zones, run notifications, pausing a schedule — are in Apify's [Schedules documentation](https://docs.apify.com/platform/schedules).

#### Monitor mode — pay only for NEW posts

Set `monitorMode: true` and this actor remembers what it delivered last time (keyed on
`id`) — on the next scheduled run, only genuinely new posts are pushed and charged.
Re-running the same input daily costs you for the new posts each day, not the whole feed
every time.

```json
{ "monitorMode": true }
```

Pairs directly with **Run on a schedule** above: save a task with `monitorMode: true`,
attach it to a daily schedule, and you have a standing "what's new" feed with no
duplicate charges. The summary row reports `new_this_run` and `skipped_duplicates` so
you can see the dedup working. First run establishes the baseline (everything is "new");
every run after that is incremental.

### 💵 Pricing

| Event | Price | You pay when |
| --- | --- | --- |
| Post delivered | $0.003 | A post record, with its full comment tree, lands in your dataset |

**$3.00 per 1,000 posts — comment trees included at no extra event.** For comparison, Reddit's own commercial Data API is reported at roughly $12,000/month minimum (not per year) for an allocation of about 50 million calls, with overage around $0.24 per 1,000 calls beyond that, and commercial approval is a manual review that can take 2–4 weeks with no guarantee (figures from third-party 2026 API pricing coverage, not Reddit's own pricing page directly — worth re-checking before quoting elsewhere). Zero-result and failed runs are never charged here, and there's no approval process or minimum commitment to start.

### FAQ

**Is the Reddit API free in 2026?**
A free tier survives for small non-commercial use. Commercial access runs through a paid enterprise agreement with a monthly minimum commitment and a manual approval process — out of reach for most research teams, which is what this actor is for.

**Do I need a Reddit login or API key?**
No. The scraper reads public posts and comments without an account or cookies. You can optionally add your own Reddit OAuth client ID to raise the shared rate limit, but it is not required.

**How deep can I go into comment threads?**
As deep as you set. Enable Include comments, then use max comment depth (1 for top-level only, up to 10) and max comments per post to control how much of each tree you pull. Replies nest inside each comment's `replies[]` array.

**Can I resume a long run or backfill history?**
Yes. Each run's summary includes an `after` cursor. Paste it into the pagination cursor field on the next run to continue where you left off for deep historical backfill.

**Which sort options are supported?**
Hot, new, top, and rising. When you choose top, pick a timeframe (hour, day, week, month, year, or all) to scope the window.

**Is it legal to scrape Reddit?**
The actor collects only publicly available posts and comments and never accesses private content. Public data can include personal data under laws like the GDPR, so scrape only what you have a legitimate reason to use.

**Can I use it inside an AI agent?**
Yes. It is exposed as an MCP tool. See below.

### Use in Claude, ChatGPT & any MCP agent

```
https://mcp.apify.com/?tools=themineworks/reddit-scraper
```

Or call it programmatically with the Apify client:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('themineworks/reddit-scraper').call({
  mode: 'subreddit',
  subreddits: ['python'],
  sortBy: 'top',
  timeframe: 'week',
  maxPosts: 25,
  includeComments: true,
  maxDepth: 3,
});

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

### 🛠️ Complete your social intelligence pipeline

Pair Reddit with the rest of the social suite:

- **[Instagram Profile Scraper](https://apify.com/themineworks/instagram-profile)**: followers, bio, and stats for any public account.
- **[Twitter / X Scraper](https://apify.com/themineworks/twitter-x-scraper)**: tweets by keyword or handle, no paid API key.
- **[Threads Scraper](https://apify.com/themineworks/threads-scraper)**: posts, profiles, hashtags and search on Meta Threads.

Typical flow: Reddit surfaces the deep, high-quality discussions, Twitter/X and Threads catch real-time bursts, Instagram covers creator activity.

Found a bug or have a feature request? Open an issue on the actor's Apify Console page or reach out through the Apify profile.

# Actor input Schema

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

What to scrape. Choose subreddit, search, user, or specific post URLs.

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

List of subreddit names to scrape (without r/ prefix). Used when mode=subreddit.

## `searchQuery` (type: `string`):

Search query string. Used when mode=search. Supports Reddit's full search syntax.

## `username` (type: `string`):

Reddit username (without u/ prefix). Used when mode=user.

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

Full Reddit post URLs to scrape with comments. Used when mode=post.

## `sortBy` (type: `string`):

How to sort posts. 'top' can be combined with a timeframe.

## `timeframe` (type: `string`):

Time window when using sort=top. Ignored for other sort types.

## `maxPosts` (type: `integer`):

Maximum number of posts to scrape. You are charged only for posts actually scraped.

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

Fetch and include the comment tree for each post. Increases run time and cost.

## `maxCommentsPerPost` (type: `integer`):

Maximum number of top-level comments to fetch per post. Only used when includeComments=true.

## `maxDepth` (type: `integer`):

How deep to recurse into comment reply threads. 1 = top-level only, 3 = three levels deep.

## `after` (type: `string`):

Reddit 'after' cursor for resuming or deep historical backfill. Paste the cursor from a previous run's summary item to continue where it left off.

## `skipPinnedPosts` (type: `boolean`):

Skip mod-pinned/stickied posts at the top of subreddit listings.

## `clientId` (type: `string`):

Optional. Your own Reddit OAuth client ID for higher rate limits. Get one at https://www.reddit.com/prefs/apps (choose 'installed app' type). Leave blank to use the actor's shared credentials (subject to lower shared rate limit).

## `monitorMode` (type: `boolean`):

Run on a schedule and deliver ONLY results not seen in a previous run. You are charged per new result, not for the whole feed each time. Ideal for daily monitoring. Requires the same input across runs.

## Actor input object example

```json
{
  "mode": "subreddit",
  "subreddits": [
    "MachineLearning",
    "Python",
    "startups"
  ],
  "searchQuery": "lab grown diamonds engagement ring",
  "username": "spez",
  "postUrls": [
    "https://www.reddit.com/r/MachineLearning/comments/abc123/some_post_title/"
  ],
  "sortBy": "hot",
  "timeframe": "all",
  "maxPosts": 5,
  "includeComments": false,
  "maxCommentsPerPost": 100,
  "maxDepth": 3,
  "skipPinnedPosts": false,
  "monitorMode": false
}
```

# Actor output Schema

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

No description

# 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 = {
    "mode": "subreddit",
    "subreddits": [
        "python"
    ],
    "maxPosts": 5
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

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