# Reddit Scraper - Posts, Comments, Search & Subreddits ($2/1k) (`harshmaur/reddit-scraper`) Actor

Scrape Reddit posts, comments, subreddits, user profiles, and keyword search results - no API key, no rate limits, no login. From $2 per 1,000 results, pay only for what you use. Full comment threads, 60+ fields per post, media and galleries. Works with AI Agents, MCP, n8n, Make, Zapier and more.

- **URL**: https://apify.com/harshmaur/reddit-scraper.md
- **Developed by:** [Harsh Maur](https://apify.com/harshmaur) (community)
- **Categories:** Social media, Lead generation, AI
- **Stats:** 4,274 total users, 1,390 monthly users, 55.6% runs succeeded, 70 bookmarks
- **User rating**: 4.95 out of 5 stars

## Pricing

from $1.50 / 1,000 result saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 — Scrape Reddit Posts, Comments & Subreddits (No API Key)

<p align="center">
  <strong>Scrape Reddit posts, comments, subreddits, search results, and user profiles — no API key, no login, no rate limits. From $2 per 1,000 results.</strong>
</p>

<p align="center">
  <a href="https://apify.com/harshmaur/reddit-scraper">
    <img src="https://img.shields.io/badge/Apify-Try%20Now-00C7B7?style=for-the-badge&logo=apify" alt="Try on Apify">
  </a>
  <a href="https://apify.com/harshmaur/reddit-scraper/input-schema">
    <img src="https://img.shields.io/badge/Input-Schema-blue?style=for-the-badge" alt="Input Schema">
  </a>
  <a href="https://apify.com/harshmaur/reddit-scraper/api">
    <img src="https://img.shields.io/badge/API-Docs-orange?style=for-the-badge" alt="API Docs">
  </a>
</p>

<p align="center">
  <a href="#what-does-reddit-scraper-do">What it does</a> •
  <a href="#how-to-scrape-reddit">How to use</a> •
  <a href="#scrape-search-results">Search</a> •
  <a href="#scrape-a-subreddit">Subreddits</a> •
  <a href="#scrape-reddit-comments">Comments</a> •
  <a href="#output-example">Output</a> •
  <a href="#pricing">Pricing</a> •
  <a href="#faq">FAQ</a>
</p>

---

### What does Reddit Scraper do? {#what-does-reddit-scraper-do}

**Reddit Scraper** extracts **posts, comments, user profiles, and community data** from [Reddit](https://www.reddit.com/) without needing API keys or authentication. Simply provide URLs or search terms, and get structured data in JSON, CSV, or Excel format.

<table>
<tr>
<td width="50%">

#### ✅ No API keys needed

Bypass Reddit's 600 requests/10min API limit — no Reddit account, no OAuth

#### 🗂️ Full subreddit scraping

Pull an entire subreddit — far beyond the recent posts a normal scrape returns

#### 💬 Complete comment threads

Collect every comment on a post, including nested replies — not just the first page

</td>
<td width="50%">

#### 📊 Rich, structured data

70+ fields per post, 115+ across all data types — media, awards, flags, and engagement analytics

#### 🔄 Export anywhere

JSON, CSV, Excel, XML, HTML · n8n, Zapier, Make, REST API, MCP

#### 💰 From $2 per 1,000 results

Pay-per-result, no monthly fees — typically ~40% cheaper than comparable Reddit scrapers

</td>
</tr>
</table>

---

### How to scrape Reddit without the API

Reddit's official API limits you to **600 requests per 10 minutes** and requires OAuth setup. This scraper bypasses those limitations entirely, letting you extract millions of posts and comments without authentication, cookies, or a Reddit account.

**Perfect for:**

- 📊 **Market researchers** analyzing consumer opinions
- 📢 **Brand managers** monitoring mentions and sentiment
- 🤖 **Data scientists** building ML training datasets
- 📝 **Content creators** discovering trending topics
- 📈 **Business analysts** tracking competitors

---

### What data can you extract from Reddit?

Over **115 distinct fields** across four data types — one of the richest outputs of any Reddit scraper. Every item also carries `dataType`, `crawledAt`, and the `searchTerm` that found it, so mixed datasets stay easy to filter.

| Data Type | Field count | Highlights |
| --- | --- | --- |
| **Posts** | 70+ | Full content + HTML, rich media & galleries, awards, flags, engagement analytics |
| **Comments** | 45+ | Full thread structure (depth, parents), controversiality, per-comment analytics |
| **User profiles** | 20+ | All karma types, account age, verification, followers, avatar |
| **Communities** | 15+ | Members, online users, descriptions, icons & banners |

<details>
<summary><strong>All post fields (70+)</strong></summary>

- **Identity & links:** `id`, `parsedId`, `postUrl`, `url`, `contentUrl`, `domain`, `outboundUrlHost`, `urlOverriddenByDest`, `thumbnail`
- **Content:** `title`, `body`, `bodyHtml`, `postType` (text/link/image/video/gallery), `flair`, `isSelf`
- **Author:** `authorName`, `authorId`, `parsedAuthorId`, `authorFlairText`, `authorPremium`
- **Community context:** `communityName`, `parsedCommunityName`, `communityId`, `subredditName`, `subredditId`, `subredditSubscribers`
- **Engagement:** `score`, `upVotes`, `upvoteRatio`, `commentsCount`, `totalAwardsReceived`, `gilded`, `numCrossposts`, `numDuplicates`
- **Flags:** `nsfw`, `over18`, `spoiler`, `locked`, `hidden`, `archived`, `pinned`, `stickied`, `edited`, `editedAt`, `distinguished`, `scoreHidden`, `isOriginalContent`
- **Media:** `mediaType`, `hasMedia`, `isVideo`, `isGallery`, `galleryCount`, `galleryImages` (full-resolution URLs), `mediaAssets` (`{mediaId, url, mimeType, width, height}`), `videoUrl`, `images`, plus raw Reddit objects `media`, `secureMedia`, `mediaMetadata`, `galleryData`
- **Derived analytics:** `ageHours`, `scorePerHour`, `commentsPerHour`, `engagementTotal`, `commentToScoreRatio`, `isHighEngagement`, `titleLength`, `bodyLength`, `wordCount`
- **Timestamps & provenance:** `createdAt`, `crawledAt`, `searchTerm`

</details>

<details>
<summary><strong>All comment fields (45+)</strong></summary>

- **Identity & links:** `id`, `parsedId`, `url`
- **Content:** `body`, `bodyHtml`
- **Author:** `authorName`, `authorId`, `parsedAuthorId`, `authorFullname`, `authorFlairText`, `authorPremium`
- **Thread structure:** `parentId`, `parsedParentId`, `parentKind`, `depth`, `isSubmitter`, `collapsed`, `collapsedReason`
- **Parent post context:** `postId`, `parsedPostId`, `postTitle`, `postUrl`, `postUpVotes`, `postCommentsCount`, `postCreatedAt`
- **Community context:** `communityName`, `parsedCommunityName`, `subredditName`
- **Engagement:** `score`, `commentUpVotes`, `controversiality`, `totalAwardsReceived`, `gilded`
- **Flags:** `distinguished`, `stickied`, `scoreHidden`, `edited`, `editedAt`
- **Derived analytics:** `ageHours`, `scorePerHour`, `bodyLength`, `wordCount`
- **Timestamps & provenance:** `commentCreatedAt`, `crawledAt`, `searchTerm`

</details>

<details>
<summary><strong>All user profile fields (20+)</strong></summary>

- **Identity:** `username`, `profileUrl`, `bio`
- **Karma:** `totalKarma`, `linkKarma`, `commentKarma`, `awardeeKarma`, `awarderKarma`
- **Status:** `isGold`, `isMod`, `isEmployee`, `verified`, `hasVerifiedEmail`, `acceptFollowers`
- **Social:** `followersCount`
- **Visuals:** `iconImg`, `snoovatarImg`, `bannerImg`
- **Timestamps:** `createdAt` (account age), `crawledAt`

</details>

<details>
<summary><strong>All community fields (15+)</strong></summary>

- **Identity:** `name`, `communityName`, `id`, `parsedId`, `url`
- **Descriptions:** `description`, `publicDescription`
- **Size & activity:** `membersCount`, `onlineUsersCount`
- **Visuals:** `communityIcon`, `bannerImage`
- **Flags & timestamps:** `nsfw`, `createdAt`, `crawledAt`, `searchTerm`

</details>

---

### Reddit scraping use cases

<details>
<summary><strong>🔍 Brand Monitoring & Reputation Management</strong></summary>

Track brand mentions, product discussions, and customer feedback across thousands of subreddits in real-time.

**Example:** Monitor mentions of your product in r/technology, r/gadgets, and r/reviews to understand customer sentiment.

</details>

<details>
<summary><strong>📊 Market Research & Consumer Insights</strong></summary>

Extract consumer opinions, preferences, and pain points from authentic Reddit discussions.

**Example:** Scrape r/fitness, r/nutrition, and r/loseit to understand consumer preferences for health products.

</details>

<details>
<summary><strong>🎯 Sentiment Analysis & ML Training Data</strong></summary>

Collect large datasets for NLP and sentiment analysis projects.

**Example:** Extract 10,000+ comments from r/CryptoCurrency for sentiment analysis and price prediction models.

</details>

<details>
<summary><strong>📈 Trend Discovery & Content Ideas</strong></summary>

Identify emerging trends and viral content to inform your content strategy.

**Example:** Monitor r/AskReddit and r/todayilearned to discover trending questions and create viral content.

</details>

<details>
<summary><strong>🏆 Competitive Intelligence</strong></summary>

Track competitor mentions and product comparisons across Reddit communities.

**Example:** Scrape discussions comparing your SaaS product with competitors in r/SaaS and r/Entrepreneur.

</details>

<details>
<summary><strong>🎓 Academic Research</strong></summary>

Gather large-scale datasets for academic studies and thesis research.

**Example:** Extract 100,000+ posts from mental health subreddits for research on online support communities.

</details>

---

### How to scrape Reddit (no coding required) {#how-to-scrape-reddit}

Follow these steps to start extracting Reddit data:

1. [Create a free Apify account](https://apify.com/) (or log in)
2. Go to [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper)
3. Enter Reddit URLs or search terms
4. Click **Start**
5. Download results as JSON, CSV, or Excel

> 💡 **Tip:** For the complete list of input parameters, see the [Input Schema tab](https://apify.com/harshmaur/reddit-scraper/input-schema).

#### Three ways to scrape Reddit data

**Reddit Scraper** has three independent ways to pull data — use any one, or combine them in a single run:

| Mode | Input | Best for |
| --- | --- | --- |
| 🔎 **Search Keywords** | `searchTerms` | Find posts, comments, or communities by topic across Reddit — or inside one subreddit with `withinCommunity`. Supports sort and time filters. |
| 🔗 **Direct URLs** | `startUrls` | Scrape a specific post, user profile, subreddit page, or search-results page. |
| 🗂️ **Full Subreddit Scrape** | `subredditUrls` | Pull *every* available post from a subreddit — far more than a normal subreddit-page scrape. |

**Other options:** enable `crawlCommentsPerPost` to also collect each post's comments, use `maxPostsCount` / `maxCommentsPerPost` to cap results, `includeNSFW` for 18+ content, and `fastMode` (on by default) for search-page URLs.

**Supported URL types for `startUrls`:**

| URL Type         | Example                                            |
| ---------------- | -------------------------------------------------- |
| **Subreddit**    | `https://www.reddit.com/r/technology/`             |
| **Post**         | `https://www.reddit.com/r/AskReddit/comments/abc123/post_title/` |
| **User Profile** | `https://www.reddit.com/user/someusername`         |
| **Popular**      | `https://www.reddit.com/r/popular/`                |
| **Search URLs**  | `https://www.reddit.com/search/?q=example&type=sr` |

---

### How to scrape Reddit search results {#scrape-search-results}

#### Search Reddit by keyword

Enter one or more keywords in `searchTerms` — each term runs as its own search. Choose what to collect (posts, comments, communities), how to rank results, and the time window:

1. **Enter Search Terms**: In the "Search Term" field, enter your desired keywords or phrases
2. **Configure Search Options**:
   - `Get posts`: Enable to search for posts _(default: true)_
   - `Get comments`: Enable to search for comments _(default: false)_
   - `Get communities`: Enable to search for communities _(default: false)_
3. **Set Sort Order**: `Relevance`, `Hot`, `Top`, `New`, `Comments` _(default: New)_
4. **Specify Time Range**: `All time`, `Last hour`, `Last day`, `Last week`, `Last month`, `Last year` _(default: All time)_
5. **NSFW Content**: Adjust the "Include NSFW content" setting _(default: false)_
6. **Set Result Limits**: max posts _(default: 10)_, max comments _(default: 10)_, max comments per post _(default: 10)_, max communities _(default: 2)_

> ℹ️ Limits are enforced as strict caps (up to N, never above N). For multiple `searchTerms`, each term gets its own cap (for example, `maxPostsCount: 10` means up to 10 posts per term). `maxPostsCount`, `maxCommentsCount`, `maxCommentsPerPost`, and `maxCommunitiesCount` can be `0` to disable those outputs.

```json
{
  "searchTerms": ["cryptocurrency", "blockchain"],
  "searchPosts": true,
  "searchComments": true,
  "searchCommunities": false,
  "searchSort": "hot",
  "searchTime": "month",
  "includeNSFW": false,
  "maxPostsCount": 50,
  "maxCommentsCount": 100,
  "maxCommentsPerPost": 20
}
````

This configuration searches for cryptocurrency and blockchain-related content, focusing on hot posts and comments from the last month, excluding NSFW content, and limiting results to 50 posts with up to 100 total comments (max 20 per post).

#### Search inside one subreddit (`withinCommunity`)

Use the **`withinCommunity`** parameter to search for keywords within a specific subreddit. This is perfect for focused market research, niche analysis, or monitoring specific communities.

**Format:** `r/subredditname` (e.g., `r/gaming`, `r/technology`)

```json
{
  "searchTerms": ["artificial intelligence", "machine learning"],
  "withinCommunity": "r/technology",
  "searchPosts": true,
  "searchSort": "hot",
  "searchTime": "week",
  "maxPostsCount": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

**Compare multiple brands in the same community:**

```json
{
  "searchTerms": ["iPhone 15", "Samsung Galaxy", "Google Pixel"],
  "withinCommunity": "r/Android",
  "searchPosts": true,
  "searchComments": true,
  "searchSort": "top",
  "searchTime": "month",
  "maxPostsCount": 50,
  "maxCommentsCount": 200,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

> **💡 Pro Tip**: Combine `withinCommunity` with `searchTerms` for lightning-fast, targeted data extraction. `searchTerms` already uses the fast path, so `fastMode` is not needed there.

#### Scrape Reddit search URLs at scale (Fast Mode)

**Fast Mode is enabled by default for Reddit search page URLs** and can significantly speed up large search-page scrapes. It uses direct JSON endpoints and skips unnecessary browser navigation.

**Performance benefits:**

- ✅ Up to 70% faster than regular mode
- ✅ Ideal for large Reddit search result pages
- ✅ Perfect for extracting posts from search URLs across multiple topics

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/search/?q=artificial%20intelligence&type=link&sort=new&t=week"
    },
    {
      "url": "https://www.reddit.com/search/?q=machine%20learning&type=link&sort=new&t=week"
    }
  ],
  "fastMode": true,
  "maxPostsCount": 500,
  "crawlCommentsPerPost": false,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

> ⚠️ **The Fast Mode toggle only applies to `startUrls` search pages, not `searchTerms`.** If you need precise comment search results for Reddit search URLs, disable Fast Mode by setting `"fastMode": false`:

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/technology/search/?q=specific%20topic&type=comments&sort=new"
    }
  ],
  "fastMode": false,
  "maxCommentsCount": 500,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### How to scrape a subreddit {#scrape-a-subreddit}

#### Scrape recent posts from a subreddit

Add the subreddit URL to `startUrls` to pull its current page of posts:

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/technology/" }],
  "crawlCommentsPerPost": false,
  "maxPostsCount": 10,
  "maxCommentsPerPost": 10,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### How to scrape an entire subreddit

Add one or more subreddits to **`subredditUrls`** to pull *all* of their posts — far more than the recent slice a normal subreddit-page scrape returns. Accepts names or links: `AskReddit`, `r/AskReddit`, or `https://www.reddit.com/r/AskReddit/`. Entries that aren't subreddits (post or user links) are skipped with a warning, so the rest of the run still completes.

**Use cases:**

- 🗂️ Build a complete dataset of a community's posts
- 📊 Analyze a subreddit's full history of topics and engagement
- 🧠 Create research or training corpora from a niche community

```json
{
  "subredditUrls": ["r/buildapc", "https://www.reddit.com/r/cscareerquestions/"],
  "crawlCommentsPerPost": true,
  "maxPostsCount": 5000,
  "maxCommentsPerPost": 50,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

> 💡 **Pro Tip**: Full Subreddit Scrape makes many more requests than a standard scrape, so runs take longer and cost more. Use `maxPostsCount` to control how many posts you pull per subreddit, and raise it when you want deeper history.

#### Scrape top posts from multiple subreddits

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/technology/top/?t=week" },
    { "url": "https://www.reddit.com/r/gadgets/top/?t=week" },
    { "url": "https://www.reddit.com/r/Futurology/top/?t=week" }
  ],
  "maxPostsCount": 100,
  "crawlCommentsPerPost": true,
  "maxCommentsPerPost": 50,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

**Use case:** Identify trending topics across related technology subreddits.

#### Scrape subreddit (community) info

Set the post and comment limits to `0` to collect only the community metadata (name, description, subscriber count, active users):

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/AskScience/" }],
  "maxPostsCount": 0,
  "maxCommentsCount": 0,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### How to scrape Reddit comments {#scrape-reddit-comments}

#### Scrape all comments on a post

Point `startUrls` at a post and enable `crawlCommentsPerPost`. The scraper collects the **full comment thread including nested replies** — not just the first page — up to `maxCommentsPerPost`:

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/AskReddit/comments/example_post_id/example_post_title/"
    }
  ],
  "crawlCommentsPerPost": true,
  "maxCommentsPerPost": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Search comments across Reddit by keyword

```json
{
  "searchTerms": ["climate change"],
  "searchPosts": false,
  "searchComments": true,
  "searchCommunities": false,
  "searchSort": "top",
  "searchTime": "month",
  "maxCommentsCount": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Build comment datasets for sentiment analysis

Extract large comment datasets for NLP and sentiment analysis models:

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/CryptoCurrency/" }],
  "maxPostsCount": 50,
  "crawlCommentsPerPost": true,
  "maxCommentsPerPost": 500,
  "maxCommentsCount": 10000,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### How to scrape Reddit user profiles

Point `startUrls` at a user profile to collect their profile data, posts, and comments:

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/user/example_username" }],
  "maxPostsCount": 20,
  "maxCommentsCount": 50,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### How to monitor brand mentions on Reddit

#### Track your brand across all of Reddit

```json
{
  "searchTerms": ["YourBrand", "YourProduct", "@YourCompany"],
  "searchPosts": true,
  "searchComments": true,
  "searchSort": "new",
  "searchTime": "day",
  "maxPostsCount": 200,
  "maxCommentsCount": 1000,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

Schedule this run daily in the Apify Console (Schedules tab) for continuous monitoring.

#### Track competitors within an industry community

```json
{
  "searchTerms": ["Competitor1", "Competitor2", "Competitor3"],
  "withinCommunity": "r/Entrepreneur",
  "searchPosts": true,
  "searchComments": true,
  "searchSort": "top",
  "searchTime": "month",
  "maxPostsCount": 500,
  "maxCommentsCount": 2000,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Monitor product launches in a niche subreddit

```json
{
  "searchTerms": ["product launch", "new feature", "update"],
  "withinCommunity": "r/SaaS",
  "searchPosts": true,
  "searchComments": true,
  "searchSort": "new",
  "searchTime": "week",
  "maxPostsCount": 100,
  "maxCommentsCount": 500,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### Limiting results

Control the scope of your scraping by setting limits on various parameters:

```json
{
  "maxPostsCount": 10,
  "maxCommentsPerPost": 5,
  "maxCommunitiesCount": 2,
  "maxCommentsCount": 100
}
```

`maxPostsCount`, `maxCommentsCount`, `maxCommentsPerPost`, and `maxCommunitiesCount` must be integers `>= 0`.

When `crawlCommentsPerPost` is enabled, comment extraction is only executed for posts that are inside the capped post budget.

> **💡 Testing Tip**: Use small values for the limits to keep test runs short while validating your configuration.

***

### Output example {#output-example}

You can download the dataset extracted by Reddit Scraper in various formats: **JSON, CSV, Excel, XML, or HTML**.

Here's an example of the JSON output for a Reddit post:

```json
{
  "dataType": "post",
  "id": "t3_1abc123",
  "parsedId": "1abc123",
  "title": "What's the best programming language to learn in 2025?",
  "body": "I'm looking to switch careers into tech and wondering which language...",
  "bodyHtml": "<p>I'm looking to switch careers into tech...</p>",
  "authorId": "t2_xyz789",
  "parsedAuthorId": "xyz789",
  "authorName": "curious_developer",
  "communityName": "r/learnprogramming",
  "communityId": "t5_2qh55",
  "parsedCommunityId": "2qh55",
  "parsedCommunityName": "learnprogramming",
  "subredditName": "learnprogramming",
  "subredditId": "t5_2qh55",
  "parsedSubredditId": "2qh55",
  "postType": "text",
  "flair": "Career",
  "upVotes": 1542,
  "commentsCount": 387,
  "postUrl": "https://www.reddit.com/r/learnprogramming/comments/1abc123/",
  "url": "https://www.reddit.com/r/learnprogramming/comments/1abc123/",
  "contentUrl": null,
  "images": [],
  "nsfw": false,
  "score": 1542,
  "upvoteRatio": 0.97,
  "subredditSubscribers": 4250000,
  "over18": false,
  "isSelf": true,
  "spoiler": false,
  "locked": false,
  "stickied": false,
  "edited": false,
  "editedAt": null,
  "distinguished": null,
  "scoreHidden": false,
  "isOriginalContent": false,
  "numCrossposts": 0,
  "totalAwardsReceived": 2,
  "gilded": 0,
  "domain": "self.learnprogramming",
  "thumbnail": null,
  "urlOverriddenByDest": null,
  "authorFlairText": null,
  "authorPremium": false,
  "numDuplicates": 0,
  "mediaType": "text",
  "hasMedia": false,
  "isVideo": false,
  "isGallery": false,
  "galleryCount": 0,
  "galleryImages": [],
  "mediaAssets": [],
  "videoUrl": null,
  "ageHours": 380.15,
  "scorePerHour": 4.06,
  "commentsPerHour": 1.02,
  "engagementTotal": 1929,
  "commentToScoreRatio": 0.25,
  "isHighEngagement": true,
  "titleLength": 48,
  "bodyLength": 142,
  "wordCount": 27,
  "outboundUrlHost": null,
  "createdAt": "2025-01-15T14:32:00.000Z",
  "crawledAt": "2025-01-31T03:41:00.000Z",
  "searchTerm": "programming languages"
}
```

> Posts also include the raw Reddit media objects (`media`, `secureMedia`, `mediaMetadata`, `galleryData`) for advanced use. Image-gallery posts populate `galleryImages` (full-resolution URLs) and `mediaAssets` (`{mediaId, url, mimeType, width, height}`); reddit-hosted videos populate `videoUrl`.

<details>
<summary><strong>Example comment output</strong></summary>

```json
{
  "dataType": "comment",
  "id": "t1_comment123",
  "parsedId": "comment123",
  "body": "Python is great for beginners. It has clean syntax and tons of resources...",
  "bodyHtml": "<p>Python is great for beginners...</p>",
  "authorId": "t2_author456",
  "parsedAuthorId": "author456",
  "authorName": "senior_dev",
  "communityName": "r/learnprogramming",
  "parsedCommunityName": "learnprogramming",
  "subredditName": "learnprogramming",
  "postId": "t3_1abc123",
  "parsedPostId": "1abc123",
  "postTitle": "What's the best programming language to learn in 2025?",
  "postUrl": "https://www.reddit.com/r/learnprogramming/comments/1abc123/",
  "parentId": "t3_1abc123",
  "parsedParentId": "1abc123",
  "commentUpVotes": 234,
  "postUpVotes": 1542,
  "postCommentsCount": 387,
  "url": "https://www.reddit.com/r/learnprogramming/comments/1abc123/comment/comment123/",
  "score": 234,
  "authorFullname": "t2_author456",
  "parentKind": "post",
  "depth": 0,
  "controversiality": 0,
  "distinguished": null,
  "stickied": false,
  "scoreHidden": false,
  "isSubmitter": false,
  "collapsed": false,
  "collapsedReason": null,
  "edited": false,
  "editedAt": null,
  "gilded": 0,
  "totalAwardsReceived": 1,
  "authorPremium": false,
  "authorFlairText": null,
  "ageHours": 379.5,
  "scorePerHour": 0.62,
  "bodyLength": 142,
  "wordCount": 24,
  "commentCreatedAt": "2025-01-15T15:10:00.000Z",
  "postCreatedAt": "2025-01-15T14:32:00.000Z",
  "crawledAt": "2025-01-31T03:41:00.000Z",
  "searchTerm": "programming languages"
}
```

</details>

<details>
<summary><strong>Example community output</strong></summary>

```json
{
  "dataType": "community",
  "id": "t5_2qh55",
  "parsedId": "2qh55",
  "name": "learnprogramming",
  "communityName": "r/learnprogramming",
  "description": "A subreddit for all questions related to programming in any language.",
  "publicDescription": "Pair programming, code reviews, and learning resources.",
  "membersCount": 4250000,
  "onlineUsersCount": 12500,
  "communityIcon": "https://styles.redditmedia.com/...",
  "bannerImage": "https://styles.redditmedia.com/...",
  "url": "https://www.reddit.com/r/learnprogramming/",
  "nsfw": false,
  "createdAt": "2010-01-25T00:00:00.000Z",
  "crawledAt": "2025-01-31T03:41:00.000Z",
  "searchTerm": "programming communities"
}
```

</details>

***

### How much does it cost to scrape Reddit? {#pricing}

#### Pay-per-result model

With **Reddit Scraper**, you pay only for what you run and store — **no monthly subscription** and **no platform usage fees**.

- **Actor start:** $0.02 per run
- **Result stored:** $0.002 each

##### Example cost calculation

A run that stores **1,000 items** costs:

- 1 actor start: **$0.02**
- 1,000 items × $0.002: **$2.00**
- **Total: $2.02** — typically ~40% cheaper than comparable Reddit scrapers on Apify

#### Pricing comparison

| Feature             | Reddit Scraper<br/>(pay-per-result)           | Reddit Scraper Pro<br/>(subscription) |
| ------------------- | --------------------------------------------- | ------------------------------------- |
| **Billing model**   | $0.02/run + $0.002/item                       | $20/month + usage, unlimited items    |
| **Ideal for**       | Occasional or exploratory jobs, tight budgets | Continuous, large-scale scraping      |
| **Cost control**    | Pay exactly for usage                         | Fixed monthly fee                     |
| **Same technology** | ✅                                            | ✅                                    |

#### Why pay-per-result?

Pay-per-result is ideal when you:

- Scrape Reddit occasionally
- Need quick snapshots of data
- Want to avoid idle expenses

**Example**: Two runs that save 500 items each cost just **$0.02 × 2 + 1,000 × $0.002 = $2.04**

> **💼 Need unlimited results with a predictable monthly fee?** Check out [**Reddit Scraper Pro**](https://apify.com/harshmaur/reddit-scraper-pro) — same engine, flat subscription.

***

### Use Reddit Scraper with AI agents and MCP

Reddit Scraper works as a tool for AI agents out of the box via the [Apify MCP server](https://mcp.apify.com/). Connect it to **Claude, ChatGPT, Cursor, or any MCP-compatible client** and your agent can search Reddit, pull comment threads, and analyze communities on demand — no glue code required.

**Typical agent workflows:**

- 🤖 "Find what Reddit thinks about \[product]" — agent searches keywords and summarizes the results
- 📊 Feed scraped posts and comments into an LLM for sentiment and trend analysis
- 🔁 Combine with scheduled runs and webhooks for autonomous brand monitoring

You can also call the actor from LangChain, LlamaIndex, or any framework that supports Apify integrations, and the structured JSON output (70+ fields per post) is ready for RAG pipelines and ML training datasets.

***

### Integrate Reddit Scraper with n8n, Zapier, and Make

Automate your Reddit data pipelines by integrating **Reddit Scraper** with [n8n](https://n8n.io/), Zapier, or Make. Connect scraped data with hundreds of other applications and services.

#### Method 1: Synchronous run *(recommended for quick scrapes)*

> **Best for:** Quick scrapes that complete within 5 minutes

##### Setup steps

1. **Get your Apify API Token**
   - Find your token at [Apify Integrations](https://console.apify.com/account/integrations)

2. **Configure n8n HTTP Request Node**
   - **Method**: `POST`
   - **URL**: `https://api.apify.com/v2/acts/harshmaur~reddit-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN`
   - **Body Content Type**: `JSON`
   - **Body**:

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/developers/"
    }
  ],
  "maxPostsCount": 10,
  "maxCommentsCount": 10,
  "maxCommentsPerPost": 10,
  "maxCommunitiesCount": 2,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### Method 2: Asynchronous run *(for long scrapes)*

> **Best for:** Large-scale scraping (entire communities, extensive data collection)

For scraping large amounts of data that may exceed the 300-second timeout, use the asynchronous method. This involves starting the run and fetching results separately.

**📺 Video Tutorial**: [How to connect to any API (that uses polling)](https://www.youtube.com/watch?v=gZ_RLC25gCw)

> ⚠️ **Important Note on Timeouts**
>
> The synchronous API has a **300-second (5-minute) timeout**. If your scraping task takes longer, the request will fail.
>
> **Solutions**:
>
> - **Increase Timeout in n8n**: In your HTTP Request node settings, increase the timeout (e.g., 600 seconds for 10 minutes)
> - **Use Polling for Async Runs**: Use a **Wait** node in n8n to poll for run completion status before fetching results — the most reliable method for long-running jobs

***

### Support

We strive to make Reddit Scraper the most comprehensive tool for your Reddit data extraction needs.

#### Get help

**📝 Report an Issue**

- Report issues directly in the Run console
- Helps us track and address problems efficiently

**📧 Email Support**

- For detailed inquiries or feature requests
- Contact: **harshmaur@gmail.com**

#### Our commitment

✅ **Prompt responses** to all issues and requests
✅ **Quick problem-solving** and feature implementation
✅ **Continuous improvement** based on your feedback
✅ **Rapid feature deployment** to keep the tool up-to-date

> ⭐ **Happy with the data?** A quick review on the [actor page](https://apify.com/harshmaur/reddit-scraper) helps other users find this scraper and keeps improvements coming.

***

### FAQ {#faq}

#### Is Reddit scraping legal?

While scraping publicly available data from Reddit is generally allowed, it's important to comply with Reddit's terms of service and respect the site's usage policies.

**Best practices:**

- Use the scraper responsibly
- Avoid excessive requests
- Ensure scraped data is used in compliance with applicable laws and regulations
- Respect robots.txt and rate limits
- Only scrape publicly available content

📖 Read more about compliance with ToS in our [blog post](https://blog.apify.com/enforceability-of-terms-of-use/).

#### Do I need Reddit API keys or authentication?

No! One of the biggest advantages of Reddit Scraper is that you don't need any Reddit API keys, OAuth tokens, or authentication. The scraper accesses publicly available Reddit data directly, bypassing API rate limits entirely.

This means:

- ✅ No Reddit account required
- ✅ No API application process
- ✅ No rate limit restrictions (600 requests per 10 minutes)
- ✅ Unlimited data extraction

#### Do I need cookies to scrape Reddit?

No, it is not required. Reddit maintains its data publicly accessible and does not enforce users to login for viewing public posts, comments, and communities.

#### Do you need proxies for scraping Reddit?

Yes. **Proxies are required** for Reddit scraping to ensure reliable and uninterrupted data extraction. We recommend using **Apify's residential proxies** for best results.

**Why proxies are necessary:**

- Prevent IP blocking from Reddit
- Distribute requests across multiple IPs
- Maintain scraping reliability
- Enable large-scale data extraction

Apify's residential proxy groups are automatically configured in the examples provided.

#### How do I scrape an entire subreddit?

Add the subreddit to the **Full Subreddit Scrape** input (`subredditUrls`) — by name (`AskReddit`), as `r/AskReddit`, or a full link. This pulls far more posts than placing a subreddit URL in Direct URLs (which returns only the most recent page). Raise `maxPostsCount` to go deeper, and enable `crawlCommentsPerPost` to collect comments too. Larger pulls make more requests, so they take longer and cost more.

#### How do I scrape Reddit comments?

Two ways: enable `crawlCommentsPerPost` to collect the full comment thread (including nested replies) of every post the run finds, or enable `searchComments` with `searchTerms` to search comments across Reddit by keyword. Use `maxCommentsPerPost` and `maxCommentsCount` to control volume.

#### How many comments can I get per post?

As many as you set with `maxCommentsPerPost`. When `crawlCommentsPerPost` is enabled, the scraper collects the full comment thread up to that limit — not just the first page — including nested replies.

#### What's the difference between Fast Mode and regular mode?

**Fast Mode** is an optimized scraping method that uses direct API endpoints and skips unnecessary navigation steps, resulting in significantly faster data extraction.

**Performance comparison:**

- Regular mode: ~100-200 posts per minute
- Fast Mode: ~500-1000 posts per minute (up to 70% faster)

**When to use Fast Mode:**

- Scraping Reddit `/search/` URLs with large post result sets
- Time-sensitive data collection
- High-volume operations
- Multiple community scraping

#### How does the withinCommunity parameter work?

The `withinCommunity` parameter allows you to search for keywords within a specific subreddit, enabling targeted data extraction.

**Format:** `r/subredditname` (e.g., `r/technology`, `r/gaming`)

**Example use cases:**

- Monitor brand mentions in specific communities
- Analyze sentiment within niche subreddits
- Research topics in targeted industries
- Track competitor discussions in relevant communities

#### What data can I extract from Reddit?

Reddit Scraper can extract comprehensive data including:

**Post data:** title, content, URL, author, upvotes, score, comment count, timestamp, subreddit, awards, flair, images, videos, and media links

**Comment data:** text, author, score, timestamp, permalink, parent relationships, depth level, and awards

**User data:** username, profile information, post and comment history, karma scores, account age

**Community data:** subreddit name, description, subscriber count, active users, community rules

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

Reddit Scraper uses a **pay-per-result pricing model**:

- **Actor start:** $0.02 per run
- **Result stored:** $0.002 per item

**Example costs:**

- 1,000 items: $2.02
- 10,000 items: $20.02
- 100,000 items: $200.02

No monthly subscription fees or platform charges. You only pay for what you use!

For unlimited scraping with predictable costs, check out [Reddit Scraper Pro](https://apify.com/harshmaur/reddit-scraper-pro) with flat monthly pricing.

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

Yes! Reddit Scraper supports multiple export formats:

- ✅ **JSON** - For API integration and data processing
- ✅ **CSV** - For Excel and spreadsheet analysis
- ✅ **Excel (XLSX)** - Direct Excel format
- ✅ **XML** - For structured data exchange
- ✅ **HTML** - For web viewing

You can download your data in any format directly from the Apify platform after your scraping run completes.

#### Can AI agents use Reddit Scraper?

Yes. Reddit Scraper is available to AI agents through the [Apify MCP server](https://mcp.apify.com/), so MCP-compatible clients like Claude, ChatGPT, and Cursor can run it as a tool. It also works with LangChain, LlamaIndex, and other frameworks via Apify integrations. See [Use Reddit Scraper with AI agents and MCP](#use-reddit-scraper-with-ai-agents-and-mcp).

#### How do I integrate Reddit Scraper with other tools?

Reddit Scraper offers multiple integration options:

**1. n8n Integration** - Automate workflows with 300+ app connections

**2. Apify API** - RESTful API for custom integrations

**3. Webhooks** - Real-time notifications when scraping completes

**4. Zapier** - Connect with 5,000+ apps (via Apify integration)

**5. Make (Integromat)** - Visual automation workflows

**6. MCP** - Expose the scraper as a tool to AI agents

See the [n8n integration](#integrate-reddit-scraper-with-n8n-zapier-and-make) section for detailed setup instructions.

#### What are the rate limits or scraping limits?

Reddit Scraper has **no built-in rate limits**. You can scrape as much data as you need, limited only by:

- Your Apify account plan limits
- The `maxPostsCount`, `maxCommentsCount`, `maxCommentsPerPost`, and `maxCommunitiesCount` parameters you set
- Available proxy resources

Unlike the Reddit API (limited to 600 requests per 10 minutes), Reddit Scraper can extract millions of posts and comments without restrictions.

#### How long does it take to scrape Reddit data?

Scraping time depends on several factors:

**Regular mode:**

- 100 posts: ~1-2 minutes
- 1,000 posts: ~10-15 minutes
- 10,000 posts: ~1-2 hours

**Fast Mode (for Reddit search page URLs):**

- 100 posts: ~30 seconds
- 1,000 posts: ~3-5 minutes
- 10,000 posts: ~30-45 minutes

Enable `fastMode: true` for up to 70% faster scraping of Reddit search page URLs.

#### Can I schedule automatic Reddit scraping?

Yes! Apify supports scheduled runs for automated data collection:

- Set up daily, weekly, or custom schedules
- Monitor brand mentions automatically
- Track trending topics in real-time
- Build time-series datasets

Configure schedules directly in the Apify Console under the "Schedule" tab of your actor.

***

### Other Actors

Check out these related Apify Actors:

| Actor                                                                          | Description                                            |
| ------------------------------------------------------------------------------ | ------------------------------------------------------ |
| [Reddit Scraper Pro](https://apify.com/harshmaur/reddit-scraper-pro)           | Unlimited scraping with flat monthly pricing            |
| [Reddit Comments Scraper](https://apify.com/harshmaur/reddit-comments-scraper) | Every comment and nested reply from any post URL        |
| [Reddit Search Scraper](https://apify.com/harshmaur/reddit-search-scraper)     | Keyword search across posts, comments, and communities  |
| [Reddit User Scraper](https://apify.com/harshmaur/reddit-user-scraper)         | User profiles with full post and comment history        |
| [Subreddit Scraper](https://apify.com/harshmaur/reddit-subreddit-scraper)      | Entire subreddits, past the ~1,000-post listing cap     |

***

### Resources

- 📖 [Apify Platform Documentation](https://docs.apify.com/)
- 📝 [Web Scraping Best Practices](https://blog.apify.com/web-scraping-best-practices/)
- ⚖️ [Legality of Web Scraping](https://blog.apify.com/is-web-scraping-legal/)

***

<p align="center">
  <a href="https://apify.com/harshmaur/reddit-scraper">
    <img src="https://img.shields.io/badge/🚀_Try_Reddit_Scraper-00C7B7?style=for-the-badge" alt="Try Reddit Scraper">
  </a>
</p>

<p align="center">
  <sub>Built by <a href="https://github.com/harshmaur">Harsh Maur</a> • Questions? <a href="mailto:harshmaur@gmail.com">Contact support</a></sub>
</p>

# Actor input Schema

## `searchTerms` (type: `array`):

Enter one or more keywords to search Reddit (e.g. "best laptops 2025", "AI news"). Each keyword runs as a separate search. Leave empty if you only want to scrape Direct URLs below.

## `searchPosts` (type: `boolean`):

Include posts in keyword search results.

## `searchComments` (type: `boolean`):

Include comments in keyword search results.

## `searchCommunities` (type: `boolean`):

Include communities (subreddits) in keyword search results.

## `withinCommunity` (type: `string`):

Restrict keyword search to a single subreddit. Enter in format: r/developers. Leave empty to search all of Reddit. Only applies to Search Keywords.

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

Controls how keyword search results are ranked. Only applies to Search Keywords, not Direct URLs.

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

Limit keyword search results to posts from a specific time window. Only applies to Search Keywords.

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

Add one or more Reddit URLs to scrape directly. Supports post URLs, subreddit URLs, user profile URLs, and search page URLs. The Search Keywords options above (sort, time, community filter) do NOT apply to these URLs.

## `fastMode` (type: `boolean`):

Speeds up scraping of search page URLs at the cost of some accuracy — some posts may be missed. Disable if you need exact results matching what you see on Reddit. Search Keywords always use fast mode automatically.

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

Subreddits to scrape in full. Enter subreddit names or links — e.g. `AskReddit`, `r/AskReddit`, or `https://www.reddit.com/r/AskReddit/`. This collects far more posts per subreddit than a standard scrape. It uses more requests, so runs take longer and cost more. Comments are also collected when 'Scrape comments for each post' is enabled — increase Max posts to allow more results per subreddit.

## `crawlCommentsPerPost` (type: `boolean`):

When enabled, comments will be collected for every post found from both Search Keywords and Direct URLs. This significantly increases run time and data output.

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

Include posts marked as Not Safe For Work in results. Applies to both Search Keywords and Direct URLs.

## `maxPostsCount` (type: `integer`):

Maximum number of posts to save across all search results, subreddit pages, and user profiles. To pull an entire subreddit, use the Full Subreddit Scrape input and raise this limit. Max: 50000.

## `maxCommentsCount` (type: `integer`):

Maximum comments returned from keyword search (when 'Search for comments' is enabled). Does not affect per-post comment scraping.

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

Maximum comments to scrape per individual post (when 'Scrape comments for each post' is enabled).

## `maxCommunitiesCount` (type: `integer`):

Maximum communities returned from keyword search (when 'Search for communities' is enabled).

## `proxy` (type: `object`):

Either use Apify proxy, or provide your own proxy servers.

## Actor input object example

```json
{
  "searchTerms": [],
  "searchPosts": true,
  "searchComments": false,
  "searchCommunities": false,
  "withinCommunity": "",
  "searchSort": "new",
  "searchTime": "all",
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/generativeAI/comments/1l64st7/have_we_reached_a_point_where_aigenerated_video/"
    }
  ],
  "fastMode": true,
  "subredditUrls": [],
  "crawlCommentsPerPost": false,
  "includeNSFW": false,
  "maxPostsCount": 10,
  "maxCommentsCount": 10,
  "maxCommentsPerPost": 10,
  "maxCommunitiesCount": 2,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped Reddit data including posts, comments, communities, and user profiles. Use 'dataType' field to filter by type.

# 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 = {
    "searchSort": "new",
    "searchTime": "all",
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/generativeAI/comments/1l64st7/have_we_reached_a_point_where_aigenerated_video/"
        }
    ],
    "maxPostsCount": 10,
    "maxCommentsCount": 10,
    "maxCommentsPerPost": 10,
    "maxCommunitiesCount": 2,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("harshmaur/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 = {
    "searchSort": "new",
    "searchTime": "all",
    "startUrls": [{ "url": "https://www.reddit.com/r/generativeAI/comments/1l64st7/have_we_reached_a_point_where_aigenerated_video/" }],
    "maxPostsCount": 10,
    "maxCommentsCount": 10,
    "maxCommentsPerPost": 10,
    "maxCommunitiesCount": 2,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("harshmaur/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 '{
  "searchSort": "new",
  "searchTime": "all",
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/generativeAI/comments/1l64st7/have_we_reached_a_point_where_aigenerated_video/"
    }
  ],
  "maxPostsCount": 10,
  "maxCommentsCount": 10,
  "maxCommentsPerPost": 10,
  "maxCommunitiesCount": 2,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call harshmaur/reddit-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Scraper - Posts, Comments, Search & Subreddits ($2/1k)",
        "description": "Scrape Reddit posts, comments, subreddits, user profiles, and keyword search results - no API key, no rate limits, no login. From $2 per 1,000 results, pay only for what you use. Full comment threads, 60+ fields per post, media and galleries. Works with AI Agents, MCP, n8n, Make, Zapier and more.",
        "version": "0.0",
        "x-build-id": "YJdcCBEnDnY4uglu4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/harshmaur~reddit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-harshmaur-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/harshmaur~reddit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-harshmaur-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/harshmaur~reddit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-harshmaur-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": {
                    "searchTerms": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Enter one or more keywords to search Reddit (e.g. \"best laptops 2025\", \"AI news\"). Each keyword runs as a separate search. Leave empty if you only want to scrape Direct URLs below.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchPosts": {
                        "title": "Search for posts",
                        "type": "boolean",
                        "description": "Include posts in keyword search results.",
                        "default": true
                    },
                    "searchComments": {
                        "title": "Search for comments",
                        "type": "boolean",
                        "description": "Include comments in keyword search results.",
                        "default": false
                    },
                    "searchCommunities": {
                        "title": "Search for communities",
                        "type": "boolean",
                        "description": "Include communities (subreddits) in keyword search results.",
                        "default": false
                    },
                    "withinCommunity": {
                        "title": "Limit search to a community",
                        "type": "string",
                        "description": "Restrict keyword search to a single subreddit. Enter in format: r/developers. Leave empty to search all of Reddit. Only applies to Search Keywords.",
                        "default": ""
                    },
                    "searchSort": {
                        "title": "Sort search results by",
                        "enum": [
                            "",
                            "relevance",
                            "hot",
                            "top",
                            "new",
                            "comments"
                        ],
                        "type": "string",
                        "description": "Controls how keyword search results are ranked. Only applies to Search Keywords, not Direct URLs.",
                        "default": "new"
                    },
                    "searchTime": {
                        "title": "Time range",
                        "enum": [
                            "all",
                            "hour",
                            "day",
                            "week",
                            "month",
                            "year"
                        ],
                        "type": "string",
                        "description": "Limit keyword search results to posts from a specific time window. Only applies to Search Keywords.",
                        "default": "all"
                    },
                    "startUrls": {
                        "title": "Reddit URLs",
                        "type": "array",
                        "description": "Add one or more Reddit URLs to scrape directly. Supports post URLs, subreddit URLs, user profile URLs, and search page URLs. The Search Keywords options above (sort, time, community filter) do NOT apply to these URLs.",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "fastMode": {
                        "title": "Fast mode for search page URLs",
                        "type": "boolean",
                        "description": "Speeds up scraping of search page URLs at the cost of some accuracy — some posts may be missed. Disable if you need exact results matching what you see on Reddit. Search Keywords always use fast mode automatically.",
                        "default": true
                    },
                    "subredditUrls": {
                        "title": "Subreddits",
                        "type": "array",
                        "description": "Subreddits to scrape in full. Enter subreddit names or links — e.g. `AskReddit`, `r/AskReddit`, or `https://www.reddit.com/r/AskReddit/`. This collects far more posts per subreddit than a standard scrape. It uses more requests, so runs take longer and cost more. Comments are also collected when 'Scrape comments for each post' is enabled — increase Max posts to allow more results per subreddit.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "crawlCommentsPerPost": {
                        "title": "Scrape comments for each post",
                        "type": "boolean",
                        "description": "When enabled, comments will be collected for every post found from both Search Keywords and Direct URLs. This significantly increases run time and data output.",
                        "default": false
                    },
                    "includeNSFW": {
                        "title": "Include NSFW (18+) content",
                        "type": "boolean",
                        "description": "Include posts marked as Not Safe For Work in results. Applies to both Search Keywords and Direct URLs.",
                        "default": false
                    },
                    "maxPostsCount": {
                        "title": "Max posts",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum number of posts to save across all search results, subreddit pages, and user profiles. To pull an entire subreddit, use the Full Subreddit Scrape input and raise this limit. Max: 50000.",
                        "default": 10
                    },
                    "maxCommentsCount": {
                        "title": "Max search comments",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum comments returned from keyword search (when 'Search for comments' is enabled). Does not affect per-post comment scraping.",
                        "default": 10
                    },
                    "maxCommentsPerPost": {
                        "title": "Max comments per post",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum comments to scrape per individual post (when 'Scrape comments for each post' is enabled).",
                        "default": 10
                    },
                    "maxCommunitiesCount": {
                        "title": "Max communities",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum communities returned from keyword search (when 'Search for communities' is enabled).",
                        "default": 2
                    },
                    "proxy": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Either use Apify proxy, or provide your own proxy servers.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
