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

Export public Reddit posts and comments from subreddit, user, search, post, comment, and short-link URLs for social listening, lead research, AI datasets, and alerts.

- **URL**: https://apify.com/fetch\_cat/reddit-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, Lead generation, AI
- **Stats:** 40 total users, 18 monthly users, 93.1% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.07 / 1,000 post extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

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

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Reddit Scraper

Scrape public Reddit posts, subreddit feeds, keyword search results, user feeds, URLs, and optional comments.

Use this Actor to export public Reddit discussion data for social listening, market research, community monitoring, AI summaries, lead research, content analysis, and alerts. Results can be downloaded as CSV, JSON, Excel, XML, RSS, or used through the Apify Dataset API.

### At a glance

- **Reddit source coverage**: Scrape subreddit listings, user pages, search results, direct post URLs, and comment threads where publicly available.
- **Posts and comments**: Save post rows and optionally collect public comments for each post.
- **Search workflows**: Search all Reddit or search inside one subreddit with sort and time filters.
- **Monitoring ready**: Schedule recurring subreddit, keyword, or URL checks for social listening and alerts.
- **API export**: Send Reddit rows to spreadsheets, BI tools, databases, summaries, or AI agents.

### Ready-to-run examples

Use these saved Store examples as starting points. Open any example to prefill the Actor input, then adjust URLs, keywords, limits, or filters for your own run.

