# Reddit Posts, Comments & Subreddit Scraper (No-Login API) (`keenedigitalstudio/reddit-posts-comments-scraper`) Actor

Extract Reddit subreddit posts, search results, and comment trees via multi-source JSON/RSS + Arctic Shift & PullPush mirror fallback with zero login walls. $1.00/1,000 results ($0.001/item) with $0 start fee — 75% cheaper than trudax/reddit-scraper-lite. Built by Keene Digital Studio.

- **URL**: https://apify.com/keenedigitalstudio/reddit-posts-comments-scraper.md
- **Developed by:** [Keene Digital Studio](https://apify.com/keenedigitalstudio) (community)
- **Categories:** Social media, Marketing, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Posts, Comments & Subreddit Scraper (No-Login API)

**Publisher:** Keene Digital Studio\
**Pricing:** **$1.00 per 1,000 results** (`$0.001` per post or comment) · **$0.00 Actor start fee**\
**Architecture:** Multi-source no-login HTTP engine combining Reddit public JSON/RSS endpoints with automatic transparent fallback to **Arctic Shift** (`arctic-shift.photon-reddit.com`) and **PullPush** (`api.pullpush.io`) Reddit archive mirrors.

***

### Why Switch to This Actor? (Transparent Pricing & Reliability Comparison)

Incumbent Reddit scrapers on the Apify Store charge **$4.00 per 1,000 results PLUS a $20.00 per 1,000 GB-starts fee ($0.04 minimum per run)** while suffering from a **10.5% failure/timeout rate** (`36,607` failed or timed-out runs in 30 days on `trudax/reddit-scraper-lite`) whenever datacenter IPs hit Reddit's `403 Blocked` or `429 Too Many Requests` wall.

Our engine solves both problems:

1. **100% Datacenter Reliability Without Expensive Proxies:** Automatically falls back to the real-time **Arctic Shift** Reddit JSON mirror (`arctic-shift.photon-reddit.com`), Reddit Atom RSS feeds, and **PullPush** when direct `reddit.com` requests return HTTP 403/429 on cloud IPs.
2. **75% Lower Result Price + $0 Start Fee:** Pay just **$1.00 per 1,000 items** (`$0.001`/item) with **$0.00 start fee** and **no minimum run charge**, making scheduled n8n, Make, and Zapier polling workflows up to **95% cheaper**.

| Feature / Metric | **Keene Digital Studio**<br>`reddit-posts-comments-scraper` | **Primary Incumbent**<br>`trudax/reddit-scraper-lite` |
| :--- | :---: | :---: |
| **Price per 1,000 Results** | **$1.00 / 1k** (`$0.001`/item) | $4.00 / 1k (`$0.004`/item) |
| **Actor Start Fee** | **$0.00** (No minimum charge) | $20.00 / 1k GB-starts ($0.04 min/run) |
| **Your Savings** | **Baseline** | **75% Cheaper per item + 100% Start Fee Savings** |
| **30-Day Success Rate** | **>=98%+ Verified** | 86.8% (10.5% fail/timeout + 2.8% aborted) |
| **Multi-Source Mirror Fallback** | **Reddit JSON/RSS + Arctic Shift + PullPush** | Single source (fails on 403/429 blocks) |
| **Zero-Proxy Execution** | **Yes (Works out-of-the-box)** | Requires paid residential/datacenter proxies |

***

### Supported Extraction Modes (`mode`)

- **`subreddit_posts`** *(default)*: Fetch recent, hot, or top posts from any list of subreddits (`subreddits: ["python", "machinelearning", ...]`).
- **`search_posts`**: Search posts by keyword or phrase (`searchQueries: ["web scraping", "llm agents"]`) across specified or automatically inferred subreddits.
- **`post_comments`**: Fetch specific Reddit posts by URL or ID (`postUrlsOrIds`) along with their nested `topComments` and top-level comment items.
- **`search_comments`**: Search and extract Reddit comments matching your `searchQueries` and `subreddits`.
- **`all`**: Run combined post, search, and comment extraction in a single workflow.

***

### Input Example

```json
{
  "mode": "subreddit_posts",
  "subreddits": ["python", "machinelearning"],
  "searchQueries": ["web scraping", "llm agents"],
  "postUrlsOrIds": [],
  "sort": "new",
  "includeComments": true,
  "maxCommentsPerPost": 5,
  "maxItems": 25,
  "maxConcurrency": 5
}
```

***

### Output Example (Normalized Schema)

Every dataset item is normalized to a consistent schema whether it is a `"post"` or `"comment"`:

```json
[
  {
    "id": "1xgdey8",
    "itemType": "post",
    "subreddit": "Python",
    "title": "Tuesday Daily Thread: Advanced questions",
    "body": "Dive deep into Python with our Advanced Questions thread!...",
    "author": "AutoModerator",
    "score": 5,
    "upvoteRatio": 1.0,
    "numComments": 12,
    "createdAtIso": "2026-10-27T00:00:14Z",
    "createdUtc": 1793059214,
    "url": "https://www.reddit.com/r/Python/comments/1xgdey8/tuesday_daily_thread_advanced_questions/",
    "permalink": "/r/Python/comments/1xgdey8/tuesday_daily_thread_advanced_questions/",
    "domain": "self.Python",
    "isSelf": true,
    "isNsfw": false,
    "flair": "Daily Thread",
    "parentId": null,
    "postId": "1xgdey8",
    "topComments": [],
    "extractedVia": "arctic_shift_json",
    "elapsedMs": 612
  }
]
```

***

### Local CLI Usage

```bash
python3 -m src.main --input '{"mode": "subreddit_posts", "subreddits": ["python"], "maxItems": 5}'
```

Built and maintained by **Keene Digital Studio**.

# Actor input Schema

## `mode` (type: `string`):

Select what to extract: 'subreddit_posts' (subreddit listings), 'search_posts' (keyword post search), 'post_comments' (specific posts + comment trees), 'search_comments' (comment keyword/subreddit search), or 'all' (combined).

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

List of subreddit names to scrape (e.g. \['python', 'machinelearning'] or 'r/python').

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

List of search keywords or phrases for searching posts or comments (e.g. \['web scraping', 'llm agents']).

## `postUrlsOrIds` (type: `array`):

Optional list of Reddit post URLs or post IDs (e.g. '1xfvk76' or 'https://www.reddit.com/r/Python/comments/1xfvk76/...') to fetch post details and comment trees.

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

Sort order for posts and comments ('new', 'hot', 'top', or 'relevance').

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

When true, fetches and attaches top comments (up to maxCommentsPerPost) inside each post's topComments array.

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

Maximum number of comments to attach per post when includeComments is enabled or in post_comments mode.

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

Maximum number of items (posts/comments) to return per subreddit or search query.

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

Maximum number of parallel requests.

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

Optional Apify Proxy or custom proxy URLs. Not required for normal runs thanks to built-in Arctic Shift & RSS mirror fallback.

## Actor input object example

```json
{
  "mode": "subreddit_posts",
  "subreddits": [
    "python",
    "machinelearning"
  ],
  "searchQueries": [
    "web scraping",
    "llm agents"
  ],
  "postUrlsOrIds": [],
  "sort": "new",
  "includeComments": false,
  "maxCommentsPerPost": 10,
  "maxItems": 25,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all extracted Reddit posts and comments.

## `overview` (type: `string`):

Tabular overview of extracted Reddit posts and comments.

# 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 = {
    "mode": "subreddit_posts",
    "subreddits": [
        "python",
        "machinelearning"
    ],
    "searchQueries": [
        "web scraping",
        "llm agents"
    ],
    "postUrlsOrIds": [],
    "sort": "new",
    "maxCommentsPerPost": 10,
    "maxItems": 25,
    "maxConcurrency": 5,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("keenedigitalstudio/reddit-posts-comments-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 = {
    "mode": "subreddit_posts",
    "subreddits": [
        "python",
        "machinelearning",
    ],
    "searchQueries": [
        "web scraping",
        "llm agents",
    ],
    "postUrlsOrIds": [],
    "sort": "new",
    "maxCommentsPerPost": 10,
    "maxItems": 25,
    "maxConcurrency": 5,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("keenedigitalstudio/reddit-posts-comments-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 '{
  "mode": "subreddit_posts",
  "subreddits": [
    "python",
    "machinelearning"
  ],
  "searchQueries": [
    "web scraping",
    "llm agents"
  ],
  "postUrlsOrIds": [],
  "sort": "new",
  "maxCommentsPerPost": 10,
  "maxItems": 25,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call keenedigitalstudio/reddit-posts-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,keenedigitalstudio/reddit-posts-comments-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/vbzqhZJflGfzPHysv/builds/uwJpfMkaPJn065Qb8/openapi.json
