# Reddit Scraper - Posts, Comments, Subreddits & Users (`scrapesage/reddit-scraper`) Actor

Scrape Reddit posts, comments, subreddits and user profiles by keyword or URL. Full comment threads, 40+ fields, search, NSFW and monitoring mode. No login, no API key, no browser.

- **URL**: https://apify.com/scrapesage/reddit-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Social media, AI, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 results

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/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 — Posts, Comments, Subreddits & User Profiles (No Login)

Scrape **Reddit** at scale without an API key, without login, and without a browser. Pull **posts, full comment threads, subreddit feeds, keyword search results, communities and user profiles** into clean, structured JSON — by URL or by keyword — with **monitoring mode** so scheduled runs only return what's new.

Built for market research, **AI / LLM training data**, brand & reputation monitoring, sentiment analysis, social selling and trend discovery.

### Why this Reddit scraper?

- **No login, no API key, no rate-limit headaches.** Reddit's public API is gated and throttled; this actor reads the public site directly and rotates IPs automatically.
- **Reliable where others fail.** Reddit hard-blocks the old `.json` endpoints that most scrapers depend on. This actor uses the fully server-rendered site over residential proxies, so it keeps returning data when cheaper tools return errors.
- **Richest record in class** — 40+ fields per post and per comment: score, comment count, exact timestamps, flair, NSFW/spoiler/stickied flags, domain, author, permalinks, full comment depth and parent/child relationships.
- **Clean data, no junk** — `[deleted]` / `[removed]` / empty comments are filtered out by default, and **you are never charged for them**. Every record also carries a unified `text` column (post title, comment body, community description or user summary) so the default **Overview** view is fully populated at a glance — no half-empty rows.
- **Everything in one actor** — posts, comments, subreddits, search, communities and users. No need to chain five different scrapers.
- **Monitoring mode** — remember what you've already pulled and return only *new* posts/comments on the next run. Perfect with [Schedules](https://docs.apify.com/platform/schedules).
- **Pay per result, no start fee.** You only pay for the records you actually receive.

### Use cases

- **AI & LLM training data** — harvest high-signal discussions and Q&A threads from any subreddit.
- **Brand & product monitoring** — track every new mention of your brand, product or competitor across Reddit.
- **Market & customer research** — mine real opinions, pain points and buying questions in niche communities.
- **Sentiment & trend analysis** — feed posts and comments into your NLP pipeline.
- **Social selling / lead discovery** — find people actively asking for recommendations in your space.
- **Community & influencer analysis** — profile subreddits and prolific users by karma and activity.

### How to use

1. Tell the actor **what to scrape** — paste Reddit **Start URLs** (subreddit, post, user or search pages), and/or list **subreddits**, **search keywords** or **usernames**.
2. Set **Sort**, **Time range** and **Max items**.
3. (Optional) Turn on **Include comments** to pull comment threads for every post, and **Monitoring mode** for new-only runs.
4. Run it. Download the dataset as JSON, CSV, Excel, or push it anywhere via API and integrations.

### Input

| Field | Description |
|---|---|
| `startUrls` | Any Reddit URLs — subreddit, post/comments, user, search or `/subreddits/search`. Auto-detected and routed. |
| `subreddits` | Subreddit names (e.g. `RealEstate`, `r/AskReddit`) to pull posts from. |
| `searches` | Keyword queries — returns posts (default) or communities. |
| `usernames` | Reddit users — returns their profile (karma, cake day) plus recent posts and comments. |
| `searchScope` | What `searches` returns: `posts` or `communities`. |
| `sort` / `time` | Order (`hot`/`new`/`top`/`rising`/`controversial`/`relevance`) and time window for top. |
| `maxItems` | Global cap across all record types. |
| `includeComments` / `maxCommentsPerPost` / `commentSort` | Pull comment threads for posts; how many and in what order. |
| `expandMoreComments` | Follow "load more comments" links for deeper threads. |
| `includeDeletedComments` | Off by default — skip (and never charge for) `[deleted]`/`[removed]`/empty comments. Turn on to keep them with an `isDeleted` flag. |
| `onlyPostsNewerThan` | Keep only fresh items — ISO date or `"7 days"`, `"24 hours"`, etc. |
| `includeNSFW` / `skipAds` | Include 18+ content; skip promoted posts. |
| `monitorMode` / `monitorStoreName` | Return only records not seen in previous runs. |
| `proxyConfiguration` | Defaults to Apify **Residential** (strongly recommended for Reddit). |

#### Example input

