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

Scrape Reddit without an API key or login: subreddit posts (hot, new, top, rising), search results, user posts and full comment threads, with scores, comment counts, authors, flair and text. Survives Reddit's blocks automatically.

- **URL**: https://apify.com/he_work/reddit-scraper.md
- **Developed by:** [HE Work](https://apify.com/he_work) (community)
- **Categories:** Social media, Lead generation, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.28 / 1,000 posts

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

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

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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

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

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

# README

## Reddit Scraper — Posts, Comments, Search & Subreddits

> ✅ **Checked daily.** An automated test runs this Actor on the Apify cloud every day and checks that it still returns real data, so if the website changes and something breaks, it's caught the same day and fixed.

Scrape **Reddit without an API key, app registration or login**:

- **Subreddit posts:** hot, new, top (hour → all time), rising and controversial, with pagination as deep as Reddit goes.
- **Search:** posts matching any keyword across all of Reddit or inside one subreddit, sorted by relevance, new, top, hot or comment count.
- **User posts:** everything a user submitted.
- **Comments:** full threads with replies (depth and parent ID on every comment), sorted best, top, new, controversial or old.
- **Any Reddit URL:** paste subreddit, post, user or search links.

Each post includes the title, author, subreddit, created time, score, upvote ratio, comment count, awards, flair, text, link and domain. Each comment includes the author, created time, score, depth, parent, text and permalink.

### Built to keep working

Reddit now blocks most automated traffic ("You've been blocked by network security"), which is why many Reddit scrapers fail a large share of their runs. This actor reads the same server-rendered pages Reddit's own website loads, through residential IPs with real browser fingerprints, and switches to a fresh session automatically whenever Reddit blocks one. Residential proxy traffic is included in the price.

### Output

One row per post or comment; the `type` field says which.

**Post**

| Field | Example |
|---|---|
| `id`, `subreddit`, `title` | `t3_1xnrp17`, `technology`, `Texas just went blue…` |
| `author`, `author_id`, `created_at` | `u/…`, `t2_…`, `2026-11-04T15:52:01+00:00` |
| `score`, `upvote_ratio`, `num_comments`, `awards` | `53348`, `0.91`, `3006`, `2` |
| `flair`, `post_type`, `text` | `Politics`, `link`, self-post text |
| `link_url`, `domain` | `https://www.businessinsider.com/…`, `businessinsider.com` |
| `is_stickied`, `is_nsfw`, `is_spoiler`, `url`, `source` | |

**Comment**

| Field | Example |
|---|---|
| `id`, `post_id`, `parent_id`, `depth` | `t1_…`, `t3_…`, `t1_…` (or the post ID for top-level), `1` |
| `author`, `created_at`, `score`, `text`, `url`, `subreddit` | |

Search results include the title, author, subreddit, time, score and comment count; Reddit's search page does not show post text, so `text` is empty for search rows (turn on `includeComments` to get the discussion).

### Input

| Field | Default | Description |
|---|---|---|
| `startUrls` | – | Subreddit, post, user or search URLs |
| `subreddits` | – | Names like `python`, `r/AskReddit` |
| `sort`, `time` | `hot`, `day` | Subreddit sort and time window (top/controversial) |
| `searchQueries` | – | Keywords to search across Reddit |
| `searchSort`, `searchTime`, `searchSubreddit` | `relevance`, `all`, – | Search options |
| `users` | – | Usernames: their submitted posts |
| `includeComments` | `false` | Also collect comment threads |
| `maxCommentsPerPost` | `100` | Per-post comment limit |
| `commentSort` | `top` | `best`, `top`, `new`, `controversial`, `old` |
| `maxPostsPerSource` | `100` | Per subreddit / search / user |
| `postedAfter` | – | Skip posts older than this date |
| `skipStickied` | `true` | Leave out pinned posts |
| `maxResults` | `1000` | Hard cap on rows (and cost) |

#### Example: brand monitoring

```json
{
  "searchQueries": ["apify", "web scraping api"],
  "searchSort": "new",
  "searchTime": "week",
  "includeComments": true,
  "maxPostsPerSource": 50
}
```

A run report (posts and comments per source, block statistics) is saved to the key-value store record `OUTPUT`.

### Example output

One item from a real run (long texts shortened):

```json
{
  "type": "post",
  "id": "t3_1qi4w2v",
  "subreddit": "iphone17",
  "title": "iPhone 17 regret",
  "author": "tynzye",
  "author_id": "t2_25up8vqazh",
  "created_at": "2026-01-20T15:57:47+00:00",
  "score": 5,
  "upvote_ratio": null,
  "num_comments": 48,
  "awards": null,
  "post_type": "",
  "flair": "",
  "text": "",
  "link_url": "",
  "domain": "",
  "is_stickied": false,
  "is_nsfw": false,
  "is_spoiler": false,
  "language": "",
  "url": "https://www.reddit.com/r/iphone17/comments/1qi4w2v/iphone_17_regret/",
  "scraped_at": "2026-11-05T14:04:27+00:00",
  "source": "search 'iphone 17'"
}
```

### How it compares

| | This Actor | Typical alternative |
|---|---|---|
| Fields per result | 24 (see *Example output*) | Varies by actor |
| Freshness | Read live from the source when the run starts | Varies |
| Reliability | Tested daily by an automated run on the Apify cloud (see the top of this page) | — |
| Price | $1.50 per 1,000 posts | $1.15–$4.00 per 1,000 results (comparable Actors on the Apify Store, 6 Nov 2026) |

### Pricing

Pay per result, no monthly fee:

- **$1.50 per 1,000 posts**: One Reddit post delivered to your dataset.
- **$0.80 per 1,000 comments** (add-on): One Reddit comment delivered to your dataset.
- $0.002 per run (start).

Bronze plans pay 5% less, Silver 10% less, Gold and above 15% less.

**Examples:** 1,000 posts = $1.50; 1,000 posts plus 1,000 comments = $2.30; 10,000 = $15.00.

### FAQ

**How do I run it on a schedule?** Create a task with your input and add a schedule in Apify Console (e.g. daily at 6 am). Each run writes a fresh dataset.

**How do I get the data?** Download the dataset as JSON, CSV, Excel, XML or HTML from the run page, or read it with the Apify API / Python and JavaScript clients. Integrations (Google Sheets, Make, Zapier, n8n, webhooks) work out of the box.

**Do I need proxies or an account on the site?** No. Proxies are handled inside the Actor and included in the price; no login is needed.

**What if a run returns fewer results than expected?** Check the run's key-value store `OUTPUT` record (when present) for a per-request report, then open an issue on the Issues tab with the run link and we'll look into it.

**Is it legal?** The Actor only collects publicly available data. You are responsible for using it in line with the website's terms, copyright and data-protection rules (GDPR, CCPA) — don't collect personal data you have no legal basis for.

### Notes

- Only public content that Reddit shows to logged-out visitors is collected; private, quarantined and age-gated communities are not.
- Not affiliated with Reddit.

# Actor input Schema

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

Any mix of subreddit (with sort, e.g. /r/python/top/?t=week), post, user and search URLs.

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

Names like python or r/AskReddit.

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

For subreddits listed above.

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

Time window for Top and Controversial.

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

Search all of Reddit for posts (brand monitoring, topics, keywords).

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

Order of search results.

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

Time window for search.

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

Optional: limit searches to one subreddit.

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

Usernames: collect the posts they submitted.

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

Also collect the comments of every post (threaded: depth and parent ID).

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

Upper limit of comments collected for each post.

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

Which comments come first.

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

Upper limit of posts per subreddit, search or user.

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

Optional, YYYY-MM-DD: skip older posts (and stop paging 'new' feeds once past it).

## `skipStickied` (type: `boolean`):

Leave out moderator-pinned posts at the top of subreddits.

## `maxResults` (type: `integer`):

Hard cap on rows (posts + comments) and cost for the run.

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

Reddit blocks datacenter IPs; residential is included in the price.

## `debugProbe` (type: `boolean`):

Developer option.

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

Developer option.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/python/"
    }
  ],
  "sort": "hot",
  "time": "day",
  "searchQueries": [
    "iphone 17"
  ],
  "searchSort": "relevance",
  "searchTime": "all",
  "includeComments": false,
  "maxCommentsPerPost": 20,
  "commentSort": "top",
  "maxPostsPerSource": 20,
  "skipStickied": true,
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "debugProbe": false,
  "debugLog": true
}
```

# Actor output Schema

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

One row per post or comment (field 'type').

## `report` (type: `string`):

Per-source counts and block statistics.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/python/"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("he_work/reddit-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.reddit.com/r/python/" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("he_work/reddit-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/python/"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call he_work/reddit-scraper --silent --output-dataset

```

## MCP server setup

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