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

Scrape Reddit posts, comments, profiles, and subreddits without API key. Full comment threading, media extraction (video, gallery, embed), flair, awards. NSFW filtering. Hot/new/top/rising sort and search.

- **URL**: https://apify.com/junipr/reddit-scraper.md
- **Developed by:** [junipr](https://apify.com/junipr) (community)
- **Categories:** Social media, Developer tools
- **Stats:** 16 total users, 5 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.95 / 1,000 result scrapeds

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

Scrape Reddit posts, comments, user profiles, and subreddit metadata without a Reddit API key. Features full comment tree threading, media extraction, NSFW filtering, and configurable content filters. Works out of the box with zero configuration — just provide a subreddit name or Reddit URL and start collecting data.

### Why Use This Over Reddit API

Reddit deprecated its free API tier in 2023. The official API now costs $0.24 per 1,000 API calls with a $100/month minimum commitment, plus requires OAuth application setup and rate limit quota management.

This actor bypasses the API entirely using web scraping. No API key, no OAuth, no monthly subscription. Additional features the Reddit API does not provide: media URL resolution for external hosts (imgur, gfycat), NSFW content filtering with safe defaults, and structured flair/award/crosspost data that competitors ignore.

| Feature | This Actor | epctex Reddit Scraper | Reddit API (Official) |
|---------|-----------|----------------------|-----------------------|
| API key required | No | No | Yes (OAuth) |
| Monthly subscription | No | No | $100/mo minimum |
| Comment threading | Full tree structure | Flat list | Full tree |
| Media extraction | Video, gallery, embed, external | Images only | URLs only |
| NSFW filtering | Configurable (off by default) | No | Basic |
| Rate limit handling | Auto backoff + rotation | Manual retry | Built-in quotas |
| Cost per 1K posts | $1.90 | ~$4.00 | $0.24 (API calls only) |

### How to Use

**Zero-config example** — scrape hot posts from r/technology:

```json
{
    "scrapeType": "posts",
    "subreddits": ["technology"],
    "maxResults": 50
}
````

**Search Reddit for brand mentions:**

```json
{
    "scrapeType": "search",
    "searchQuery": "your brand name",
    "sort": "new",
    "maxResults": 200
}
```

**Get all comments on a specific post:**

```json
{
    "scrapeType": "comments",
    "urls": ["https://www.reddit.com/r/AskReddit/comments/abc123/your_post_title/"]
}
```

**Scrape top posts from this week with comment trees:**

```json
{
    "scrapeType": "posts",
    "subreddits": ["technology", "programming"],
    "sort": "top",
    "timeFilter": "week",
    "maxResults": 100,
    "includeComments": true,
    "maxCommentsPerPost": 50
}
```

**Scrape subreddit metadata:**

```json
{
    "scrapeType": "subreddit",
    "subreddits": ["technology", "programming", "webdev"]
}
```

### Input Configuration

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `scrapeType` | string | `"posts"` | What to scrape: `posts`, `comments`, `subreddit`, `userProfile`, `search` |
| `urls` | string\[] | `[]` | Direct Reddit URLs (posts, subreddits, users) |
| `searchQuery` | string | — | Search query (required for `search` type) |
| `subreddits` | string\[] | `[]` | Subreddit names without `r/` |
| `sort` | string | `"hot"` | Sort: `hot`, `new`, `top`, `rising`, `controversial` |
| `timeFilter` | string | `"all"` | Time filter for `top`/`controversial`: `hour`, `day`, `week`, `month`, `year`, `all` |
| `maxResults` | integer | `100` | Maximum results (1–100,000) |
| `includeComments` | boolean | `true` | Include comments when scraping posts |
| `maxCommentsPerPost` | integer | `100` | Max comments per post (0–10,000) |
| `commentDepth` | integer | `10` | Max reply nesting depth (1–20) |
| `includeNsfw` | boolean | `false` | Include NSFW content |
| `minScore` | integer | — | Minimum post/comment score |
| `excludeAuthors` | string\[] | `["AutoModerator", "[deleted]"]` | Authors to exclude |
| `flattenComments` | boolean | `false` | Flatten comment trees to a flat list |
| `proxyConfiguration` | object | Apify residential | Proxy settings |

### Output Format

Each post includes full metadata, media, and optionally a threaded comment tree:

```json
{
    "id": "t3_abc123",
    "title": "Example Post Title",
    "body": "Post body text in markdown...",
    "author": "reddit_user",
    "subreddit": "technology",
    "score": 1542,
    "upvoteRatio": 0.94,
    "numComments": 231,
    "createdUtc": "2024-01-15T10:30:00.000Z",
    "isNsfw": false,
    "media": {
        "type": "image",
        "images": [{ "url": "https://...", "width": 1920, "height": 1080, "caption": null }],
        "video": null,
        "embed": null
    },
    "comments": [
        {
            "id": "t1_xyz789",
            "author": "commenter",
            "body": "Great post!",
            "score": 45,
            "depth": 0,
            "isOp": false,
            "replies": [
                {
                    "id": "t1_abc456",
                    "body": "Thanks!",
                    "depth": 1,
                    "replies": []
                }
            ]
        }
    ]
}
```

Comments maintain full tree structure with `replies` arrays. Set `flattenComments: true` for a flat list with `depth` and `parentId` fields for CSV/spreadsheet use.

### Tips and Best Practices

**Rate limiting:** Reddit aggressively rate-limits scrapers. The default `requestDelay` of 1000ms is a safe baseline. Lower values increase speed but risk 429 errors. The actor handles rate limits automatically with exponential backoff.

**Proxy selection:** Reddit blocks datacenter proxies. Use residential proxies (the default) for reliable scraping. The actor rotates IPs on rate limit responses.

**Large subreddits:** For subreddits with millions of posts, use `sort: "top"` with a `timeFilter` to get manageable result sets. Scraping all of r/AskReddit would take days — filter first.

**NSFW filtering:** NSFW content is excluded by default. Set `includeNsfw: true` to include it. When scraping NSFW subreddits with the default setting, zero results are returned.

**Comment threading:** Comments are returned as a tree by default. Each comment has a `replies` array containing child comments. Use `flattenComments: true` if you need a flat structure for data analysis.

### Pricing

Pay-Per-Event: **$1.90 per 1,000 results**.

Pricing includes all platform compute costs — no hidden fees.

A "result" is one successfully scraped item pushed to the dataset. A post counts as 1 result. Each comment counts as 1 result. A subreddit info object counts as 1 result.

| Scenario | Items | Cost |
|----------|-------|------|
| 100 posts, no comments | 100 | $0.19 |
| 100 posts + avg 20 comments each | 2,100 | $3.99 |
| Brand monitoring (500 mentions/week) | 500 | $0.95/week |
| Subreddit metadata (10 subreddits) | 10 | $0.02 |
| Full thread (1 post + 5K comments) | 5,001 | $9.50 |

Items filtered out by score, NSFW, author, or flair filters are NOT billed. Failed requests are NOT billed.

### FAQ

#### Does this require a Reddit API key?

No. This actor scrapes Reddit's web interface directly. No API key, no OAuth setup, no Reddit developer account needed. It works out of the box.

#### How does it handle Reddit's rate limiting?

The actor uses exponential backoff when Reddit returns 429 (Too Many Requests) responses. It starts with a 5-second delay and increases to 60 seconds, with random jitter to avoid thundering herd patterns. Proxy IPs are rotated on rate limit hits.

#### Can I scrape private subreddits?

No. Private subreddits require Reddit account authentication, which this actor does not support. The actor detects private subreddits and reports them as errors without wasting retries.

#### How do I filter NSFW content?

NSFW content is excluded by default (`includeNsfw: false`). Set `includeNsfw: true` to include it. When scraping a known NSFW subreddit with the default setting, you will get zero results.

#### Does it work for non-English subreddits?

Yes. The actor supports full UTF-8 content including emoji, CJK characters, and other scripts. Content is preserved exactly as posted on Reddit.

#### Can I download images and videos?

The actor extracts media URLs (images, videos, galleries) by default. Direct download to the Apify key-value store is not currently supported — use the extracted URLs with a separate download tool.

#### What happens if Reddit blocks the scraper?

The actor detects anti-bot pages and retries with different proxy IPs. With residential proxies (the default), blocks are rare. If all retries fail, the URL is logged in the run summary's `failedUrls` array.

#### How are comments structured?

Comments are returned as a tree by default. Each comment has a `replies` array containing nested child comments, preserving Reddit's thread structure. The `depth` field indicates nesting level (0 = top-level). Set `flattenComments: true` for a flat list.

# Actor input Schema

## `scrapeType` (type: `string`):

What type of content to scrape from Reddit.

## `urls` (type: `array`):

Direct Reddit URLs to scrape. Accepts post URLs, subreddit URLs, user profile URLs. Required unless using search or subreddits parameter.

## `searchQuery` (type: `string`):

Search query string. Required when scrapeType is 'search'.

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

Subreddit names (without r/). Used with scrapeType 'posts' or 'search'.

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

Sort order for posts and search results.

## `timeFilter` (type: `string`):

Time filter for 'top' and 'controversial' sorts.

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

Maximum number of results to return.

## `maxAge` (type: `string`):

Only return posts newer than this duration. Format: '24h', '7d', '30d', '1y'.

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

Include comments when scraping posts.

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

Maximum comments to extract per post.

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

Sort order for comments.

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

Maximum reply depth to follow.

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

Follow 'load more comments' / 'continue this thread' links.

## `includeNsfw` (type: `boolean`):

Include NSFW (Not Safe For Work) content. Default excludes it.

## `minScore` (type: `integer`):

Only include posts/comments with score >= this value.

## `minComments` (type: `integer`):

Only include posts with >= this many comments.

## `flairFilter` (type: `array`):

Only include posts with these flair texts (case-insensitive).

## `authorFilter` (type: `array`):

Only include posts/comments by these usernames.

## `excludeAuthors` (type: `array`):

Exclude posts/comments from these usernames.

## `contentContains` (type: `array`):

Only include posts where title or body contains any of these strings (case-insensitive).

## `excludeStickied` (type: `boolean`):

Exclude stickied/pinned posts.

## `mediaType` (type: `string`):

Filter posts by media type.

## `extractMedia` (type: `boolean`):

Extract media URLs (images, videos, galleries).

## `includeRawHtml` (type: `boolean`):

Include raw HTML of post/comment body alongside markdown.

## `flattenComments` (type: `boolean`):

Output comments as flat list instead of tree. Useful for CSV/spreadsheet analysis.

## `requestDelay` (type: `integer`):

Minimum delay between requests in milliseconds. Reddit is aggressive on rate limiting.

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

Maximum number of concurrent requests.

## `maxRetries` (type: `integer`):

Maximum number of retries for failed requests.

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

Proxy settings. Reddit requires residential proxies for reliable scraping.

## Actor input object example

```json
{
  "scrapeType": "posts",
  "urls": [
    "https://www.reddit.com/r/technology/"
  ],
  "sort": "hot",
  "timeFilter": "all",
  "maxResults": 100,
  "includeComments": true,
  "maxCommentsPerPost": 100,
  "commentSort": "best",
  "commentDepth": 10,
  "expandMoreComments": true,
  "includeNsfw": false,
  "excludeAuthors": [
    "AutoModerator",
    "[deleted]"
  ],
  "excludeStickied": false,
  "mediaType": "all",
  "extractMedia": true,
  "includeRawHtml": false,
  "flattenComments": false,
  "requestDelay": 1000,
  "maxConcurrency": 3,
  "maxRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Reddit posts, comments, user profiles, or subreddit data with full metadata, comment trees, and media extraction.

# 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 = {
    "scrapeType": "posts",
    "urls": [
        "https://www.reddit.com/r/technology/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("junipr/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 = {
    "scrapeType": "posts",
    "urls": ["https://www.reddit.com/r/technology/"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("junipr/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 '{
  "scrapeType": "posts",
  "urls": [
    "https://www.reddit.com/r/technology/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call junipr/reddit-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Scraper — Posts, Comments & Subreddit Search",
        "description": "Scrape Reddit posts, comments, profiles, and subreddits without API key. Full comment threading, media extraction (video, gallery, embed), flair, awards. NSFW filtering. Hot/new/top/rising sort and search.",
        "version": "1.0",
        "x-build-id": "X3VS2x3yQh9ZHo1m8"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/junipr~reddit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-junipr-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/junipr~reddit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-junipr-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/junipr~reddit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-junipr-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": {
                    "scrapeType": {
                        "title": "Scrape Type",
                        "enum": [
                            "posts",
                            "comments",
                            "subreddit",
                            "userProfile",
                            "search"
                        ],
                        "type": "string",
                        "description": "What type of content to scrape from Reddit.",
                        "default": "posts"
                    },
                    "urls": {
                        "title": "Reddit URLs",
                        "type": "array",
                        "description": "Direct Reddit URLs to scrape. Accepts post URLs, subreddit URLs, user profile URLs. Required unless using search or subreddits parameter.",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "https://www.reddit.com/r/technology/"
                        ]
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search query string. Required when scrapeType is 'search'."
                    },
                    "subreddits": {
                        "title": "Subreddits",
                        "type": "array",
                        "description": "Subreddit names (without r/). Used with scrapeType 'posts' or 'search'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sort": {
                        "title": "Sort Order",
                        "enum": [
                            "hot",
                            "new",
                            "top",
                            "rising",
                            "controversial",
                            "relevance"
                        ],
                        "type": "string",
                        "description": "Sort order for posts and search results.",
                        "default": "hot"
                    },
                    "timeFilter": {
                        "title": "Time Filter",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "year",
                            "all"
                        ],
                        "type": "string",
                        "description": "Time filter for 'top' and 'controversial' sorts.",
                        "default": "all"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum number of results to return.",
                        "default": 100
                    },
                    "maxAge": {
                        "title": "Max Age",
                        "type": "string",
                        "description": "Only return posts newer than this duration. Format: '24h', '7d', '30d', '1y'."
                    },
                    "includeComments": {
                        "title": "Include Comments",
                        "type": "boolean",
                        "description": "Include comments when scraping posts.",
                        "default": true
                    },
                    "maxCommentsPerPost": {
                        "title": "Max Comments Per Post",
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum comments to extract per post.",
                        "default": 100
                    },
                    "commentSort": {
                        "title": "Comment Sort",
                        "enum": [
                            "best",
                            "top",
                            "new",
                            "controversial",
                            "old",
                            "qa"
                        ],
                        "type": "string",
                        "description": "Sort order for comments.",
                        "default": "best"
                    },
                    "commentDepth": {
                        "title": "Comment Depth",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum reply depth to follow.",
                        "default": 10
                    },
                    "expandMoreComments": {
                        "title": "Expand More Comments",
                        "type": "boolean",
                        "description": "Follow 'load more comments' / 'continue this thread' links.",
                        "default": true
                    },
                    "includeNsfw": {
                        "title": "Include NSFW",
                        "type": "boolean",
                        "description": "Include NSFW (Not Safe For Work) content. Default excludes it.",
                        "default": false
                    },
                    "minScore": {
                        "title": "Minimum Score",
                        "type": "integer",
                        "description": "Only include posts/comments with score >= this value."
                    },
                    "minComments": {
                        "title": "Minimum Comments",
                        "type": "integer",
                        "description": "Only include posts with >= this many comments."
                    },
                    "flairFilter": {
                        "title": "Flair Filter",
                        "type": "array",
                        "description": "Only include posts with these flair texts (case-insensitive).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "authorFilter": {
                        "title": "Author Filter",
                        "type": "array",
                        "description": "Only include posts/comments by these usernames.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "excludeAuthors": {
                        "title": "Exclude Authors",
                        "type": "array",
                        "description": "Exclude posts/comments from these usernames.",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "AutoModerator",
                            "[deleted]"
                        ]
                    },
                    "contentContains": {
                        "title": "Content Contains",
                        "type": "array",
                        "description": "Only include posts where title or body contains any of these strings (case-insensitive).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "excludeStickied": {
                        "title": "Exclude Stickied",
                        "type": "boolean",
                        "description": "Exclude stickied/pinned posts.",
                        "default": false
                    },
                    "mediaType": {
                        "title": "Media Type Filter",
                        "enum": [
                            "all",
                            "text",
                            "image",
                            "video",
                            "link",
                            "gallery"
                        ],
                        "type": "string",
                        "description": "Filter posts by media type.",
                        "default": "all"
                    },
                    "extractMedia": {
                        "title": "Extract Media",
                        "type": "boolean",
                        "description": "Extract media URLs (images, videos, galleries).",
                        "default": true
                    },
                    "includeRawHtml": {
                        "title": "Include Raw HTML",
                        "type": "boolean",
                        "description": "Include raw HTML of post/comment body alongside markdown.",
                        "default": false
                    },
                    "flattenComments": {
                        "title": "Flatten Comments",
                        "type": "boolean",
                        "description": "Output comments as flat list instead of tree. Useful for CSV/spreadsheet analysis.",
                        "default": false
                    },
                    "requestDelay": {
                        "title": "Request Delay (ms)",
                        "minimum": 500,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Minimum delay between requests in milliseconds. Reddit is aggressive on rate limiting.",
                        "default": 1000
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of concurrent requests.",
                        "default": 3
                    },
                    "maxRetries": {
                        "title": "Max Retries",
                        "minimum": 0,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum number of retries for failed requests.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Reddit requires residential proxies for reliable scraping.",
                        "default": {}
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
