# 🟠 Reddit Scraper ✅ Posts, Comments, Search | $1.29/1K (`jacquemus/reddit-scraper`) Actor

Scrape Reddit posts, comments, subreddits, user activity and search results — clean JSON with score, media, flair, and full comment trees. No login needed for your users.

- **URL**: https://apify.com/jacquemus/reddit-scraper.md
- **Developed by:** [Jacquemus](https://apify.com/jacquemus) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 70.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.29 / 1,000 reddit results

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, Subreddits, Search & Users

**Turn any Reddit page into clean, structured JSON.** Point this Actor at a
subreddit, a search query, a post, or a user — and get back tidy, ready-to-use
records for **posts and full comment trees**, complete with score, upvote data,
media, flair, and timestamps. No headless browser, no login for your users, no
setup headaches.

> Built for scale and for AI: the output is flat JSON, so it drops straight into
> spreadsheets, databases, RAG pipelines, and LLM workflows.

***

### ⚡ Why this scraper

- 🧵 **Full comment trees** — not just posts. Get nested replies with depth,
  parent, author, score, and body.
- 🔎 **Every entry point** — scrape by **subreddit**, **keyword search**, **post
  URL**, or **user profile**. Paste any Reddit URL and the type is auto-detected.
- 🖼️ **Media included** — image URLs, galleries, video links, and **video poster
  thumbnails** — so you can preview content without downloading it.
- 🎛️ **Precise control** — sort (hot/top/new/rising), time window, NSFW toggle,
  date limits, max comments per post, and a global item cap.
- 💸 **Transparent price, low cost** — a flat rate per result, well below the
  usual market rate. You only pay for what you keep.
- 🤖 **AI-agent ready** — callable as a tool from Claude, ChatGPT, Cursor and any
  MCP client (see below).
- 🚀 **Fast & lightweight** — pure HTTP, no browser, so runs are quick and cheap.

***

### 🎯 What you can use it for

- **Market & product research** — track what real people say about a product,
  brand, game, or trend across niche subreddits.
- **AI / LLM training & RAG** — Reddit is the gold standard for authentic human
  discussion. Feed clean posts + comments into your models and retrieval systems.
- **Lead generation** — find users asking for exactly what you sell, in the
  communities that matter.
- **Sentiment & brand monitoring** — pull the latest threads on any topic and run
  your own analysis.
- **Academic & data science** — build datasets from public discussions with
  reproducible, structured output.

***

### 🧭 What you can scrape

| Input | What you get |
|---|---|
| **Subreddits** — `["programming", "r/MachineLearning"]` | Latest/top/hot posts, plus their comments |
| **Search** — `["best mechanical keyboard"]` | Matching posts across Reddit (or inside one subreddit) |
| **Reddit URLs** — post / subreddit / user / search links | Auto-detected and scraped accordingly |
| **User profiles** | A user's posts and comments |

***

### 📥 Input examples

**Scrape a subreddit's top posts of the week, with comments:**

```json
{
  "subreddits": ["MachineLearning"],
  "sort": "top",
  "time": "week",
  "maxComments": 20,
  "maxItems": 500
}
```

**Search Reddit for a topic:**

```json
{
  "searches": ["rag pipeline", "vector database"],
  "sort": "relevance",
  "time": "year",
  "maxItems": 200
}
```

**Scrape a specific post (or paste any Reddit link):**

```json
{
  "startUrls": ["https://www.reddit.com/r/programming/comments/abc123/"],
  "maxComments": 100
}
```

***

### 📤 Output

One clean JSON object per item, each tagged with a `type` (`post` or `comment`).

```json
{
  "type": "post",
  "id": "abc123",
  "title": "Show HN: I built a Reddit scraper",
  "body": "Here's how it works…",
  "subredditPrefixed": "r/programming",
  "author": "dev_user",
  "score": 1234,
  "upvoteRatio": 0.97,
  "numComments": 56,
  "createdAt": "2026-07-11T18:00:00.000Z",
  "flair": "Discussion",
  "over18": false,
  "permalink": "https://www.reddit.com/r/programming/comments/abc123/…",
  "imageUrls": [],
  "videoUrl": null,
  "media": []
}
```

**Posts** include: title, body, subreddit, author, score, upvote ratio, comment
count, created date, flair, NSFW/spoiler/stickied flags, media (images, video +
poster), permalink, domain, and more. **Comments** include: body, author, score,
created date, depth, parent, and whether it's the original poster (`isSubmitter`).

***

### 🤖 Use with AI agents (MCP)

This Actor is callable by AI agents through the **Apify MCP server** — no extra
setup. Point any MCP-capable client (Claude Desktop, ChatGPT, Cursor, or your own
agent) at `https://mcp.apify.com` and just ask:

> *"Search Reddit for what people say about \<topic> and summarize the top threads."*

The agent runs this Actor as a tool and streams back clean, structured results.

***

### 💸 Pricing

**Pay per result** — you're billed a flat rate for each item (post or comment)
delivered to your dataset. Duplicates are removed before you're charged. No
surprises: cap the run with `maxItems` and pay only for what you get.

***

### ❓ FAQ

**Do I need a Reddit account or API key?** No. Everything runs on Apify's
infrastructure — you just provide subreddits, searches, or URLs.

**What data does it collect?** Only **public** Reddit content — the same posts and
comments any visitor can see. No private communities, no logins, no personal
messages.

**What format is the output?** Flat JSON, exportable to CSV, Excel, JSON, or via
the API — ready for spreadsheets, databases, and AI pipelines.

**How do I limit cost?** Set `maxItems` for a hard cap, `maxComments` to control
comments per post, and `skipComments` if you only need posts.

**Can it scrape comments?** Yes — full nested comment trees, with depth and parent
relationships preserved.

***

*Scrapes public data only. Please use responsibly and in line with applicable
laws and Reddit's terms.*

# Actor input Schema

## `startUrls` (type: `array`):

Any Reddit URLs to scrape — the type is auto-detected: a post URL (with its comments), a subreddit URL (its posts), a user URL (their activity), a comment permalink, or a search-results URL. Example: \["https://www.reddit.com/r/programming/", "https://www.reddit.com/r/AskReddit/comments/abc123/"].

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

Subreddit names (with or without the r/ prefix) to scrape in full. Use this to pull the latest/top posts from communities. Example: \["programming", "r/MachineLearning"].

## `searches` (type: `array`):

Keywords to search across Reddit. Use this to find what people are saying about a topic. Each query is searched separately. Example: \["best mechanical keyboard", "rag pipeline"].

## `searchCommunityName` (type: `string`):

If set, keyword searches (searches) run only inside this one subreddit (with or without r/). Leave empty to search all of Reddit.

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

How to order results. For searches: relevance / hot / top / new / comments. For subreddits: hot / new / top / rising.

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

Restrict 'top' and search results to a time window.

## `skipComments` (type: `boolean`):

When scraping posts, do not fetch their comment trees (faster and cheaper if you only need the posts).

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

Maximum number of comments to collect per post (0 = no comments). Ignored when Skip comments is on.

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

Maximum number of items (posts + comments + communities + users) saved across the whole run. You are billed per item, so set the smallest number you need. 0 = no limit.

## `includeNSFW` (type: `boolean`):

Include posts marked NSFW (over 18) in the results.

## `postDateLimit` (type: `string`):

Only keep posts created on or after this date (ISO, e.g. 2026-01-01). Leave empty for no limit.

## `commentDateLimit` (type: `string`):

Only keep comments created on or after this date (ISO, e.g. 2026-01-01). Leave empty for no limit.

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

Proxy settings. The default Apify datacenter proxy is enough for the Reddit API and keeps cost low.

## Actor input object example

```json
{
  "subreddits": [
    "AskReddit"
  ],
  "sort": "hot",
  "time": "all",
  "skipComments": false,
  "maxComments": 50,
  "maxItems": 100,
  "includeNSFW": true,
  "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": [
        "AskReddit"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jacquemus/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": ["AskReddit"] }

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sJVNoGTKV7KZGj77f/builds/2SD4uY7ghM5uw7PSr/openapi.json
