# Reddit Subreddit Posts Scraper (`chimerical_quicklime/reddit-subreddit-posts-scraper`) Actor

- **URL**: https://apify.com/chimerical\_quicklime/reddit-subreddit-posts-scraper.md
- **Developed by:** [Khrystyna Skotte](https://apify.com/chimerical_quicklime) (community)
- **Categories:** Social media, News, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.70 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 — subreddit posts & comments, no API key

Scrape any subreddit's **hot, new, top or rising** feed and get each post with its score, upvote
ratio, comment count, author, flair, post type, domain, text preview, link and timestamp. Turn on
`fetchComments` to add each post's comments with author, score, depth and text.

No Reddit API key, no login, no OAuth quota. It reads the same HTML fragments Reddit's own site
loads, from residential IPs, so the "blocked" wall that stops the `.json` endpoints does not apply.

### Input

| Field | Default | Notes |
|---|---|---|
| `subreddits` | `["python"]` | Names or URLs |
| `sort` | `hot` | `hot`, `new`, `top`, `rising` |
| `topTime` | `week` | For `top`: `hour`, `day`, `week`, `month`, `year`, `all` |
| `maxItems` | `10` | Posts per subreddit, 25 per page |
| `fetchComments` | `false` | One extra request per post |
| `maxCommentsPerPost` | `20` | |

### Output

```json
{ "type": "post", "id": "t3_1w928wf", "subreddit": "Python", "title": "Astral's endorsements for Python's first Packaging Council", "url": "https://www.reddit.com/r/Python/comments/1w928wf/astrals_endorsements_for_pythons_first_packaging/", "author": "poppy_92", "authorId": "t2_a3av6", "score": 89, "upvoteRatio": 0.9, "commentCount": 15, "awardCount": 0, "createdAt": "2026-09-06T17:24:04.807000+0000", "postType": "multi_media", "domain": "self.Python", "contentUrl": "https://www.reddit.com/r/Python/comments/1w928wf/…", "flair": "News", "isStickied": false, "isNsfw": false, "text": "Astral announced…", "thumbnailUrl": null }
{ "type": "comment", "id": "t1_p875vji", "postId": "t3_1w928wf", "subreddit": "Python", "author": "wildlyaquaticsenator", "score": 71, "depth": 0, "createdAt": "2026-09-06T17:31:12.318000+0000", "url": "https://www.reddit.com/r/Python/comments/1w928wf/comment/p875vji/", "text": "…" }
```

### Use cases

Community and sentiment monitoring, brand and product mentions, market research, trend detection,
content sourcing, and datasets for NLP.

### Notes

- Private, quarantined or misspelled subreddits return a warning, not a failure.
- Comment text is the rendered text of each comment; nested replies carry `depth` and `parentId`.

# Actor input Schema

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

Subreddit names or URLs, e.g. python, r/wallstreetbets, https://www.reddit.com/r/technology/.

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

Feed order.

## `topTime` (type: `string`):

Only for sort = top.

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

25 per page.

## `fetchComments` (type: `boolean`):

Open each post and include its comments (author, score, text, depth). One extra request per post.

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

When fetching comments.

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

Residential proxy is required; Reddit blocks datacenter ranges.

## Actor input object example

```json
{
  "subreddits": [
    "python"
  ],
  "sort": "hot",
  "topTime": "week",
  "maxItems": 10,
  "fetchComments": false,
  "maxCommentsPerPost": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset of posts and comments (JSON).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("chimerical_quicklime/reddit-subreddit-posts-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("chimerical_quicklime/reddit-subreddit-posts-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 '{}' |
apify call chimerical_quicklime/reddit-subreddit-posts-scraper --silent --output-dataset

```

## MCP server setup

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