# Reddit Scraper 💰 $1.25/1K — Posts & Full Comment Threads (`blackfalcondata/reddit-scraper`) Actor

Scrape Reddit posts with their full nested comment threads, user profiles, and community pages. Search any subreddit or keyword and capture scores, awards and timestamps. Bodies come as AI-ready text, HTML and Markdown for LLMs. No login or developer token is needed.

- **URL**: https://apify.com/blackfalcondata/reddit-scraper.md
- **Developed by:** [Black Falcon Data](https://apify.com/blackfalcondata) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.25 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does Reddit Scraper do?

Reddit Scraper extracts Reddit discussions — posts together with their nested comment threads — plus user profiles and community pages, in clean, AI-ready formats. Point it at any subreddit, post, profile, or search term and get structured records with text, HTML, and Markdown bodies, scores, vote ratios, awards, authors, timestamps, and extracted links. No Reddit account or login required.

**New to Apify?** [Sign up free](https://console.apify.com/sign-up?fpr=1h3gvi) and use the included $5 monthly platform credit to test this actor.

### Key features

<!-- KEY_FEATURES:START -->
- **🧵 Deep comment threads** — capture discussions beyond top-level replies: nested comments with parent/child IDs, depth, score, and awards, up to the comment and depth limits you set. Optionally expand collapsed and low-score branches for deeper coverage.
- **🤖 AI-ready output** — every post, comment, and profile body is emitted as clean text, HTML, and Markdown, so you can pipe threads straight into LLMs, RAG datasets, and MCP tools without extra cleanup.
- **🗂️ Four content types, one actor** — scrape posts, comment threads, user profiles, and community pages in a single run; mix and match by dropping in any Reddit URL.
- **🔎 Search and subreddit feeds** — pull a subreddit's feed, or run keyword searches with hot / top / new / relevance sorting that return lightweight discovery results (plus their comments) you can enrich by scraping the post URLs. Subreddit feeds also support time windows from the past hour through all-time.
- **🔗 Link & social extraction** — outbound links and social handles mentioned in post and comment bodies are pulled into structured `extractedUrls` and `socialProfiles` fields automatically.
- **🌳 Depth & volume control** — cap comments per post, limit reply nesting depth, or skip comments entirely to scrape posts only — tune coverage against cost.
- **🔞 NSFW & date filtering** — include or exclude 18+ content with one toggle, and skip posts older than a date you set (subreddit feeds and post URLs) so scheduled runs stay focused on fresh discussions.
- **🧹 Lean, flexible output** — choose a single description format (text, HTML, or Markdown) and strip empty fields to keep datasets small for downstream pipelines.
- **🔑 No login or API key required** — point the actor at any public Reddit URL or search term and run; no Reddit account or app registration needed.
<!-- KEY_FEATURES:END -->

### What data can you extract from reddit.com?

Every record carries a stable `itemType` (`post`, `comment`, `user`, or `community`), so you can tell the four content types apart inside a single dataset.

- **Posts** — `title`, body as text / HTML / Markdown, `score`, `upvoteRatio`, `numComments`, `awardCount`, `author`, `community`, `postType`, `language`, `createdAt`, and the canonical post `url`.
- **Comments** — threaded, with `postId`, `parentId`, and `depth` so you can rebuild the tree, plus `score`, `awardCount`, `author`, and `createdAt`.
- **Users** — `username`, `postKarma`, `commentKarma`, account `createdAt`, profile description, and avatar `icon`.
- **Communities** — `name`, display `title`, `members`, `createdAt`, and description.

The full post fields above come from subreddit-feed and single-post scraping. Posts surfaced by keyword **search** are lighter discovery records — `id`, `url`, `title`, `subreddit`, and `nsfw` — and their comment threads are still fetched (unless you skip comments); to get a search hit's full post metadata, scrape its URL directly. For the same reason, the `postDateLimit` filter applies to subreddit feeds and post URLs, not to search results.

Post, comment, and profile text is also mined for outbound links and social handles, exposed as structured `extractedUrls` and `socialProfiles` fields. Fields stay consistent across runs — unavailable values are returned as `null` rather than dropped, unless you enable `excludeEmptyFields` to slim the payload.


### Input

Configure the actor through the input schema in Apify Console.

Key parameters:

- **`startUrls`** — Reddit URLs to scrape — subreddits, post pages, user profiles, community pages, or search result pages. Each URL determines what type of content is fetched.
- **`searchTerms`** — Search Reddit for these terms. Each entry becomes an independent search. Search posts are lightweight discovery records (plus their comments) — see Search Type.
- **`searchType`** — Type of results to return when using Search Terms. Post results are lightweight discovery records — id, url, title, subreddit and NSFW flag — plus their comment threads; scrape a result's URL directly for its full post fields (author, body, score, timestamp). (default: `"posts"`)
- **`sort`** — Sort order for posts and search results. (default: `"hot"`)
- **`time`** — Restrict subreddit-feed results to a time window (applies to Top sort on feeds; search is not time-windowed). (default: `"all"`)
- **`includeNSFW`** — Include posts and communities marked as NSFW (18+). (default: `false`)
- **`postDateLimit`** — Skip posts older than this ISO-8601 date (e.g. "2024-01-01"). Applies to subreddit feeds and post URLs; search results carry no date and are not filtered. Leave blank for no date limit.
- **`maxItems`** — Maximum total records to save across all sources (posts, comments, users, communities). (default: `100`)
- **`maxComments`** — Maximum number of comments to collect from each post page. (default: `200`)
- **`includeCollapsed`** — Expand and include comments that are initially collapsed (controversial or low-score). Enables deeper thread coverage, up to the comment and depth limits you set. (default: `true`)
- **`commentDepth`** — Maximum reply nesting depth to collect (1 = top-level only). (default: `10`)
- **`skipComments`** — Do not collect comments from post pages — output posts only. (default: `false`)
- ...and 3 more parameters

### Input examples

**Scrape a subreddit feed** — Pull recent posts and their comment threads from any subreddit.

→ Posts from r/programming, each followed by its nested comments.

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/programming/"
    }
  ],
  "sort": "hot",
  "maxItems": 100,
  "maxComments": 200
}
````