```json
{
  "subreddits": ["RealEstate", "FirstTimeHomeBuyer"],
  "sort": "top",
  "time": "week",
  "maxItems": 500,
  "includeComments": true,
  "maxCommentsPerPost": 30,
  "commentSort": "top"
}
````

### Output

Every row carries a `type` (`post`, `comment`, `community` or `user`) and a unified **`text`** column holding its main content (post title, comment body, community description, or a user's karma summary). The dataset opens on a single **Overview** table where every row reads as full regardless of type — then switch to the focused **Posts / Comments / Communities / Users** views for type-specific columns.

```json
{
  "type": "post",
  "id": "1ucvvkb",
  "fullId": "t3_1ucvvkb",
  "subreddit": "RealEstate",
  "author": "throwaway_homebuyer",
  "score": 41,
  "createdAt": "2026-06-22T20:35:40.000Z",
  "text": "Attorney won't finish house escrow closing, asking for more money (NY)",
  "title": "Attorney won't finish house escrow closing, asking for more money (NY)",
  "subredditPrefixed": "r/RealEstate",
  "permalink": "https://www.reddit.com/r/RealEstate/comments/1ucvvkb/...",
  "url": "https://www.reddit.com/r/RealEstate/comments/1ucvvkb/...",
  "domain": "self.RealEstate",
  "isSelf": true,
  "linkFlair": "Financing",
  "numComments": 117,
  "createdUtc": 1750624540,
  "isNSFW": false,
  "isSpoiler": false,
  "isStickied": false,
  "selfText": "We're closing on a house in NY and our attorney...",
  "scrapedAt": "2026-06-23T00:00:00.000Z"
}
```

```json
{
  "type": "comment",
  "id": "ot74y68",
  "fullId": "t1_ot74y68",
  "subreddit": "RealEstate",
  "author": "real_estate_atty",
  "score": 28,
  "createdAt": "2026-06-22T20:55:40.000Z",
  "text": "It doesn't sound like the addendum was written in a way which...",
  "body": "It doesn't sound like the addendum was written in a way which...",
  "postId": "1ucvvkb",
  "postTitle": "Attorney won't finish house escrow closing, asking for more money (NY)",
  "parentFullId": "t3_1ucvvkb",
  "depth": 0,
  "isSubmitter": false,
  "isDeleted": false,
  "permalink": "https://www.reddit.com/r/RealEstate/comments/1ucvvkb/.../ot74y68/"
}
```

User records carry `postKarma`, `commentKarma`, `totalKarma` and `cakeDay`; community records carry `name`, `title`, `publicDescription` and `url`.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it hourly/daily with **monitoring mode** to capture only new posts and comments in a subreddit or for a keyword; perfect for brand monitoring and fresh AI data.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (Slack alert, database insert, AI summary) the moment a run finishes.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/reddit-scraper').call({
    searches: ['best CRM for small business'],
    searchScope: 'posts',
    sort: 'new',
    maxItems: 300,
    includeComments: true,
    maxCommentsPerPost: 25,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} Reddit records`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new mentions straight into Slack, Sheets or your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get pinged when a monitored subreddit or keyword gets new posts.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find the top posts about mortgage rates in r/RealEstate this week with their comments" and let it run this scraper for you.

### More scrapers from scrapesage

Build a complete **social, content & sentiment-data stack**:

