# 🟠 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, 0 monthly users, 0.0% 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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
{
  "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 = {};

// 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 = {}

# 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 '{}' |
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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🟠 Reddit Scraper ✅ Posts, Comments, Search | $1.29/1K",
        "description": "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.",
        "version": "0.1",
        "x-build-id": "RoqSDpQ1aV63uLfq4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jacquemus~reddit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jacquemus-reddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/jacquemus~reddit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-jacquemus-reddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/jacquemus~reddit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-jacquemus-reddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrls": {
                        "title": "Reddit URLs",
                        "type": "array",
                        "description": "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/\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "subreddits": {
                        "title": "Subreddits",
                        "type": "array",
                        "description": "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\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searches": {
                        "title": "Search queries",
                        "type": "array",
                        "description": "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\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchCommunityName": {
                        "title": "Search within subreddit",
                        "type": "string",
                        "description": "If set, keyword searches (searches) run only inside this one subreddit (with or without r/). Leave empty to search all of Reddit."
                    },
                    "sort": {
                        "title": "Sort",
                        "enum": [
                            "relevance",
                            "hot",
                            "top",
                            "new",
                            "rising",
                            "comments"
                        ],
                        "type": "string",
                        "description": "How to order results. For searches: relevance / hot / top / new / comments. For subreddits: hot / new / top / rising.",
                        "default": "hot"
                    },
                    "time": {
                        "title": "Time range",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "year",
                            "all"
                        ],
                        "type": "string",
                        "description": "Restrict 'top' and search results to a time window.",
                        "default": "all"
                    },
                    "skipComments": {
                        "title": "Skip comments",
                        "type": "boolean",
                        "description": "When scraping posts, do not fetch their comment trees (faster and cheaper if you only need the posts).",
                        "default": false
                    },
                    "maxComments": {
                        "title": "Max comments per post",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of comments to collect per post (0 = no comments). Ignored when Skip comments is on.",
                        "default": 50
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 0,
                        "type": "integer",
                        "description": "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.",
                        "default": 100
                    },
                    "includeNSFW": {
                        "title": "Include NSFW",
                        "type": "boolean",
                        "description": "Include posts marked NSFW (over 18) in the results.",
                        "default": true
                    },
                    "postDateLimit": {
                        "title": "Only posts after (date)",
                        "type": "string",
                        "description": "Only keep posts created on or after this date (ISO, e.g. 2026-01-01). Leave empty for no limit."
                    },
                    "commentDateLimit": {
                        "title": "Only comments after (date)",
                        "type": "string",
                        "description": "Only keep comments created on or after this date (ISO, e.g. 2026-01-01). Leave empty for no limit."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Proxy settings. The default Apify datacenter proxy is enough for the Reddit API and keeps cost low.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