**Search Reddit by keyword** — Run one or more keyword searches with sorting. Results are lightweight discovery records (plus their comments); scrape a result's URL for its full post fields.

→ Matching posts sorted by top score, each followed by its comments.

```json
{
  "searchTerms": [
    "mechanical keyboards",
    "ergonomic mice"
  ],
  "searchType": "posts",
  "sort": "top",
  "maxItems": 200
}
```

**Get one post with its full thread** — Point at a single post URL to capture the post and its comment tree (up to the limits you set), including collapsed replies.

→ One post record plus its comments, up to the configured limits, with parent/child IDs and depth.

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/programming/comments/1abc234/what_makes_a_codebase_pleasant_to_work_in/"
    }
  ],
  "includeCollapsed": true,
  "commentDepth": 10,
  "maxComments": 500
}
```

**Posts only — skip comments** — Collect just the posts from a subreddit without fetching comment threads.

→ Post records only — faster and cheaper when you don't need discussions.

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/technology/"
    }
  ],
  "skipComments": true,
  "maxItems": 250
}
```

### Output

Each run produces a dataset of structured Reddit records. Results can be downloaded as JSON, CSV, or Excel from the Dataset tab in Apify Console.

### Example Reddit record

```json
{
  "itemType": "post",
  "id": "t3_1ttjtwv",
  "url": "https://www.reddit.com/r/programming/comments/1ttjtwv/your_process_memory_is_a_file_the/",
  "title": "Your process' memory is a file: The underappreciated gem that is /proc/<pid>/mem",
  "body": null,
  "bodyHtml": null,
  "contentHref": "https://lcamtuf.substack.com/p/weekend-trivia-your-process-memory",
  "postType": "link",
  "language": "en",
  "score": 129,
  "upvoteRatio": 0.9708029197080292,
  "numComments": 1,
  "awardCount": 0,
  "author": "mttd",
  "authorId": "t2_6gkbb",
  "community": "r/programming",
  "communityId": "t5_2fwo",
  "createdAt": "2026-06-01T08:32:12.581+02:00",
  "icon": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_7.png",
  "nsfw": false
}
```

### Example comment record

```json
{
  "itemType": "comment",
  "id": "t1_ookwxid",
  "url": "https://www.reddit.com/r/programming/comments/1tqwksq/comment/ookwxid/",
  "postId": "t3_1tqwksq",
  "parentId": null,
  "depth": 0,
  "body": "When is everyone going to agree that the javascript ecosystem is complete garbage?",
  "bodyHtml": "\n        <div id=\"t1_ookwxid-post-rtjson-content\" class=\"py-0 xs:mx-xs mx-2xs max-w-full scalable-text [--emote-size:20px]\" dir=\"auto\">\n      <p dir=\"auto\">\n      When is everyone going to agree that...",
  "score": 27,
  "author": "wildjokers",
  "awardCount": 0,
  "createdAt": "2026-05-29T14:48:19.159000+0000",
  "description": "When is everyone going to agree that the javascript ecosystem is complete garbage?",
  "descriptionText": "When is everyone going to agree that the javascript ecosystem is complete garbage?",
  "descriptionHtml": "\n        <div id=\"t1_ookwxid-post-rtjson-content\" class=\"py-0 xs:mx-xs mx-2xs max-w-full scalable-text [--emote-size:20px]\" dir=\"auto\">\n      <p dir=\"auto\">\n      When is everyone going to agree that...",
  "descriptionMarkdown": "When is everyone going to agree that the javascript ecosystem is complete garbage?"
}
```