- **[YouTube Scraper](https://apify.com/scrapesage/youtube-scraper)** — videos, channels, stats and comments.
- **[Threads Scraper](https://apify.com/scrapesage/threads-scraper)** — posts and profiles from Meta's Threads.
- **[Bluesky Scraper](https://apify.com/scrapesage/bluesky-scraper)** — posts and profiles from Bluesky.
- **[Telegram Scraper](https://apify.com/scrapesage/telegram-scraper)** — public channel messages and members.
- **[Twitch Scraper](https://apify.com/scrapesage/twitch-scraper)** — streams, channels and clips.
- **[Substack Scraper](https://apify.com/scrapesage/substack-scraper)** — newsletters, posts and authors.
- **[Google News Scraper](https://apify.com/scrapesage/google-news-scraper)** — news articles by topic and query.
- **[Website Contact Scraper](https://apify.com/scrapesage/website-contact-scraper)** — emails, phones and socials from any site.

### Tips

- **Use Residential proxy.** Reddit blocks datacenter IPs — the default Residential setting is what keeps this actor reliable.
- **Fresh-only feeds.** Combine `monitorMode` + a [Schedule](https://docs.apify.com/platform/schedules) + `onlyPostsNewerThan` to capture only new posts/comments each run, without re-paying for old data.
- **Comments cost extra requests.** Leave `includeComments` off for a fast posts-only pass; turn it on (with a sensible `maxCommentsPerPost`) when you need the discussion.
- **No junk by default.** `[deleted]`/`[removed]`/empty comments are skipped (and not billed), so `maxCommentsPerPost` fills up with real content. Flip `includeDeletedComments` on only if you need the thread's deleted placeholders for structure/analysis.
- **Cover a topic fully.** Add several `subreddits` and `searches` in one run — the global `maxItems` cap spreads across them.

### FAQ

**Do I need a Reddit account or API key?** No. This actor reads publicly available pages — no login, no app registration, no API key.

**Why residential proxy?** Reddit blocks datacenter IPs and its public `.json` API. The actor reads the rendered public site over residential IPs, which is the reliable path; it rotates IPs automatically on any block.

**Can I get full comment threads?** Yes. Use a post URL (or `includeComments` on a subreddit/search) with `maxCommentsPerPost`, and turn on `expandMoreComments` to follow "load more comments" for deep threads. Each comment includes its `depth` and `parentFullId` so you can rebuild the tree.

**How do I only get new posts over time?** Turn on `monitorMode` and run on a [Schedule](https://docs.apify.com/platform/schedules) — each run returns only records not seen before.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**A field is `null` — why?** Some values genuinely aren't published on a given page (e.g. a hidden comment score, or a community's subscriber count, which Reddit renders only client-side). Fields are `null` when the data isn't in the page, not because the scraper skipped them.

**Is scraping Reddit legal?** This actor collects publicly available data only. You are responsible for using the data in compliance with applicable laws (GDPR/CCPA for personal data) and Reddit's terms.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Paste any Reddit URLs — subreddit (https://www.reddit.com/r/RealEstate/), a specific post/comments page, a user profile (/user/spez/), a search results page, or a /subreddits/search page. Each URL is auto-detected and routed. One per row.

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

Subreddit names to scrape posts from — e.g. "RealEstate", "r/AskReddit". Uses the Sort + Time settings below. One per row.

## `searches` (type: `array`):

Keyword queries to search Reddit. Returns posts (default) or communities depending on "Search returns" below. One query per row — e.g. "best CRM", "moving to Austin".

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

Reddit usernames to scrape — e.g. "spez", "u/someuser". Returns the user's profile (karma, cake day) plus their recent posts and comments. One per row.

## `searchScope` (type: `string`):

What the "Search keywords" queries should return: posts, or communities (subreddits).

## `searchInSubreddit` (type: `string`):

Optional. Limit "Search keywords" to a single subreddit (e.g. "RealEstate"). Leave empty to search all of Reddit.

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

Order of results. Subreddits: hot/new/top/rising/controversial. Search: relevance/new/top/comments (hot/rising fall back to relevance).

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

Time window when sorting by Top or Controversial.

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

Cap on total records (posts + comments + communities + users) across the whole run. Listings paginate automatically until this cap is reached.

## `maxItemsPerSource` (type: `integer`):

Optional per-source cap (per subreddit / search / user). 0 = no per-source limit (only the global Max items applies).

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

For every post scraped from a subreddit/search/user, also open it and output its comment thread (type `comment`). Adds one request per post. A post/comments URL in Start URLs always returns its comments regardless of this toggle.

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

How many comments to output per post (top of the thread first). Set 0 to skip comments entirely on post URLs.

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

How to order comments within a thread.

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

Follow the "load more comments" links to pull deeper/collapsed replies (more requests, slower). Off = only the comments rendered on the main thread page.

## `includeDeletedComments` (type: `boolean`):

Off (default, recommended): skip comments whose content was deleted by the user or removed by a moderator — i.e. body "\[deleted]", "\[removed]" or empty. These have no usable text and you are never charged for them, so your comment count is filled only with real content. On: include them as `comment` records carrying an `isDeleted` flag.

## `onlyPostsNewerThan` (type: `string`):

Keep only posts/comments newer than this. Accepts an ISO date (2026-06-01) or a relative window like "7 days", "24 hours", "3 months". Great with monitoring mode for fresh-only pulls.

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

Include NSFW (over-18) posts. Turn off to exclude them.

## `skipAds` (type: `boolean`):

Skip promoted/advertised posts so you only get organic content.

## `includeUserProfile` (type: `boolean`):

For username sources, output a `user` record with post/comment karma and cake day in addition to their content.

## `includeUserContent` (type: `boolean`):

For username sources, output the user's recent posts and comments. Turn off to get only the profile record.

## `userSection` (type: `string`):

Which part of a user's history to scrape.

## `deduplicate` (type: `boolean`):

Skip a record already emitted in this run (by id) — useful when sources overlap.

## `monitorMode` (type: `boolean`):

Remember ids already returned and emit ONLY records not seen in previous runs. Pairs with Apify Schedules to track new posts/comments over time without re-paying for old data.

## `monitorStoreName` (type: `string`):

Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked job to keep their histories separate. Lowercase letters, digits and hyphens only.

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

Maximum parallel requests when fetching comment threads. Lower it if you see transient blocks; raise it for speed.

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

Proxy settings. Reddit blocks datacenter IPs, so this actor defaults to Apify Residential proxy (blocked requests retry automatically on a fresh IP). Residential is strongly recommended.

## Actor input object example

```json
{
  "startUrls": [],
  "subreddits": [
    "RealEstate"
  ],
  "searches": [],
  "usernames": [],
  "searchScope": "posts",
  "sort": "hot",
  "time": "all",
  "maxItems": 50,
  "maxItemsPerSource": 0,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "commentSort": "confidence",
  "expandMoreComments": false,
  "includeDeletedComments": false,
  "includeNSFW": true,
  "skipAds": true,
  "includeUserProfile": true,
  "includeUserContent": true,
  "userSection": "overview",
  "deduplicate": true,
  "monitorMode": false,
  "monitorStoreName": "reddit-scraper-monitor",
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped records in the default dataset — posts, comments, communities and user profiles with their full field set.

# 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": [],
    "subreddits": [
        "RealEstate"
    ],
    "searches": [],
    "usernames": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/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": [],
    "subreddits": ["RealEstate"],
    "searches": [],
    "usernames": [],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/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 '{
  "startUrls": [],
  "subreddits": [
    "RealEstate"
  ],
  "searches": [],
  "usernames": []
}' |
apify call scrapesage/reddit-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Scraper - Posts, Comments, Subreddits & Users",
        "description": "Scrape Reddit posts, comments, subreddits and user profiles by keyword or URL. Full comment threads, 40+ fields, search, NSFW and monitoring mode. No login, no API key, no browser.",
        "version": "0.1",
        "x-build-id": "HiuQjf6elN2jjXtzK"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~reddit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~reddit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-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/scrapesage~reddit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-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": {
                    "startUrls": {
                        "title": "Start URLs (any Reddit URL)",
                        "type": "array",
                        "description": "Paste any Reddit URLs — subreddit (https://www.reddit.com/r/RealEstate/), a specific post/comments page, a user profile (/user/spez/), a search results page, or a /subreddits/search page. Each URL is auto-detected and routed. One per row.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "subreddits": {
                        "title": "Subreddits",
                        "type": "array",
                        "description": "Subreddit names to scrape posts from — e.g. \"RealEstate\", \"r/AskReddit\". Uses the Sort + Time settings below. One per row.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searches": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "Keyword queries to search Reddit. Returns posts (default) or communities depending on \"Search returns\" below. One query per row — e.g. \"best CRM\", \"moving to Austin\".",
                        "items": {
                            "type": "string"
                        }
                    },
                    "usernames": {
                        "title": "Usernames",
                        "type": "array",
                        "description": "Reddit usernames to scrape — e.g. \"spez\", \"u/someuser\". Returns the user's profile (karma, cake day) plus their recent posts and comments. One per row.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchScope": {
                        "title": "Search returns",
                        "enum": [
                            "posts",
                            "communities"
                        ],
                        "type": "string",
                        "description": "What the \"Search keywords\" queries should return: posts, or communities (subreddits).",
                        "default": "posts"
                    },
                    "searchInSubreddit": {
                        "title": "Restrict search to subreddit",
                        "type": "string",
                        "description": "Optional. Limit \"Search keywords\" to a single subreddit (e.g. \"RealEstate\"). Leave empty to search all of Reddit."
                    },
                    "sort": {
                        "title": "Sort",
                        "enum": [
                            "hot",
                            "new",
                            "top",
                            "rising",
                            "controversial",
                            "relevance",
                            "comments"
                        ],
                        "type": "string",
                        "description": "Order of results. Subreddits: hot/new/top/rising/controversial. Search: relevance/new/top/comments (hot/rising fall back to relevance).",
                        "default": "hot"
                    },
                    "time": {
                        "title": "Time range (for Top / Controversial)",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "year",
                            "all"
                        ],
                        "type": "string",
                        "description": "Time window when sorting by Top or Controversial.",
                        "default": "all"
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 5000000,
                        "type": "integer",
                        "description": "Cap on total records (posts + comments + communities + users) across the whole run. Listings paginate automatically until this cap is reached.",
                        "default": 50
                    },
                    "maxItemsPerSource": {
                        "title": "Max items per source",
                        "minimum": 0,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Optional per-source cap (per subreddit / search / user). 0 = no per-source limit (only the global Max items applies).",
                        "default": 0
                    },
                    "includeComments": {
                        "title": "Include comments for posts",
                        "type": "boolean",
                        "description": "For every post scraped from a subreddit/search/user, also open it and output its comment thread (type `comment`). Adds one request per post. A post/comments URL in Start URLs always returns its comments regardless of this toggle.",
                        "default": false
                    },
                    "maxCommentsPerPost": {
                        "title": "Max comments per post",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "How many comments to output per post (top of the thread first). Set 0 to skip comments entirely on post URLs.",
                        "default": 50
                    },
                    "commentSort": {
                        "title": "Comment sort",
                        "enum": [
                            "confidence",
                            "top",
                            "new",
                            "controversial",
                            "old",
                            "qa"
                        ],
                        "type": "string",
                        "description": "How to order comments within a thread.",
                        "default": "confidence"
                    },
                    "expandMoreComments": {
                        "title": "Expand \"load more comments\"",
                        "type": "boolean",
                        "description": "Follow the \"load more comments\" links to pull deeper/collapsed replies (more requests, slower). Off = only the comments rendered on the main thread page.",
                        "default": false
                    },
                    "includeDeletedComments": {
                        "title": "Include deleted / removed comments",
                        "type": "boolean",
                        "description": "Off (default, recommended): skip comments whose content was deleted by the user or removed by a moderator — i.e. body \"[deleted]\", \"[removed]\" or empty. These have no usable text and you are never charged for them, so your comment count is filled only with real content. On: include them as `comment` records carrying an `isDeleted` flag.",
                        "default": false
                    },
                    "onlyPostsNewerThan": {
                        "title": "Only posts newer than",
                        "type": "string",
                        "description": "Keep only posts/comments newer than this. Accepts an ISO date (2026-06-01) or a relative window like \"7 days\", \"24 hours\", \"3 months\". Great with monitoring mode for fresh-only pulls."
                    },
                    "includeNSFW": {
                        "title": "Include NSFW / 18+",
                        "type": "boolean",
                        "description": "Include NSFW (over-18) posts. Turn off to exclude them.",
                        "default": true
                    },
                    "skipAds": {
                        "title": "Skip promoted posts (ads)",
                        "type": "boolean",
                        "description": "Skip promoted/advertised posts so you only get organic content.",
                        "default": true
                    },
                    "includeUserProfile": {
                        "title": "Include user profile record",
                        "type": "boolean",
                        "description": "For username sources, output a `user` record with post/comment karma and cake day in addition to their content.",
                        "default": true
                    },
                    "includeUserContent": {
                        "title": "Include user posts & comments",
                        "type": "boolean",
                        "description": "For username sources, output the user's recent posts and comments. Turn off to get only the profile record.",
                        "default": true
                    },
                    "userSection": {
                        "title": "User content section",
                        "enum": [
                            "overview",
                            "submitted",
                            "comments"
                        ],
                        "type": "string",
                        "description": "Which part of a user's history to scrape.",
                        "default": "overview"
                    },
                    "deduplicate": {
                        "title": "Deduplicate",
                        "type": "boolean",
                        "description": "Skip a record already emitted in this run (by id) — useful when sources overlap.",
                        "default": true
                    },
                    "monitorMode": {
                        "title": "Monitoring mode — only new records",
                        "type": "boolean",
                        "description": "Remember ids already returned and emit ONLY records not seen in previous runs. Pairs with Apify Schedules to track new posts/comments over time without re-paying for old data.",
                        "default": false
                    },
                    "monitorStoreName": {
                        "title": "Monitor store name",
                        "type": "string",
                        "description": "Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked job to keep their histories separate. Lowercase letters, digits and hyphens only.",
                        "default": "reddit-scraper-monitor"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 12,
                        "type": "integer",
                        "description": "Maximum parallel requests when fetching comment threads. Lower it if you see transient blocks; raise it for speed.",
                        "default": 4
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Reddit blocks datacenter IPs, so this actor defaults to Apify Residential proxy (blocked requests retry automatically on a fresh IP). Residential is strongly recommended.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
