# Reddit Scraper: Posts, Comments, Subreddits, Users & Search (`dltik/reddit-scraper-api`) Actor

Scrape Reddit posts, full comment threads, subreddits, user profiles and search results. Filter by keyword, date, score, flair and subreddit. Get title, text, author, upvotes, comments and sentiment. Monitor new posts and go past the 1,000-post limit. Posts $2/1K, comments $0.60/1K.

- **URL**: https://apify.com/dltik/reddit-scraper-api.md
- **Developed by:** [Walid](https://apify.com/dltik) (community)
- **Categories:** Social media, Marketing, AI
- **Features:** Limited permissions
- **Stats:** 28 total users, 9 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 actor starts

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 & Search

![Reddit Scraper banner](https://api.apify.com/v2/key-value-stores/zVr7amsTdnV4X24UY/records/banner.png)

> Scrape Reddit posts, full comment threads, subreddits and users to clean JSON, CSV or Excel. Posts $2 per 1,000, comments $0.60 per 1,000.

⭐ **Bookmark this actor** (top-right) to keep it on top of your Apify dashboard.

**Reddit Scraper** extracts public Reddit data through Reddit's official OAuth Data API - no headless browser, no residential proxy, no Reddit account required. One actor covers posts, full comment trees, user profiles and history, subreddit analytics, and search, with built-in sentiment, optional AI enrichment, media download, and true incremental monitoring. Output is clean JSON built for AI agents, market research, and social listening.

Because it rides the sanctioned `oauth.reddit.com` JSON API instead of rendering Chrome, this Reddit Scraper is **faster, cheaper, and more complete** than browser-based competitors - and it does not silently break when Reddit changes its HTML.

**Compatible with:** Apify MCP Server (Claude, ChatGPT, Cursor), LangChain, Make.com, Zapier, n8n, and the direct REST API.

### Why use this Reddit Scraper

- **Low-cost deep threads** - $0.60 per 1,000 comments. A 5,000-comment thread costs $3 here versus ~$15 on flat-priced scrapers.
- **Split per-entity pricing** - posts, comments, users and subreddits are billed separately, so a comment-heavy job is not billed at the post rate.
- **No browser, no forced proxy** - an HTTP + OAuth stack runs in seconds on 1 GB, not minutes on a 2 GB Chrome. That is why it can be priced this low.
- **Deep comment trees** - recursive `load more comments` expansion via Reddit's morechildren API, so long threads are not truncated at the first page.
- **Full user intelligence** - total, link, comment, awardee and awarder karma, trophies, account age, plus post/comment history beyond Reddit's ~1,000-item cap via a free archive.
- **Subreddit governance** - subscribers, description, and the rules array (and moderators where public).
- **True incremental monitoring** - only-new-since-last-run with cross-run dedup, so you never pay twice for the same post.
- **Real media download** - images, ordered galleries, and audio-muxed Reddit video stored to your dataset instead of expiring URLs.
- **AI-native output** - default JSON, `jsonl-finetune` (LLM SFT pairs), or `rag-markdown` (vector-DB chunks), plus optional sentiment/intent/entity enrichment.
- **Hard cost ceiling** - set `maxTotalChargeUsd` and the run stops billing when it is reached. No overage surprises.

### What can this Reddit Scraper do?

Provide any combination of inputs and the actor routes each to the right mode:

- **Subreddits** - scrape posts from any subreddit sorted by hot, new, top, rising, or controversial, with a time filter.
- **Search** - keyword search across all of Reddit or one subreddit; return posts, comments, communities, or users. Supports quoted exact phrases and `author:`/`subreddit:` operators.
- **Post URLs** - paste post links (or `redd.it` short links / ids) to pull the post plus its full comment thread.
- **Usernames** - profile, karma breakdown, trophies, and optional post/comment history.
- **Subreddit analytics** - standalone metadata records with rules and moderators.
- **Monitoring** - incremental runs that only return new items since the last run.
- **Archive** - deep historical backfill via the free Arctic Shift archive, past Reddit's live truncation.

### Reddit scraper use cases

- **Social listening and brand monitoring**: track every mention of your brand, product or competitor across Reddit, with sentiment on each post and comment.
- **Market research**: collect what real users say about a category (pain points, feature requests, price objections) from the subreddits where your buyers hang out.
- **AI training and RAG datasets**: export threads as `rag-markdown` chunks or `jsonl-finetune` pairs, ready for a vector database or LLM fine-tuning.
- **Lead generation**: find people asking for a tool like yours ("any alternative to...", "looking for a...") with keyword filters and monitoring mode.
- **Academic and trend research**: backfill years of subreddit history beyond the 1,000-post live limit and analyse engagement over time.
- **Content ideas and SEO**: mine top questions and the most-upvoted answers in your niche to plan articles and FAQs.

### What data you get

![Sample output — Reddit Scraper](https://api.apify.com/v2/key-value-stores/zVr7amsTdnV4X24UY/records/output.png)

#### Reddit posts (`type: "post"`)

`id`, `post_id`, `url`, `permalink`, `title`, `body`, `body_html`, `author`, `author_id`, `author_flair`, `subreddit`, `subreddit_subscribers`, `post_type` (text/link/image/video/gallery), `flair`, `score`, `upvotes`, `upvote_ratio`, `num_comments`, `num_crossposts`, `total_awards`, `content_url`, `external_url`, `domain`, `media_urls`, `video` (fallback/HLS/DASH + duration), `is_nsfw`, `is_spoiler`, `is_locked`, `is_stickied`, `edited`, `distinguished`, `removed_by_category`, engagement metrics (`age_hours`, `score_per_hour`, `comments_per_hour`, `engagement_total`, `is_high_engagement`), `sentiment_score`, `sentiment_label`, `created_at`, `scraped_at`.

#### Reddit comments (`type: "comment"`)

`id`, `comment_id`, `post_id`, `post_title`, `parent_id`, `permalink`, `author`, `body`, `score`, `controversiality`, `depth`, `child_count`, `is_submitter`, `distinguished`, `is_stickied`, `gilded`, `total_awards`, `is_removed`, `age_hours`, `sentiment_score`, `sentiment_label`, `created_at`.

#### Reddit users (`type: "user"`)

`username`, `user_id`, `url`, `total_karma`, `link_karma`, `comment_karma`, `awardee_karma`, `awarder_karma`, `trophies`, `is_gold`, `is_mod`, `is_employee`, `is_verified`, `bio`, `account_created_at`, `account_age_days`.

#### Subreddit analytics (`type: "subreddit_analytics"`)

`name`, `title`, `description`, `subscribers`, `active_users`, `subreddit_type`, `is_nsfw`, `created_at`, `community_icon`, `rules` (short_name, description, kind, priority), `rule_count`, `moderators`, `moderator_count`.

Every run also writes `OUTPUT` and `RUN_SUMMARY` to the key-value store with a terminal status (`COMPLETE`, `PARTIAL`, `VALID_EMPTY`, `INVALID_INPUT`, `UPSTREAM_FAILED`), item counts, warnings, and the estimated charge.

### How to use it

#### Apify Console (no code)

1. Click **Try for free**.
2. Paste subreddits, a search query, post URLs, or usernames.
3. Set **Max posts**, toggle **Include comments**, choose **Sort** and **Time filter**.
4. Click **Start** and export as JSON, CSV, or Excel.

#### AI agents (Claude, ChatGPT) via MCP

Connect through the [Apify MCP Server](https://apify.com/apify/actors-mcp-server) and ask naturally:

> "Get the top 100 posts from r/MachineLearning this week with all their comments."
> "Search Reddit for posts about GPT-5 and return the top 50 with sentiment."
> "Pull u/spez profile, karma, and last 200 comments."

#### REST API

```bash
curl -X POST "https://api.apify.com/v2/acts/dltik~reddit-scraper-api/runs" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "subredditUrls": ["r/MachineLearning"],
    "maxPosts": 50,
    "sort": "top",
    "timeFilter": "week",
    "includeComments": true,
    "maxCommentsPerPost": 50
  }'
```

### How much does Reddit scraping cost?

Pay per result. No monthly fee.

| Event | Price | Per 1,000 |
|-------|-------|-----------|
| Post scraped | $0.0020 | $2.00 |
| Comment scraped | $0.0006 | $0.60 |
| User profile scraped | $0.0010 | $1.00 |
| Subreddit analytics | $0.0015 | $1.50 |
| Media downloaded (opt-in) | $0.0015 | $1.50 |
| AI enrichment (opt-in) | $0.0005 | $0.50 |
| Actor start | $0.005 flat per run | - |

**Example:** 100 posts with 50 comments each = 100 posts ($0.20) + 5,000 comments ($3.00) = **$3.20** plus the $0.005 start. The same job on a flat $0.003/result scraper costs $15.30.

Set `maxTotalChargeUsd` to cap spend - the run stops billing when the ceiling is reached.

### Automate and schedule Reddit monitoring

Schedule the Reddit Scraper to run hourly or daily with **Monitoring mode** on: each run returns only new posts and comments, so you pay once per item. Send results to Google Sheets, Slack, a webhook, Make, Zapier or n8n with Apify integrations, and you get a Reddit alert feed for your brand or keywords that you set up once.

### Optional: bring your own Reddit app

The actor works out of the box with built-in access. For higher throughput or a private rate budget, register a free app at [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps) (type "installed app" needs only the id) and set `redditClientId`.

### Limitations

Public Reddit data only. No private, quarantined, banned, deleted, or login-only content. The moderators list is returned only where a subreddit exposes it to app-only access. Broad searches and very high-volume runs are bounded by Reddit's rate limits; those cases are reported in `RUN_SUMMARY`. Use the data only where your rights and downstream purpose allow.

### FAQ

**Do I need a Reddit account or API key?** No. It works out of the box. You can optionally add your own Reddit app id for a higher rate budget.

**How do I get more than 1,000 posts?** Reddit caps live listings around 1,000 items. Enable **Use archive** to backfill deeper history via the free Arctic Shift archive.

**Can I scrape a whole comment thread?** Yes. Enable **Include comments**; the full nested tree is expanded, including "load more comments," up to your per-post cap.

**How do I only get new posts on a schedule?** Turn on **Monitoring mode** with a **Monitor key** and schedule the actor. It returns only items not seen in previous runs.

**How do I filter posts and comments in the output?** Every record has a `type` field - filter on `post`, `comment`, `user`, or `subreddit_analytics`.

**Is there a free Reddit API?** Reddit's official Data API needs an approved app and has strict rate limits and commercial terms. This Reddit Scraper handles access, rate limits and pagination for you, and you pay only per item returned.

**How do I scrape Reddit comments from a post?** Paste the post URL into **Post URLs** (or turn on **Include comments** for subreddit and search runs). Every comment comes back as its own record with `parent_id` and `depth`, so you can rebuild the tree.

**Can I search all of Reddit by keyword?** Yes. Fill **Search query**, pick posts, comments, communities or users, and optionally scope it to one subreddit with **Within subreddit**.

**Can I export Reddit data to CSV or Excel?** Yes. Every dataset can be downloaded as JSON, CSV, Excel, XML or HTML from the Console or the API.

**Is scraping Reddit legal?** This actor only collects publicly visible data. Check that your use complies with Reddit's terms and with privacy rules such as GDPR, especially if you store usernames.

***

⭐ **Found this Reddit Scraper useful? Bookmark it** - bookmarks keep it visible on the Apify Store and fund new features.

#### Related actors

- [Pinterest Scraper](https://apify.com/dltik/pinterest-scraper) - pins, boards and profiles for visual trend research.
- [Facebook Ads Library Scraper](https://apify.com/dltik/facebook-ads-scraper) - competitor ads and creatives from Meta.
- [TikTok Creative Center Scraper](https://apify.com/dltik/tiktok-creative-center) - trending hashtags, songs and top ads on TikTok.
- [Keyword & SERP Research](https://apify.com/dltik/keyword-serp-research) - turn Reddit questions into search keywords.

# Actor input Schema

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

Universal input. Paste any Reddit URLs - subreddits, posts, user profiles, or search pages. Each URL is routed to the right mode automatically. Also accepts bare forms like 'r/python', 'u/spez', a post id, or a redd.it short link.

## `subredditUrls` (type: `array`):

Subreddit names or URLs to scrape posts from (e.g. 'programming', 'r/python', or a full community URL). Use with Sort and Time filter below.

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

Keyword or topic to search across all of Reddit (or one subreddit via 'Within subreddit'). Supports quoted "exact phrases" and author:/subreddit: operators.

## `withinSubreddit` (type: `string`):

Scope the search query to a single subreddit (name or URL). Leave empty to search all of Reddit.

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

What the search query returns: posts, comments, communities, or users.

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

Direct post URLs (or ids / redd.it short links) to scrape with their full comment thread.

## `usernames` (type: `array`):

Reddit usernames or profile URLs to scrape (profile + karma breakdown + trophies). Enable 'Include user history' for their posts/comments.

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

Sort order for subreddit feeds and search. Feeds: hot/new/top/rising/controversial. Search: relevance/hot/top/new/comments.

## `timeFilter` (type: `string`):

Time window for 'top'/'controversial' sorts and search.

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

Maximum posts (or search results) to scrape per source. Reddit live feeds cap around 1000 per listing; use Archive mode for deeper history.

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

Also scrape the comment thread of each post. Comments are billed separately and cheaply ($0.60 / 1,000).

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

Cap comments scraped per post. Set 0 to skip comments. The full nested tree (including 'load more comments') is expanded up to this cap.

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

How to sort each post's comment tree.

## `commentDepthLimit` (type: `integer`):

Maximum nesting depth to fetch (0 = top-level only). Leave empty for full depth.

## `expandMoreComments` (type: `boolean`):

Recursively expand collapsed 'load more comments' and 'continue this thread' nodes so giant threads are not truncated.

## `includeSubredditAnalytics` (type: `boolean`):

Emit one metadata record per subreddit with subscribers, description, rules, and moderators. Billed at $1.50 / 1,000.

## `includeUserHistory` (type: `boolean`):

For scraped usernames, also pull their post and comment history (billed as posts/comments). Enable 'Use archive' to go past Reddit's ~1000-item cap.

## `maxUserHistory` (type: `integer`):

Maximum posts and comments to pull per user history.

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

Only keep posts created on or after this date (YYYY-MM-DD).

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

Only keep posts created on or before this date (YYYY-MM-DD).

## `includeNsfw` (type: `boolean`):

Include NSFW (18+) posts. Off by default.

## `onlyWithFlair` (type: `boolean`):

Keep only posts that have a link flair set.

## `keywords` (type: `array`):

Keep only posts matching these keywords (see Match mode). Case-insensitive.

## `keywordMatchMode` (type: `string`):

How the keyword filter matches: any keyword, all keywords, title only, or exact phrase.

## `negativeKeywords` (type: `array`):

Drop posts containing any of these keywords (title or body). Case-insensitive.

## `minScore` (type: `integer`):

Keep only posts with at least this score (upvotes).

## `minComments` (type: `integer`):

Keep only posts with at least this many comments.

## `minUpvoteRatio` (type: `number`):

Keep only posts with at least this upvote ratio (0 to 1).

## `computeSentiment` (type: `boolean`):

Add a free built-in sentiment_score and sentiment_label (AFINN-165) to every post and comment. No extra charge.

## `aiAnalysis` (type: `boolean`):

Add LLM sentiment, intent, emotion, entities, relevance and category to each item. Billed $0.0005 per analyzed item.

## `customLabels` (type: `array`):

User-defined true/false labels evaluated by the AI on each item (requires AI enrichment). Billed $0.0001 per label per item.

## `downloadMedia` (type: `boolean`):

Download images, galleries and Reddit video (audio-muxed) to the key-value store instead of returning expiring URLs. Billed $0.0015 per asset stored.

## `maxMediaPerPost` (type: `integer`):

Maximum media assets to download per post (galleries can have many).

## `outputFormat` (type: `string`):

Record shape: default rich JSON, jsonl-finetune (LLM SFT message pairs), or rag-markdown (chunked markdown for vector DBs).

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

Only emit items not seen in previous runs with the same Monitor key. True incremental scraping - never pay twice for the same post.

## `monitorKey` (type: `string`):

Namespace for incremental dedup state. Use one key per recurring job.

## `useArchive` (type: `boolean`):

Use the free Arctic Shift archive to backfill history beyond Reddit's ~1000-item live cap (for user history and Archive mode). Best-effort, polite rate.

## `archiveSince` (type: `string`):

Archive mode: earliest date to fetch (YYYY-MM-DD).

## `archiveUntil` (type: `string`):

Archive mode: latest date to fetch (YYYY-MM-DD).

## `maxTotalChargeUsd` (type: `number`):

Hard cost ceiling enforced continuously in-code. The run stops billing once this is reached and finishes as PARTIAL. Leave empty for no in-code cap.

## `redditClientId` (type: `string`):

Bring your own Reddit app for a private, higher rate budget. Register a free app at reddit.com/prefs/apps ('installed app' needs only the id; 'script' also needs the secret). Leave empty to use the built-in access.

## `redditClientSecret` (type: `string`):

Secret for a 'script'-type Reddit app. Not needed for 'installed app' type.

## `tokensPerClient` (type: `integer`):

How many OAuth tokens to mint per client id (each has its own 100-req/10min budget). Higher = more throughput.

## `proxyConfig` (type: `object`):

Optional Apify proxy for IP rotation. Not required - oauth.reddit.com works from datacenter IPs.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.reddit.com/r/programming/"
  ],
  "searchType": "posts",
  "sort": "hot",
  "timeFilter": "all",
  "maxPosts": 50,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "commentSort": "top",
  "expandMoreComments": true,
  "includeSubredditAnalytics": false,
  "includeUserHistory": false,
  "maxUserHistory": 100,
  "includeNsfw": false,
  "onlyWithFlair": false,
  "keywordMatchMode": "any",
  "computeSentiment": true,
  "aiAnalysis": false,
  "downloadMedia": false,
  "maxMediaPerPost": 10,
  "outputFormat": "default",
  "monitorMode": false,
  "useArchive": false,
  "tokensPerClient": 2,
  "proxyConfig": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Posts, comments, users and subreddit analytics.

# 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/programming/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dltik/reddit-scraper-api").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/programming/"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dltik/reddit-scraper-api"
        }
    }
}
```

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/eXed4GIB2GokDZbrz/builds/enZSEelODObexnYeG/openapi.json