### Example user record

```json
{
  "itemType": "user",
  "id": "t2_1w72",
  "url": "https://www.reddit.com/user/spez/",
  "username": "spez",
  "postKarma": 182953,
  "commentKarma": 755345,
  "createdAt": "2005-06-06T00:00:00.000Z",
  "description": "Reddit CEO",
  "icon": "https://styles.redditmedia.com/t5_3k30p/styles/profileIcon_uj015iwx9s7g1.png?frame=1&auto=webp&crop=256%3A256%2Csmart&s=54cdc94b6359f38240017e6737d3c56933e0206b"
}
```

### Example community record

```json
{
  "itemType": "community",
  "id": "t5_2fwo",
  "name": "programming",
  "title": "programming",
  "members": null,
  "description": "Computer Programming",
  "createdAt": null,
  "url": "https://www.reddit.com/r/programming/"
}
```

### How to scrape reddit.com

1. Go to [Reddit Scraper](https://apify.com/blackfalcondata/reddit-scraper?fpr=1h3gvi) in Apify Console.
2. Configure the input.
3. Set `maxItems` to control how many results you need.
4. Click **Start** and wait for the run to finish.
5. Export the dataset as JSON, CSV, or Excel.

### Use cases

- Build training and RAG datasets from real Reddit discussions, with full comment context in Markdown.
- Monitor brand, product, or competitor mentions across subreddits and surface the threads driving them.
- Track sentiment and emerging topics in niche communities over time with scheduled runs.
- Power market and audience research with authentic user opinions, questions, and pain points.
- Feed structured Reddit threads into AI agents, MCP tools, and automation pipelines.
- Generate leads by extracting outbound links and social handles shared in relevant threads.
- Archive a subreddit, profile, or discussion thread for research or record-keeping.
- Export clean post and comment data to dashboards, spreadsheets, or data warehouses.

### How much does it cost to scrape reddit.com?

Reddit Scraper uses [pay-per-event](https://docs.apify.com/platform/actors/paid-actors/pay-per-event) pricing. You pay a small fee when the run starts and then for each result that is actually produced.

- **Run start:** $0.005 per run
- **Per result:** $0.00125 per Reddit record

Example costs:

- 10 results: **$0.02**
- 25 results: **$0.04**
- 100 results: **$0.13**
- 200 results: **$0.26**
- 500 results: **$0.63**

### FAQ

#### How many results can I get from reddit.com?

The number of results depends on the search query and available listings on reddit.com. Use the `maxItems` parameter to control how many results are returned per run.

#### Can I integrate Reddit Scraper with other apps?

Yes. Reddit Scraper works with Apify's [integrations](https://apify.com/integrations?fpr=1h3gvi) to connect with tools like Zapier, Make, Google Sheets, Slack, and more. You can also use webhooks to trigger actions when a run completes.

#### Can I use Reddit Scraper with the Apify API?

Yes. You can start runs, manage inputs, and retrieve results programmatically through the [Apify API](https://docs.apify.com/api/v2). Client libraries are available for JavaScript, Python, and other languages.

#### Can I use Reddit Scraper through an MCP Server?

Yes. Apify provides an [MCP Server](https://apify.com/apify/actors-mcp-server?fpr=1h3gvi) that lets AI assistants and agents call this actor directly. Use a single `descriptionFormat` and `excludeEmptyFields` to keep payloads manageable for LLM context windows.

#### Is it legal to scrape reddit.com?

This actor extracts publicly available data from reddit.com. Web scraping of public information is generally considered legal, but you should always review the target site's terms of service and ensure your use case complies with applicable laws and regulations, including GDPR where relevant.

#### Your feedback

If you have questions, need a feature, or found a bug, please [open an issue](https://apify.com/blackfalcondata/reddit-scraper/issues?fpr=1h3gvi) on the actor's page in Apify Console. Your feedback helps us improve.

### You might also like

- [Actiris Brussels Job Scraper](https://apify.com/blackfalcondata/actiris-scraper?fpr=1h3gvi) — Scrape all active job listings from actiris.brussels — official Brussels public employment service..
- [Adzuna Job Scraper — Global Jobs with Salary & Coordinates](https://apify.com/blackfalcondata/adzuna-scraper?fpr=1h3gvi) — Scrape adzuna.com job listings across 19 country markets with structured salary data.
- [APEC.fr Scraper - French Executive Jobs](https://apify.com/blackfalcondata/apec-scraper?fpr=1h3gvi) — Scrape apec.fr - French executive job listings with salary ranges, company, location, skills,.
- [Arbeitsagentur Jobs Feed — German Federal Employment Agency](https://apify.com/blackfalcondata/arbeitsagentur-jobs-feed?fpr=1h3gvi) — Extract job listings from arbeitsagentur.de — Germany's official public employment portal with 1M+.
- [Arbeitsagentur Scraper - German Jobs](https://apify.com/blackfalcondata/arbeitsagentur-scraper?fpr=1h3gvi) — Scrape arbeitsagentur.de - Germany’s official employment portal with 1M+ listings. Contact data,.
- [Arbetsformedlingen Job Scraper](https://apify.com/blackfalcondata/arbetsformedlingen-scraper?fpr=1h3gvi) — Scrape arbetsformedlingen.se (Platsbanken) — Sweden's official employment portal. Returns 84.
- [AutoScout24 Scraper — European Car Listings with Dealer Data](https://apify.com/blackfalcondata/autoscout24-scraper?fpr=1h3gvi) — Scrape autoscout24.com - Europe's largest used car marketplace with 770K+ listings. Structured.
- [Bayt.com Scraper — MENA Jobs with Salary & Skills Filter](https://apify.com/blackfalcondata/bayt-scraper?fpr=1h3gvi) — Scrape bayt.com — leading Middle East job board covering UAE, Saudi Arabia, Qatar, Egypt and 9 more.

### Getting started with Apify

New to Apify? [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=1h3gvi) — no credit card required.

1. Sign up — $5 platform credit included
2. Open this actor and configure your input
3. Click **Start** — export results as JSON, CSV, or Excel

Need more later? [See Apify pricing](https://apify.com/pricing?fpr=1h3gvi).

# Actor input Schema

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

Reddit URLs to scrape — subreddits, post pages, user profiles, community pages, or search result pages. Each URL determines what type of content is fetched.

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

Search Reddit for these terms. Each entry becomes an independent search. Search posts are lightweight discovery records (plus their comments) — see Search Type.

## `searchType` (type: `string`):

Type of results to return when using Search Terms. Post results are lightweight discovery records — id, url, title, subreddit and NSFW flag — plus their comment threads; scrape a result's URL directly for its full post fields (author, body, score, timestamp).

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

Sort order for posts and search results.

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

Restrict subreddit-feed results to a time window (applies to Top sort on feeds; search is not time-windowed).

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

Include posts and communities marked as NSFW (18+).

## `postDateLimit` (type: `string`):

Skip posts older than this ISO-8601 date (e.g. "2024-01-01"). Applies to subreddit feeds and post URLs; search results carry no date and are not filtered. Leave blank for no date limit.

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

Maximum total records to save across all sources (posts, comments, users, communities).

## `maxComments` (type: `integer`):

Maximum number of comments to collect from each post page.

## `includeCollapsed` (type: `boolean`):

Expand and include comments that are initially collapsed (controversial or low-score). Enables deeper thread coverage, up to the comment and depth limits you set.

## `commentDepth` (type: `integer`):

Maximum reply nesting depth to collect (1 = top-level only).

## `skipComments` (type: `boolean`):

Do not collect comments from post pages — output posts only.

## `descriptionFormat` (type: `string`):

Controls which body/description fields are included in output. "all" emits text + HTML + markdown variants.

## `excludeEmptyFields` (type: `boolean`):

Strip null and empty fields from output records to reduce payload size.

## `includeRunMetadata` (type: `boolean`):

Append a run-metadata record at the end of the dataset (run ID, timing, item counts).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/programming/"
    }
  ],
  "searchTerms": [],
  "searchType": "posts",
  "sort": "hot",
  "time": "all",
  "includeNSFW": false,
  "maxItems": 5,
  "maxComments": 200,
  "includeCollapsed": true,
  "commentDepth": 10,
  "skipComments": false,
  "descriptionFormat": "all",
  "excludeEmptyFields": false,
  "includeRunMetadata": false
}
```

# Actor output Schema

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

No description

# 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/programming/"
        }
    ],
    "searchTerms": [],
    "maxItems": 5,
    "includeCollapsed": false,
    "descriptionFormat": "all",
    "excludeEmptyFields": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("blackfalcondata/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/programming/" }],
    "searchTerms": [],
    "maxItems": 5,
    "includeCollapsed": False,
    "descriptionFormat": "all",
    "excludeEmptyFields": False,
}

# Run the Actor and wait for it to finish
run = client.actor("blackfalcondata/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": [
    {
      "url": "https://www.reddit.com/r/programming/"
    }
  ],
  "searchTerms": [],
  "maxItems": 5,
  "includeCollapsed": false,
  "descriptionFormat": "all",
  "excludeEmptyFields": false
}' |
apify call blackfalcondata/reddit-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Scraper 💰 $1.25/1K — Posts & Full Comment Threads",
        "description": "Scrape Reddit posts with their full nested comment threads, user profiles, and community pages. Search any subreddit or keyword and capture scores, awards and timestamps. Bodies come as AI-ready text, HTML and Markdown for LLMs. No login or developer token is needed.",
        "version": "0.1",
        "x-build-id": "nDBlFxaY89J1etD1D"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/blackfalcondata~reddit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-blackfalcondata-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/blackfalcondata~reddit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-blackfalcondata-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/blackfalcondata~reddit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-blackfalcondata-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",
                        "type": "array",
                        "description": "Reddit URLs to scrape — subreddits, post pages, user profiles, community pages, or search result pages. Each URL determines what type of content is fetched.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "searchTerms": {
                        "title": "🔎 Search Terms",
                        "type": "array",
                        "description": "Search Reddit for these terms. Each entry becomes an independent search. Search posts are lightweight discovery records (plus their comments) — see Search Type.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchType": {
                        "title": "🔎 Search Type",
                        "enum": [
                            "posts"
                        ],
                        "type": "string",
                        "description": "Type of results to return when using Search Terms. Post results are lightweight discovery records — id, url, title, subreddit and NSFW flag — plus their comment threads; scrape a result's URL directly for its full post fields (author, body, score, timestamp).",
                        "default": "posts"
                    },
                    "sort": {
                        "title": "📊 Sort",
                        "enum": [
                            "relevance",
                            "hot",
                            "top",
                            "new",
                            "comments"
                        ],
                        "type": "string",
                        "description": "Sort order for posts and search results.",
                        "default": "hot"
                    },
                    "time": {
                        "title": "🕒 Time Filter",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "year",
                            "all"
                        ],
                        "type": "string",
                        "description": "Restrict subreddit-feed results to a time window (applies to Top sort on feeds; search is not time-windowed).",
                        "default": "all"
                    },
                    "includeNSFW": {
                        "title": "🔞 Include NSFW",
                        "type": "boolean",
                        "description": "Include posts and communities marked as NSFW (18+).",
                        "default": false
                    },
                    "postDateLimit": {
                        "title": "📅 Post Date Limit",
                        "type": "string",
                        "description": "Skip posts older than this ISO-8601 date (e.g. \"2024-01-01\"). Applies to subreddit feeds and post URLs; search results carry no date and are not filtered. Leave blank for no date limit."
                    },
                    "maxItems": {
                        "title": "🔢 Max Items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum total records to save across all sources (posts, comments, users, communities).",
                        "default": 100
                    },
                    "maxComments": {
                        "title": "💬 Max Comments Per Post",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of comments to collect from each post page.",
                        "default": 200
                    },
                    "includeCollapsed": {
                        "title": "💬 Include Collapsed Comments",
                        "type": "boolean",
                        "description": "Expand and include comments that are initially collapsed (controversial or low-score). Enables deeper thread coverage, up to the comment and depth limits you set.",
                        "default": true
                    },
                    "commentDepth": {
                        "title": "🌳 Comment Depth",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum reply nesting depth to collect (1 = top-level only).",
                        "default": 10
                    },
                    "skipComments": {
                        "title": "⏭️ Skip Comments",
                        "type": "boolean",
                        "description": "Do not collect comments from post pages — output posts only.",
                        "default": false
                    },
                    "descriptionFormat": {
                        "title": "📄 Description Format",
                        "enum": [
                            "all",
                            "text",
                            "html",
                            "markdown"
                        ],
                        "type": "string",
                        "description": "Controls which body/description fields are included in output. \"all\" emits text + HTML + markdown variants.",
                        "default": "all"
                    },
                    "excludeEmptyFields": {
                        "title": "🧹 Exclude Empty Fields",
                        "type": "boolean",
                        "description": "Strip null and empty fields from output records to reduce payload size.",
                        "default": false
                    },
                    "includeRunMetadata": {
                        "title": "📋 Include Run Metadata",
                        "type": "boolean",
                        "description": "Append a run-metadata record at the end of the dataset (run ID, timing, item counts).",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