- **[Review a public Reddit thread with comments](https://apify.com/fetch_cat/reddit-scraper/examples/reddit-public-thread-review)**
- **[Scrape all-time top Reddit posts](https://apify.com/fetch_cat/reddit-scraper/examples/reddit-all-time-top-posts)**
- **[Scrape Reddit posts from the past year](https://apify.com/fetch_cat/reddit-scraper/examples/reddit-yearly-topic-archive)**
- **[Monitor Reddit posts from the past hour](https://apify.com/fetch_cat/reddit-scraper/examples/reddit-hourly-topic-monitoring)**
- **[Export up to 1000 Reddit posts per source](https://apify.com/fetch_cat/reddit-scraper/examples/reddit-high-volume-post-export)**
- **[Build a Reddit comments dataset](https://apify.com/fetch_cat/reddit-scraper/examples/reddit-top-comments-dataset)**
- **[View all ready-to-run examples](https://apify.com/fetch_cat/reddit-scraper/examples)** (50 examples)

### What can it do?

Reddit Scraper extracts public Reddit listing, search, post, and comment data and saves structured dataset rows.

- **Scrape subreddits and URLs**: Add subreddit pages, user pages, search pages, or direct post URLs.
- **Run keyword searches**: Use `searchQuery`, `searchSubreddit`, `sort`, and `timeFilter`.
- **Collect comments**: Enable comments and cap them with `maxCommentsPerPost`.
- **Control reliability**: Use retry, pacing, and proxy settings for larger runs.
- **Export repeatable datasets**: Use Apify downloads, API calls, schedules, webhooks, and integrations.

### Common workflows

- **Social listening**: Track mentions of brands, products, competitors, issues, and topics.
- **Market research**: Export public discussions for pain-point analysis, category research, and trend reports.
- **Community monitoring**: Watch subreddits and search terms on a recurring schedule.
- **AI training and RAG datasets**: Collect public posts and comments with available score, upvote ratio, timestamps, and thread structure for downstream filtering, labeling, embedding, fine-tuning, or retrieval workflows.
- **AI summaries**: Feed posts and comments into summarization, classification, or sentiment workflows.
- **Content research**: Find questions, objections, stories, and language for content planning.
- **Support and alerting**: Trigger downstream workflows when new posts match a query.

### Build a Reddit dataset for AI training or RAG

Use Reddit Scraper as the **collection layer** for a public-discussion dataset. It extracts post and comment text plus available engagement and thread fields; your downstream pipeline controls quality thresholds, labels, embeddings, storage, and model use.

1. Choose focused subreddits, keyword searches, or post URLs.
2. Set `sort` and `timeFilter`; enable `includeComments` when replies matter.
3. Keep `score`, `upvoteRatio`, `numComments`, `parentId`, and `depth` alongside the text so downstream jobs can rank or reconstruct context.
4. Export JSON or use the Dataset API to filter, deduplicate, classify, embed, and load records into your vector store or training pipeline.
5. For continuously refreshed **post** candidates, use [Reddit Post Monitor Lite](https://apify.com/fetch_cat/reddit-post-monitor-lite) with scheduled runs and cross-run deduplication, then send selected post URLs back to Reddit Scraper when comments are needed.

**Important:** this Actor does not score training quality, label reactions, generate embeddings, fine-tune models, or write to a vector database by itself. Reddit scores can change, and popularity is not a substitute for relevance, consent, safety, or bias review. Process public content only where your use is lawful and consistent with applicable terms.

#### Example: collect high-signal posts and comments

```json
{
  "urls": ["https://www.reddit.com/r/MachineLearning/top/?t=year"],
  "sort": "top",
  "timeFilter": "year",
  "maxPostsPerSource": 100,
  "includeComments": true,
  "maxCommentsPerPost": 50,
  "commentContextDepth": 2
}
```

This preserves available Reddit engagement metadata for downstream ranking; it does not guarantee that every item has a score or that the resulting data is suitable for training.

### What data can you collect?

The Actor returns public Reddit post rows and, when enabled, comment rows.

| Field | Description |
| --- | --- |
| `type` | Row type, such as post or comment |
| `id` | Reddit item identifier |
| `subreddit` | Subreddit name |
| `author` | Public Reddit username when available |
| `title` | Post title |
| `text` | Post or comment text |
| `url` | External URL or Reddit URL |
| `permalink` | Reddit permalink |
| `createdAt` | Public creation timestamp |
| `score` | Public score when available |
| `numComments` | Public comment count for posts |
| `upvoteRatio` | Upvote ratio when available |
| `flair` | Post flair when available |
| `parentId` | Parent post or comment ID for comments |
| `depth` | Comment depth when available |
| `sourceUrl` | Input or resolved Reddit source URL |
| `scrapedAt` | Timestamp when the row was saved |

### Pricing

This Actor uses Apify pay-per-event pricing. The prices below come from the current Actor pricing configuration. Apify public plans map to Store discount tiers, so the table shows both the user-facing plan context and the pricing tier name. The final price shown in Apify depends on the user account plan and any custom agreement.

| Event | What is charged | Price |
| --- | --- | ---: |
| `start` | One-time fee per run | $0.005 |

| Event | What is charged | Free / no discount | Starter / Bronze | Scale / Silver | Business / Gold | Custom / Platinum | Custom / Diamond |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |
| `item` | Charged per Reddit post record extracted. | $0.1329 / 1,000 | $0.11557 / 1,000 | $0.09014 / 1,000 | $0.06934 / 1,000 | $0.04623 / 1,000 | $0.03236 / 1,000 |
| `comment` | Charged per Reddit comment record extracted. | $0.000575 / 1 comment | $0.0005 / 1 comment | $0.00039 / 1 comment | $0.0003 / 1 comment | $0.0002 / 1 comment | $0.00014 / 1 comment |

Apify may also charge platform usage for compute, storage, proxies, or data transfer outside this Actor pricing. Check the Actor run and the Apify Pricing tab for the exact cost shown to your account.

### Input configuration

| Setting | JSON key | Use it for | Example |
| --- | --- | --- | --- |
| Reddit URLs | `urls` | Subreddit, user, search, or post URLs. | `["https://www.reddit.com/r/apify/"]` |
| Search query | `searchQuery` | Keyword search across Reddit or inside one subreddit. | `web scraping` |
| Search subreddit | `searchSubreddit` | Restrict search to one subreddit. | `SaaS` |
| Sort order | `sort` | Reddit sort mode for listings or search. | `new` |
| Time filter | `timeFilter` | Time window for search/listing where supported. | `week` |
| Maximum posts per source | `maxPostsPerSource` | Cap saved post rows per input source. | `25` |
| Include comments | `includeComments` | Collect bounded public comments for matching posts. When Reddit's public JSON route is reachable, comments include parent/depth metadata; RSS fallback comments may not prove full tree depth. | `false` |
| Maximum comments per post | `maxCommentsPerPost` | Cap saved comment rows per post. This is a scope and cost cap, not a guarantee that every comment in a large thread is reachable. | `50` |
| Comment URL mode | `commentContextMode` | Control comment context collection for post URLs. | `auto` |
| Comment context depth | `commentContextDepth` | Limit nested comment depth when supported. | `2` |
| Retry attempts per Reddit request | `retryCount` | Retry failed Reddit requests. | `3` |
| Initial retry delay | `initialRetryDelayMillis` | Set the base backoff delay after temporary Reddit errors. | `750` |
| Request pacing delay | `requestPacingMillis` | Add delay between requests for stability. | `250` |
| Safe run deadline | `runTimeSecs` | Stop starting new Reddit requests before timeout so partial data can be saved. | `260` |
| MCP connectors | `mcpConnectors` | Optional Apify MCP connectors for post-run delivery. | `[]` |
| MCP delivery mode | `mcpMode` | Choose off, summary, or records delivery. | `off` |
| MCP instruction | `mcpInstruction` | Short delivery instruction for selected connectors. | `Send a concise digest.` |
| Maximum MCP records | `maxMcpRecords` | Cap sample records sent through MCP. | `20` |
| Proxy configuration | `proxyConfiguration` | Optional Apify Proxy settings. | `{"useApifyProxy":true}` |

### Example input

```json
{
  "urls": ["https://www.reddit.com/r/apify/"],
  "searchQuery": "web scraping",
  "sort": "new",
  "timeFilter": "week",
  "maxPostsPerSource": 25,
  "includeComments": false
}
```

### Example output

```json
{
  "type": "post",
  "id": "abc123",
  "subreddit": "apify",
  "author": "example_user",
  "title": "Example Reddit post",
  "text": "Public Reddit post text...",
  "url": "https://www.reddit.com/r/apify/comments/abc123/example/",
  "permalink": "https://www.reddit.com/r/apify/comments/abc123/example/",
  "createdAt": "2026-07-03T10:00:00.000Z",
  "score": 42,
  "numComments": 8,
  "sourceUrl": "https://www.reddit.com/r/apify/",
  "scrapedAt": "2026-07-03T12:00:00.000Z"
}
```

### How to run it

1. Open the Actor on Apify.
2. Add Reddit URLs, a search query, or both.
3. Choose sort, time filter, and limits.
4. Decide whether to include comments.
5. Start the run and export the dataset.

### Search tips

- **Start with posts only**: Add comments after you verify the post search is relevant.
- **Use focused subreddits**: Subreddit-specific searches usually produce cleaner monitoring datasets.
- **Limit comments carefully**: Comment extraction can create many rows and higher costs.
- **Use pacing for stability**: Larger runs benefit from moderate request pacing and retries.
- **Schedule narrow queries**: Monitoring works best with specific keywords, subreddits, and time filters.

### Limits and caveats

- The Actor extracts publicly visible Reddit data only.
- It does not access private communities, removed content, mod-only data, logged-in feeds, or quarantined content that requires login.
- Scores and counts can be null or change after scraping.
- Reddit may return fewer items than requested for narrow queries, private sources, or unavailable content.

### API usage

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~reddit-scraper/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"searchQuery":"web scraping","sort":"new","timeFilter":"week","maxPostsPerSource":25}'
```

Node.js example:

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/reddit-scraper').call({
  searchQuery: 'web scraping',
  sort: 'new',
  maxPostsPerSource: 25,
});
console.log(run.defaultDatasetId);
```

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('fetch_cat/reddit-scraper').call(run_input={
    'searchQuery': 'web scraping',
    'sort': 'new',
    'maxPostsPerSource': 25,
})
print(run['defaultDatasetId'])
```

### MCP and AI agents

This Actor can be used through the official Apify MCP server at `https://mcp.apify.com`.

For Claude CLI, add the focused single-Actor tool:

```bash
claude mcp add apify-reddit-scraper -- npx -y mcp-remote https://mcp.apify.com?tools=fetch_cat/reddit-scraper
```

For JSON-based MCP clients, use:

```json
{
  "mcpServers": {
    "apify-reddit-scraper": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=fetch_cat/reddit-scraper"]
    }
  }
}
```

Example prompts:

- "Run Reddit Scraper for r/apify newest posts and summarize the top discussions."
- "Collect 10 Reddit posts about web scraping with comments enabled and return a CSV link."
- "Monitor this Reddit thread URL and list the first public comments you can retrieve."

Use the same JSON keys shown in the input configuration table, such as `urls`, `searchQuery`, `searchSubreddit`, `maxPostsPerSource`, `includeComments`, and `maxCommentsPerPost`.

### FAQ

#### Does this Actor need Reddit API credentials?

No. It targets public Reddit pages and public discussion data.

#### Can it scrape private communities?

No. Private, restricted, quarantined, or login-gated content is outside this Actor's public-data scope.

#### Can it collect every comment in a large thread?

Not always. Reddit can limit or block the public routes available to a run. The Actor returns bounded public comments when reachable, includes parent/depth fields when Reddit exposes them, and uses `maxCommentsPerPost` to control scope, cost, and reliability.

#### Can I export to CSV or Excel?

Yes. Apify datasets can be downloaded as CSV, JSON, Excel, XML, RSS, HTML, or accessed through the API.

### Related scrapers

- [Reddit Post Monitor Lite](https://apify.com/fetch_cat/reddit-post-monitor-lite) — discover new matching posts on a schedule, deduplicate across runs, and pass selected URLs here for comment collection.
- [Hacker News Search Scraper](https://apify.com/fetch_cat/hacker-news-search-scraper)
- [Substack Posts Scraper](https://apify.com/fetch_cat/substack-posts-scraper)
- [Telegram Channel Posts Scraper](https://apify.com/fetch_cat/telegram-channel-posts-scraper)
- [Product Hunt Scraper](https://apify.com/fetch_cat/product-hunt-scraper)
- [YouTube Comments Scraper](https://apify.com/fetch_cat/youtube-comments-scraper)

### Support

If a run fails, returns no data, or a field looks wrong, open an issue from the Actor page.

Please include the Apify run ID or run URL, input JSON, one example public URL, query, or input item, what you expected, and what the dataset returned. Small reproducible inputs make parsing or site-layout issues much faster to fix.

### Privacy and data handling

This Actor runs with Apify limited permissions and only processes data needed for the documented run. It uses content lookup inputs and public posts, profiles, videos, comments, or channel metadata needed for the requested output to produce the output dataset and sends requests to public Reddit pages/endpoints; results are stored in Apify run storage for your account. FetchCat does not use your inputs or outputs for advertising, does not use them for model training, and does not retain them outside the Apify run except for transient support debugging when you explicitly share run details. You are responsible for using the Actor lawfully, respecting the target site's terms, and avoiding unnecessary personal or sensitive data in inputs.

# Actor input Schema

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

Subreddit, post, comment, user profile, or Reddit search URLs to scrape.

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

Optional Reddit search query. Used with global Reddit search unless Search subreddit is filled.

## `searchSubreddit` (type: `string`):

Optional subreddit name for restricting searchQuery, for example technology or webscraping.

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

Sort mode for subreddit listings and search feeds.

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

Time window for top/search RSS feeds.

## `maxPostsPerSource` (type: `integer`):

Maximum requested post records per source. Public Reddit RSS returns only its currently available feed batch and may provide fewer than this value.

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

Fetch comments for discovered post URLs using Reddit comments RSS. Best-effort and limited by maxCommentsPerPost.

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

Maximum number of comment records to save per post when comments are enabled.

## `commentContextMode` (type: `string`):

For comment URLs, fetch the focused context when Reddit RSS supports it, otherwise fetch the post comment feed.

## `commentContextDepth` (type: `integer`):

Context depth parameter for focused comment RSS URLs.

## `retryCount` (type: `integer`):

Maximum retry attempts for Reddit RSS requests after rate limits, proxy resets, or temporary server errors.

## `initialRetryDelayMillis` (type: `integer`):

Base delay for exponential backoff after Reddit rate limits or proxy errors. Retry-After headers are respected when Reddit sends them.

## `requestPacingMillis` (type: `integer`):

Minimum delay between Reddit RSS requests. Increase this for large comment-heavy runs if Reddit returns 429 or proxy errors.

## `runTimeSecs` (type: `integer`):

Stops starting Reddit requests before the platform timeout so partial records and diagnostics can be saved cleanly.

## `mcpConnectors` (type: `array`):

Connector(s) this Actor may use after scraping, such as Slack, Notion, Supabase, or another MCP-compatible destination. The actor discovers tools at runtime and only calls safe send/post/write/create/insert/append/log-style tools.

## `mcpMode` (type: `string`):

Off by default. Choose Summary to send only a compact run digest, or Records to include capped sample records after saving the dataset.

## `mcpInstruction` (type: `string`):

Short instruction for the selected connector, for example: Send a digest to #social-listening. Do not paste API keys or third-party credentials here.

## `maxMcpRecords` (type: `integer`):

Maximum number of scraped records included when MCP delivery mode sends records. The full dataset remains available separately.

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

Proxy settings. Residential Apify Proxy is recommended because Reddit often rate-limits shared datacenter traffic.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.reddit.com/r/technology/"
    },
    {
      "url": "https://www.reddit.com/r/webscraping/"
    }
  ],
  "searchQuery": "web scraping tools",
  "searchSubreddit": "technology",
  "sort": "hot",
  "timeFilter": "week",
  "maxPostsPerSource": 20,
  "includeComments": false,
  "maxCommentsPerPost": 10,
  "commentContextMode": "focused",
  "commentContextDepth": 3,
  "retryCount": 4,
  "initialRetryDelayMillis": 750,
  "requestPacingMillis": 750,
  "runTimeSecs": 260,
  "mcpMode": "off",
  "mcpInstruction": "Send a concise Reddit monitoring digest to #social-listening.",
  "maxMcpRecords": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

No description

## `runSummary` (type: `string`):

No description

## `mcpDeliveryStatus` (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 = {
    "urls": [
        {
            "url": "https://www.reddit.com/r/technology/"
        },
        {
            "url": "https://www.reddit.com/r/webscraping/"
        }
    ],
    "searchQuery": "web scraping tools",
    "searchSubreddit": "technology",
    "mcpInstruction": "Send a concise Reddit monitoring digest to #social-listening."
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/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 = {
    "urls": [
        { "url": "https://www.reddit.com/r/technology/" },
        { "url": "https://www.reddit.com/r/webscraping/" },
    ],
    "searchQuery": "web scraping tools",
    "searchSubreddit": "technology",
    "mcpInstruction": "Send a concise Reddit monitoring digest to #social-listening.",
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/reddit-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    {
      "url": "https://www.reddit.com/r/technology/"
    },
    {
      "url": "https://www.reddit.com/r/webscraping/"
    }
  ],
  "searchQuery": "web scraping tools",
  "searchSubreddit": "technology",
  "mcpInstruction": "Send a concise Reddit monitoring digest to #social-listening."
}' |
apify call fetch_cat/reddit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fetch_cat/reddit-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DAj0KBMoCNDqMLe82/builds/M7hd4iyghS9FVC7bP/openapi.json
