# Reddit Scraper & Reddit Comments Scraper: Reddit Posts, Users (`openclawai/reddit-scraper`) Actor

Reddit comments scraper: comment threads with replies, plus Reddit posts, search results, subreddits and users. A Reddit API alternative and Reddit MCP tool, no API key or login. Upvotes, flair, media and dates on every row, plus Reddit AI Answers.

- **URL**: https://apify.com/openclawai/reddit-scraper.md
- **Developed by:** [Pika Choo](https://apify.com/openclawai) (community)
- **Categories:** Lead generation, Agents, SEO tools
- **Features:** Limited permissions
- **Stats:** 277 total users, 63 monthly users, 99.9% runs succeeded, 5 bookmarks
- **User rating**: 4.88 out of 5 stars

## Pricing

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

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Reddit Scraper — Posts, Comments, Subreddits & Users (No API Key, No Login)

**$2 per 1,000 results. Nothing to log in to, nothing to paste.** Give this Reddit scraper a subreddit, a keyword, a username or any reddit.com link and get clean JSON back: posts with upvotes, upvote ratio, flair, media and comment threads with replies; comments; communities; user profiles. Available fields depend on the source, mode and limits. Deleted or unavailable content can be missing. Works with AI agents through MCP, runs on a schedule, exports to CSV, Excel or JSON.

Published by **Datapika**, under **openclawai** on Apify. [Inspect recorded output, download JSON or CSV, and read the field reference](https://datapika.com/actors/reddit-scraper#sample). Samples identify their build and recording date. They demonstrate selected public output from one run, not complete coverage of every source or mode.

### Why this Reddit scraper

- 💰 **Simple billing.** $0.002 per post, per standalone comment or user and per community; $0.01 per Reddit AI Answer. Comments attached to posts are included until November 20, 2026 and cost $0.0005 each ($0.50 per 1,000) from November 21, 2026. No start fee. See the pricing note below.
- 📊 **Full data on every row by default.** Score, upvote ratio, comment count, flair, author, images, videos, galleries, NSFW flag, timestamps. Other scrapers strip upvotes and media unless you pay for a slower mode.
- 🧵 **Comment threads with replies.** Nested replies are flattened with `depth`, `parentId`, `isOp` and `numReplies`, sorted the way you choose, capped where you choose. Big threads return about 120–220 comments per post (Reddit serves comments page by page; the Actor reads up to 21 pages per post).
- 🔗 **Paste any Reddit link.** Subreddit pages (sort and time in the URL are respected), post links, user pages and search pages all work as input, alongside plain subreddit names and keywords.
- 📅 **Date windows.** `postedAfter` / `postedBefore` filter posts by creation date for monitoring and research crawls.
- 🛡️ **Does not fall over.** Every request runs on a fresh anonymous session behind residential IPs and retries automatically. No browser, no scrolling, no timeouts.
- 🤖 **Reddit AI Answers included.** Ask a question and get Reddit's own AI-generated answer with the posts and communities it cites.

### Who uses this

- **Brand and product teams** monitoring what Reddit says about them, their competitors and their category.
- **Market researchers** mining niche communities for problems, language and buying signals.
- **Growth and content marketers** finding the threads where their audience actually talks.
- **Data scientists and AI teams** building datasets of posts and comment threads for training, RAG and sentiment work.
- **Journalists and analysts** tracking how a story spreads across subreddits.
- **AI agents** answering "what is r/Python saying about uv this week?" through MCP.

### What you can do with it

| Goal | Input | Result rows |
|---|---|---|
| Crawl a subreddit | `subreddits: ["Python"]` or a subreddit URL with sort and time | posts |
| Search Reddit for a keyword | `searches: ["claude code"]` | posts |
| Search inside one subreddit | `searches` + `searchSubreddit: "programming"` | posts |
| Find communities about a topic | `searches` + `searchType: "communities"` | communities |
| Find users by name | `searches` + `searchType: "users"` | users |
| Get one post with its comments | post URL in `startUrls` + `includeComments: true` | 1 post with `comments[]` |
| Profile a user | `users: ["spez"]` | 1 user + their posts + their comments |
| Ask Reddit AI | `answerQueries: ["best budget mechanical keyboard"]` | 1 answer with sources |

### Input

```json
{
    "startUrls": ["https://www.reddit.com/r/Python/top/?t=week"],
    "subreddits": ["MachineLearning"],
    "searches": ["claude code"],
    "searchType": "posts",
    "sort": "",
    "time": "all",
    "maxItems": 50,
    "includeComments": false,
    "maxCommentsPerPost": 50,
    "postedAfter": "",
    "includeNSFW": true
}
```

| Field | Type | Default | What it does |
|---|---|---|---|
| `startUrls` | array | — | Any reddit.com links: subreddit, post, user or search page. Sort and time in the URL win. |
| `subreddits` | array | `[]` | Subreddit names without `r/`. |
| `searches` | array | — | Keywords or phrases, each its own search. |
| `searchType` | string | `posts` | `posts`, `communities` or `users`. |
| `searchSubreddit` | string | — | Restrict keyword searches to one subreddit. |
| `users` | array | `[]` | Usernames: profile plus their posts and comments. |
| `sort` | string | default | Subreddits: `hot`, `new`, `top`, `rising`, `controversial`. Searches: `relevance`, `hot`, `top`, `new`, `comments`. |
| `time` | string | `all` | `hour`, `day`, `week`, `month`, `year`, `all` for top/controversial and searches. |
| `maxItems` | integer | `50` | Per input, up to 10,000. Reddit itself stops a single listing at about 1,000. |
| `includeComments` | boolean | `false` | Attach the comment tree to every post. |
| `maxCommentsPerPost` | integer | `50` | Cap per post (1–500). Big threads return about 120–220 comments per post, even when you ask for more. |
| `commentSort` | string | `top` | `top`, `new`, `controversial`, `old`, `qa`. |
| `postedAfter` / `postedBefore` | string | — | `YYYY-MM-DD`, UTC. |
| `includeNSFW` | boolean | `true` | Off drops 18+ posts and communities. |
| `answerQueries` | array | `[]` | Questions for Reddit AI Answers. |
| `threads` | integer | `5` | Inputs processed in parallel. |
| `proxyConfiguration` | object | residential | Residential is prefilled and recommended. |

### What you get

Every row has `dataType`, `sourceInput` (which input produced it) and `scrapedAt`. Hint and error rows are free.

**Post** (`dataType: "post"`): `id`, `url`, `title`, `body`, `bodyHtml`, `author`, `authorId`, `authorFlair`, `subreddit`, `subredditId`, `flair`, `score`, `upvoteRatio`, `numComments`, `numCrossposts`, `totalAwards`, `isVideo`, `isSelf`, `isNsfw`, `isSpoiler`, `isPinned`, `isLocked`, `domain`, `linkUrl`, `thumbnail`, `imageUrls[]`, `videoUrls[]`, `createdAt`, `createdUtc`, `comments[]`, `commentsScraped`.

**Comment inside a post** (`comments[]`): `id`, `parentId`, `depth`, `author`, `authorId`, `body`, `score`, `numReplies`, `isOp`, `createdAt`, `url`.

**Comment** (from a user's comment history, `dataType: "comment"`): `id`, `url`, `postId`, `postTitle`, `parentId`, `author`, `authorId`, `subreddit`, `body`, `score`, `createdAt`.

**Community** (`dataType: "community"`): `id`, `name`, `url`, `title`, `description`, `subscribers`, `activeUsers`, `isNsfw`, `type`, `iconUrl`, `bannerUrl`, `createdAt`.

**User** (`dataType: "user"`): `id`, `username`, `url`, `displayName`, `description`, `postKarma`, `commentKarma`, `totalKarma`, `isVerified`, `isGold`, `isMod`, `avatarUrl`, `createdAt`.

**Answer** (`dataType: "answer"`): `query`, `markdown`, `follow_ups[]`, `source_posts[]`, `source_subreddits[]`.

#### Sample post

```json
{
    "dataType": "post",
    "id": "1n8kq2x",
    "url": "https://www.reddit.com/r/Python/comments/1n8kq2x/uv_is_now_our_default_package_manager/",
    "title": "uv is now our default package manager",
    "body": "After six months on uv across 40 services…",
    "author": "devops_marta",
    "subreddit": "Python",
    "flair": "Discussion",
    "score": 1843,
    "upvoteRatio": 0.97,
    "numComments": 312,
    "isSelf": true,
    "isNsfw": false,
    "imageUrls": [],
    "videoUrls": [],
    "createdAt": "2026-09-03T14:12:07Z",
    "comments": [
        {"id": "nc2a9f1", "parentId": "t3_1n8kq2x", "depth": 0, "author": "pipfan", "body": "Same here, lockfile diffs are finally readable.", "score": 221, "numReplies": 4, "isOp": false, "createdAt": "2026-09-03T14:40:19Z"}
    ],
    "commentsScraped": 50,
    "sourceInput": "https://www.reddit.com/r/Python/top/?t=week",
    "scrapedAt": "2026-09-06T19:43:59Z"
}
```

### Pricing: how much does it cost?

The price list (in force since September 21, 2026; the comment row changes on November 21, 2026):

| Event | Price | Charged for |
|---|---|---|
| Post | $0.002 | each post row |
| Comment in a post | included until Nov 20, 2026; $0.0005 from Nov 21, 2026 | each comment attached to a post (only when `includeComments` is on) |
| Comment or user | $0.002 | each standalone comment row (a user's comment history) and each user profile |
| Community | $0.002 | each community row |
| Reddit AI Answer | $0.01 | each answer |

There is no start fee and no per-row platform fee, and hint and error rows are free. So 1,000 posts cost $2. From November 21, 2026, 1,000 posts with 100 comments each cost $2 + $50 for the 100,000 comments. The recorded sample linked above comes from a September 9, 2026 run of build 2.0.3 and was billed under the price list of that date. [Check current pricing](https://apify.com/openclawai/reddit-scraper/pricing) and set a total run spending cap before execution.

### Use cases

- **Brand monitoring**: schedule `searches: ["your brand"]` with `sort: "new"` daily and diff `id`s.
- **Community discovery**: `searchType: "communities"` on your topic, sort the `subscribers` column.
- **Thread analysis**: post URLs with `includeComments: true` and `commentSort: "top"` for the discussion that matters.
- **Dataset building**: subreddit lists with `postedAfter` / `postedBefore` for a clean time slice.
- **Influencer research**: `users` for karma, history and the communities they post in.

### Use with AI agents and MCP

Add this Actor as a tool in Claude, ChatGPT, Cursor or any MCP client through the Apify MCP server. Ask "find the top r/MachineLearning threads about agents this month with their best comments" and the agent fills `subreddits`, `sort`, `time` and `includeComments` for you. Rows are flat JSON with one `dataType` field, so agents can filter without post-processing.

### Integrations

Runs on a schedule, exports to CSV, Excel, JSON or XML, and connects to Google Sheets, Airtable, Slack, Zapier, Make, n8n and webhooks through the Apify platform. Call it from Python, JavaScript or plain HTTP with the Apify API.

### FAQ

#### Do I need a Reddit account, cookies or an API key?

No. The Actor reads Reddit's public data anonymously. There is nothing to paste and nothing that can get your account banned.

#### Why not use the official Reddit API?

The official API requires an app registration, an OAuth flow and approval for anything beyond hobby volume, and search is heavily rate-limited. This Actor reads supported public pages without a Reddit API credential. It is not an official API or a guarantee of equivalent fields.

#### How many posts can I get from one subreddit or search?

Reddit stops every listing at about 1,000 items. To go deeper, split by `sort` (`new`, `top` with different `time` values) or by date window, or search inside the subreddit with several keywords.

#### Are upvotes, media and comment counts included without extra cost?

These fields are included when the source provides them. Upvote ratio, flair, images, videos and gallery items are part of the standard row.

#### How do comments work?

With `includeComments` on, every post carries up to `maxCommentsPerPost` comments as a flattened tree: each comment has `depth`, `parentId` and `numReplies`, so you can rebuild the thread or just read it top-down. Reddit serves comments page by page and the Actor reads up to 21 pages per post, so a big thread returns about 120–220 comments even when `maxCommentsPerPost` is higher. Smaller threads return the comments Reddit shows, up to your cap.

#### Can I filter by date?

`postedAfter` and `postedBefore` keep only posts created inside the window. Combine with `sort: "new"` so the crawl walks backwards in time until it reaches your date.

#### What about NSFW communities?

Included by default so nothing is silently missing. Set `includeNSFW: false` to drop 18+ posts and communities.

#### Why did I get a hint row instead of results?

The subreddit or user does not exist (or is private or banned), your filters removed everything, or the input link was not a Reddit URL. The hint says which. Hint rows are never charged.

#### Can I export to CSV or Excel?

Yes. Every dataset can be downloaded as CSV, Excel, JSON or XML from the run page or the API.

### Is it legal to scrape Reddit?

The Actor reads only public posts, comments and profiles, the same data anyone sees without logging in. It stores no private data and respects Reddit's listing limits. You are responsible for using the output in line with applicable law and platform terms, especially when processing personal data.

# Actor input Schema

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

Any reddit.com links, one per line: a subreddit (https://www.reddit.com/r/Python/top/?t=week), a post (…/comments/abc123/…), a user (https://www.reddit.com/user/spez) or a search page (https://www.reddit.com/search/?q=laptop). Sort and time in the URL are respected.

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

Subreddit names to crawl, without r/ — e.g. 'MachineLearning'. Uses the Sort and Time settings below.

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

Keywords or phrases to search across Reddit (or inside one subreddit, see below). Each keyword is its own search.

## `searchType` (type: `string`):

Posts (default), communities (subreddits) or users matching the keywords.

## `searchSubreddit` (type: `string`):

Restrict keyword searches to a single subreddit, e.g. 'programming'. Leave empty to search all of Reddit.

## `users` (type: `array`):

Usernames to scrape (profile, their posts and their comments), without u/.

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

Subreddits: hot, new, top, rising, controversial. Searches: relevance, hot, top, new, comments. Leave empty for the platform default (hot / relevance). Ignored when the URL already contains a sort.

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

Applies to Top / Controversial sorts and to searches.

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

Posts per subreddit / search / user, or comments / communities / users per search (1–10,000). Reddit itself stops any single listing at about 1,000.

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

Fetch the comment tree for each post (nested replies flattened with depth and parent). Slower. Comments attached to posts are free until Nov 20, 2026, then $0.0005 each ($0.50 per 1,000) from Nov 21, 2026.

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

Cap on comments collected per post when Include comments is on (1–500). Big threads return about 120–220 comments per post even if you ask for more: Reddit serves comments page by page and the Actor reads up to 21 pages per post.

## `commentSort` (type: `string`):

How comments are ordered before the cap is applied.

## `postedAfter` (type: `string`):

Keep only posts created on or after this date (UTC). Combine with Sort = new for date-window crawls.

## `postedBefore` (type: `string`):

Keep only posts created on or before this date (UTC).

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

Off drops posts and communities marked 18+.

## `answerQueries` (type: `array`):

Questions to ask Reddit's built-in AI Answers engine. Each answer is one row with sources.

## `threads` (type: `integer`):

How many inputs run in parallel (1–20).

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

Residential proxy (default) keeps runs reliable; Reddit throttles datacenter IPs.

## `action` (type: `string`):

Older saved inputs only. Prefer the fields above.

## `subreddit` (type: `string`):

Older saved inputs only.

## `query` (type: `string`):

Older saved inputs only.

## `postUrl` (type: `string`):

Older saved inputs only.

## `limit` (type: `integer`):

Older saved inputs only.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.reddit.com/r/Python/top/?t=week"
  ],
  "subreddits": [],
  "searches": [
    "claude code"
  ],
  "searchType": "posts",
  "users": [],
  "sort": "",
  "time": "all",
  "maxItems": 50,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "commentSort": "top",
  "includeNSFW": true,
  "answerQueries": [],
  "threads": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "startUrls": [
        "https://www.reddit.com/r/Python/top/?t=week"
    ],
    "searches": [
        "claude code"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("openclawai/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 = {
    "startUrls": ["https://www.reddit.com/r/Python/top/?t=week"],
    "searches": ["claude code"],
}

# Run the Actor and wait for it to finish
run = client.actor("openclawai/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 '{
  "startUrls": [
    "https://www.reddit.com/r/Python/top/?t=week"
  ],
  "searches": [
    "claude code"
  ]
}' |
apify call openclawai/reddit-scraper --silent --output-dataset

```

## MCP server setup

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