# Reddit Scraper - Posts, Comments & Search (`briskpebble/reddit-scraper`) Actor

Scrape Reddit posts, comments, subreddits and user profiles by keyword search or URL. No API key or login needed. Filter by date, upvotes and NSFW, get full comment threads and free sentiment analysis. Export JSON, CSV or Excel, or connect via API, MCP and integrations. Pay only per result.

- **URL**: https://apify.com/briskpebble/reddit-scraper.md
- **Developed by:** [Brisk Pebble](https://apify.com/briskpebble) (community)
- **Stats:** 3 total users, 3 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.50 / 1,000 post scrapeds

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

### What does Reddit Scraper do?

**Reddit Scraper** extracts public data from [Reddit](https://www.reddit.com): **posts, full comment threads, subreddit details and user activity**. Start from any mix of:

- 🔎 **Keyword search**, across all of Reddit or inside one subreddit, sorted by relevance, hot, top, new or most comments
- 📰 **Subreddit feeds**: hot, new, top, rising or controversial, with a time range
- 👤 **User profiles**: the posts (and optionally the comments) someone published
- 🔗 **Any Reddit URL**: posts, subreddits, searches and profiles, including `old.reddit.com` and `redd.it` short links

You don't need a Reddit account, API key or login. Results land in a clean dataset you can download as **JSON, CSV, Excel, XML or HTML**, call through the **Apify API**, schedule, or connect to **Make, Zapier, n8n, Google Sheets, Slack** and AI agents over **MCP**.

### Why use this Reddit scraper?

- **Built for Reddit after the 2026 API lockout.** Reddit shut down its unauthenticated `.json` endpoints in May 2026, and most free scrapers broke. This Actor reads the same server-rendered pages the Reddit website uses. A real browser steps in only when Reddit asks for a check, so runs stay fast and cheap.
- **Pay only for results.** You're charged per saved post or comment. Posts removed by your filters are never charged.
- **Precise filters.** Filter by date range (absolute or "last 7 days"), minimum upvotes and comments, NSFW, and strict keyword matching. On "New" feeds the scraper stops as soon as it reaches posts older than your date.
- **Complete threads.** Each comment includes author, text, score, depth and parent ID, so you can rebuild the whole tree. "More replies" threads are expanded.
- **Free sentiment analysis.** Optionally label every post and comment positive, neutral or negative.
- **Reliable runs.** Duplicates are removed across inputs, the run resumes after a platform migration without re-charging, and it fails loudly instead of returning an empty "success".

### What Reddit data can I extract?

| Posts | Comments | Communities |
| --- | --- | --- |
| Title, full text, URL | Comment text and URL | Name, title, description |
| Author, author ID and profile | Author and profile | Member count |
| Subreddit, subreddit ID | Score (upvotes) | Active users |
| Score, upvote ratio | Depth and parent ID | Icon and banner |
| Comment count, awards | Post ID, URL and title | NSFW flag |
| Flair, post type, domain, linked URL | Created date | Created date |
| Thumbnail and media URLs | Deleted/removed flag | |
| NSFW, spoiler, pinned, locked | Sentiment (optional) | |
| Created date, language, search snippet | | |

Every item has a `dataType` (`post`, `comment` or `community`) and a `source` field showing which of your inputs it came from.

### How to scrape Reddit

1. Click **Try for free** and open the **Input** tab.
2. **Step 1:** add at least one target, e.g. a search term like `best CRM for startups`, a subreddit like `SaaS`, a username, or a Reddit URL.
3. **Step 2 (optional):** turn on **Scrape comments**, and **Get full post text** if you need complete post bodies for search results.
4. **Step 3 (optional):** add filters, e.g. **Posted after** = `30 days` and **Minimum upvotes** = `10`.
5. **Step 4:** set **Max results** to control the size and cost of the run.
6. Click **Start**, then download your data from the **Output** tab, or use the API.

### How much does it cost to scrape Reddit?

This Actor uses **pay-per-event** pricing. You pay a small fee per **post**, per **comment** and per **community** saved, plus a tiny start fee per run. Current prices are on the **Pricing** tab. Higher Apify plans get automatic discounts.

Example: 1,000 posts plus 5,000 comments costs about $1.50 + $2.50 = **$4.00**. **Max results** and the run's maximum cost let you cap spending exactly, and the run stops as soon as either is reached.

With the Apify **free plan's** monthly credit you can try the scraper on a few thousand posts at no cost.

### Input example

```json
{
    "searchQueries": ["best CRM for startups"],
    "searchSort": "relevance",
    "searchTime": "month",
    "subreddits": ["SaaS"],
    "subredditSort": "top",
    "subredditTime": "week",
    "includeComments": true,
    "maxCommentsPerPost": 20,
    "postedAfter": "30 days",
    "minScore": 5,
    "maxItems": 500,
    "maxPostsPerSource": 50,
    "sentimentAnalysis": true
}
```

### Output example

A post:

```json
{
    "dataType": "post",
    "id": "1tq0zk7",
    "fullId": "t3_1tq0zk7",
    "url": "https://www.reddit.com/r/technology/comments/1tq0zk7/the_netherlands_just_blocked_a_us_company_from/",
    "title": "The Netherlands just blocked a US company from buying the app Dutch citizens use for everything",
    "body": null,
    "author": "AdSpecialist6598",
    "authorId": "t2_cc0n0rs5",
    "authorUrl": "https://www.reddit.com/user/AdSpecialist6598/",
    "subreddit": "technology",
    "subredditId": "t5_2qh16",
    "subredditUrl": "https://www.reddit.com/r/technology/",
    "createdAt": "2026-05-28T11:37:01.506Z",
    "score": 52692,
    "upvoteRatio": 0.96,
    "commentsCount": 1743,
    "awardsCount": 23,
    "postType": "link",
    "flair": null,
    "domain": "techspot.com",
    "contentUrl": "https://www.techspot.com/news/112552-netherlands-blocked-us-company-buying-app-dutch-citizens.html",
    "thumbnailUrl": null,
    "mediaUrls": [],
    "isNsfw": false,
    "isSpoiler": false,
    "isStickied": false,
    "isLocked": false,
    "language": "en",
    "searchSnippet": null,
    "source": { "type": "subreddit", "input": "technology" },
    "scrapedAt": "2026-10-19T16:00:00.000Z"
}
```

A comment:

```json
{
    "dataType": "comment",
    "id": "ol8tp8n",
    "fullId": "t1_ol8tp8n",
    "url": "https://www.reddit.com/r/Rakuten/comments/1taeiw0/comment/ol8tp8n/",
    "postId": "1taeiw0",
    "postUrl": "https://www.reddit.com/r/Rakuten/comments/1taeiw0/",
    "postTitle": "Lifelock 95% cash back",
    "parentId": "1taeiw0",
    "depth": 0,
    "author": "Obvious_Painting_881",
    "authorUrl": "https://www.reddit.com/user/Obvious_Painting_881/",
    "body": "Where do you find $750? The highest available package for Total was $284.99 ...",
    "createdAt": "2026-05-11T20:16:57.590Z",
    "score": 2,
    "subreddit": "Rakuten",
    "isDeleted": false,
    "source": { "type": "search", "input": "lifelock rakuten" },
    "scrapedAt": "2026-10-19T16:00:00.000Z",
    "sentiment": { "score": 0, "comparative": 0, "label": "neutral" }
}
```

The **Output** tab has three table views: **Overview**, **Posts** and **Comments**.

### Tips for the best results

- **Getting full post text:** search results and feeds only include previews. Turn on **Get full post text** to fetch the full body (one extra request per post).
- **Monitoring new posts:** schedule the Actor daily with feed sort **New** and **Posted after** = `1 day`. It stops paginating once it reaches older posts, so daily runs stay cheap.
- **Lead generation and brand monitoring:** search with exact phrases such as `"is there a tool"` or `"alternative to Notion"`, and turn on **Strict keyword match** to drop Reddit's fuzzy matches.
- **Large jobs:** raise **Max posts per target** and **Max results** together. Each subreddit feed can go back roughly 1,000 posts, which is a Reddit limit. To get more, split the work by time range or search terms.
- **If you get blocked:** keep the default **RESIDENTIAL** proxy. If runs still fail, set **Fetch mode** to **Browser**.

### Integrations and API

You can run Reddit Scraper from your own code with the [Apify API](https://docs.apify.com/api/v2), or with the [JavaScript](https://docs.apify.com/api/client/js) or [Python](https://docs.apify.com/api/client/python) client:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("<USERNAME>/reddit-scraper").call(run_input={
    "searchQueries": ["web scraping"],
    "includeComments": True,
    "maxItems": 200,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["dataType"], item.get("title") or item.get("body"))
```

It also connects to Make, Zapier, n8n, Google Sheets, Airbyte, Slack, webhooks and the [Apify MCP server](https://mcp.apify.com), so Claude, ChatGPT and Cursor agents can call it as a tool.

### FAQ

#### Is it legal to scrape Reddit?

This Actor collects only **publicly visible** data that anyone can see without logging in. It doesn't log in, bypass paywalls or access private communities. Courts in several jurisdictions (for example *hiQ Labs v. LinkedIn* in the US) have found that scraping public data is generally lawful. However, Reddit's User Agreement prohibits scraping without Reddit's permission, and your results can contain personal data protected by laws such as the GDPR. You are responsible for how you use the data. If you're unsure, consult a lawyer, and consider Reddit's official Data API for commercial use. Read more in Apify's [guide to the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

#### Do I need a Reddit API key or account?

No. The Actor needs no API key, OAuth app or Reddit account.

#### Why did my run return fewer results than "Max results"?

Common reasons:

- Your filters removed posts. Filtered-out posts aren't charged.
- The target ran out of content. Reddit caps feeds at about 1,000 posts.
- **Max posts per target** was reached first.

The log explains why the run stopped.

#### How fresh is the data?

Every run reads Reddit live, so scores and comment counts are current as of the moment the run scrapes them.

#### Can I scrape comments of a specific post?

Yes. Paste the post URL under **Reddit URLs** and turn on **Scrape comments**. Use **Max comments per post** to cap how many you get, and **Comment sort** to choose which ones come first.

#### Something broke. What should I do?

Reddit changes its website from time to time. Turn on **Debug logging** and run again; pages that couldn't be parsed are saved to the run's key-value store. Then open an issue on the **Issues** tab with the run link. Issues are usually fixed within a day or two.

#### Can you build a custom Reddit solution for me?

Yes. Get in touch through the **Issues** tab for custom fields, other platforms or managed data delivery.

# Changelog

This Actor's version history is a separate document: https://apify.com/briskpebble/reddit-scraper/changelog.md

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search Reddit posts for, one per line. Reddit search syntax works: "exact phrase", OR, -exclude, subreddit:name, author:name, site:example.com.

## `searchSort` (type: `string`):

How Reddit ranks the search results.

## `searchTime` (type: `string`):

Only return search results posted within this period.

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

Restrict the search to one community, e.g. "SaaS" or "r/SaaS". Leave empty to search all of Reddit.

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

Subreddit names or URLs to scrape posts from, e.g. "technology", "r/AskReddit" or "https://www.reddit.com/r/startups/".

## `subredditSort` (type: `string`):

Which feed of the subreddit to scrape.

## `subredditTime` (type: `string`):

Period for the Top and Controversial feeds. Ignored for Hot, New and Rising.

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

Usernames or profile URLs whose submitted posts you want, e.g. "spez", "u/spez" or "https://www.reddit.com/user/spez/".

## `includeUserComments` (type: `boolean`):

Besides submitted posts, save the comments these users wrote.

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

Any mix of post, subreddit, search and user profile URLs. Post URLs return the full post (and its comments when Step 2 is on). Sorting in the URL (e.g. /top/?t=month or \&sort=new) is respected.

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

Save the comments of every scraped post as separate items (dataType = "comment"), with author, text, score, depth and parent ID so you can rebuild the thread.

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

Stop after this many comments for each post.

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

Order in which Reddit returns comments. With a low comment limit this decides which comments you get.

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

Follow Reddit's "more replies" links to collect deeper reply threads until the comment limit is reached.

## `skipBotComments` (type: `boolean`):

Leave out comments by AutoModerator and other bots (names ending in "bot").

## `fetchPostDetails` (type: `boolean`):

Open each post found via search or feeds to get its complete body text, flair and media. Feeds and search only show previews. Uses one extra request per post.

## `includeCommunityInfo` (type: `boolean`):

Also save one item per subreddit (dataType = "community") with title, description, member count and icon.

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

Only keep posts and comments published after this date. Use an absolute date (2026-01-31) or a relative one (7 days, 2 weeks, 3 months). On "New" feeds the scraper stops paginating once it reaches older posts.

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

Only keep posts and comments published before this date (absolute or relative).

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

Keep posts Reddit marks as NSFW. Off by default.

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

Skip posts with a lower score (upvotes minus downvotes).

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

Skip posts with fewer comments.

## `strictSearch` (type: `boolean`):

Reddit search is fuzzy. When on, a search result is kept only if every word of your search term appears in its title, text or snippet.

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

Total number of items (posts + comments + communities) to save across all targets. The run stops when it is reached. This is the main way to control cost.

## `maxPostsPerSource` (type: `integer`):

Maximum posts to save for each search term, subreddit, user or URL. Comments don't count towards this limit.

## `sentimentAnalysis` (type: `boolean`):

Add a sentiment field (score, comparative, label positive/neutral/negative) to every post and comment. Uses the AFINN lexicon on English text. Runs locally at no extra cost.

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

Reddit blocks most datacenter IPs, so residential proxies are recommended (default).

## `fetchMode` (type: `string`):

Auto (recommended): fast HTTP requests; a real browser opens only when Reddit shows a challenge, and its cookies are reused. HTTP only: cheapest, but gives up on challenges. Browser: every page in Chrome; slowest and most expensive, use only if Auto keeps getting blocked.

## `maxConcurrency` (type: `integer`):

Maximum parallel requests. Higher is faster but more likely to be rate-limited.

## `debugLog` (type: `boolean`):

Verbose logs, and save pages that could not be parsed to the key-value store. Useful when reporting an issue.

## Actor input object example

```json
{
  "searchSort": "relevance",
  "searchTime": "all",
  "subreddits": [
    "technology"
  ],
  "subredditSort": "hot",
  "subredditTime": "week",
  "includeUserComments": false,
  "includeComments": false,
  "maxCommentsPerPost": 20,
  "commentSort": "confidence",
  "expandMoreComments": true,
  "skipBotComments": false,
  "fetchPostDetails": false,
  "includeCommunityInfo": false,
  "includeNsfw": false,
  "strictSearch": false,
  "maxItems": 20,
  "maxPostsPerSource": 25,
  "sentimentAnalysis": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "fetchMode": "auto",
  "maxConcurrency": 5,
  "debugLog": false
}
```

# Actor output Schema

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

Every scraped post, comment and community, in one dataset. Each item has a dataType field: post, comment or community.

## `posts` (type: `string`):

Posts with title, author, subreddit, score, comment count and date.

## `comments` (type: `string`):

Comments with author, text, score, depth, parent and the post they belong to.

# 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": [
        "technology"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("briskpebble/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": ["technology"],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("briskpebble/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 '{
  "subreddits": [
    "technology"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call briskpebble/reddit-scraper --silent --output-dataset

```

## MCP server setup

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