# Reddit Scraper for Leads & Pain Points (`runtime/reddit-scraper`) Actor

Scrape Reddit posts, comments, communities, and profiles for lead research, pain point discovery, social listening, and AI-ready market intelligence workflows.

- **URL**: https://apify.com/runtime/reddit-scraper.md
- **Developed by:** [scraping automation](https://apify.com/runtime) (community)
- **Categories:** Lead generation, Social media
- **Features:** Limited permissions
- **Stats:** 31 total users, 1 monthly users, 75.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $6.50 / 1,000 reddit results

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Reddit Scraper for Leads & Pain Points

> **中文简介 / Chinese summary**
>
> - **功能：** 抓取 Reddit 帖子、评论、社区、用户资料和搜索结果，用于市场调研、线索发现、舆情监测和用户痛点分析。
> - **输入示例：** `{"startLinks":[{"url":"https://www.reddit.com/r/Bonsai/"}],"totalItemCap":20}`
> - **计费：** 按结果付费（pay-per-result），价格见本页 **Pricing** 标签；可设置单次运行最大费用以控制支出。
> - **支持：** 遇到问题请在 **Issues** 标签提交，并附上输入参数和 Run ID。

Scrape Reddit posts, comments, communities, profiles, leaderboards, and search
results for market research, lead discovery, social listening, and pain point
monitoring.

> **Your own residential or mobile proxy is strongly recommended.** Reddit blocks
> shared and datacenter IPs, so without a good proxy many requests return 403 and
> results can fall back to partial data. Add your proxy URLs in
> `proxyConfiguration.proxyUrls` (for example `http://user:pass@host:port`) for the
> most complete and reliable runs.

### Best for

- Founders and growth teams finding repeated pain points and buying intent
- Market researchers monitoring category discussions and competitor mentions
- Community analysts collecting posts, comments, authors, and subreddit context
- AI workflows that need clean source URLs, text, scores, and discussion metadata

### Quick start

Use search mode for a stable lead-research run:

```json
{
  "searchQueries": ["web scraping proxy blocked", "youtube scraper blocked"],
  "searchScope": "posts",
  "sortOrder": "relevance",
  "timeWindow": "month",
  "totalItemCap": 25,
  "postCap": 25,
  "commentCap": 0,
  "lightExtract": true,
  "enableDeduplication": true,
  "failOnNoResults": true,
  "useApifyProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

Use direct URLs when you already know the subreddit, post, profile, or
leaderboard page:

```json
{
  "startLinks": [{ "url": "https://www.reddit.com/r/Bonsai/" }],
  "totalItemCap": 50,
  "postCap": 50,
  "commentCap": 5,
  "scrollWaitSeconds": 1,
  "failOnNoResults": true,
  "useApifyProxy": true
}
```

### Ready-to-run use cases

Copy an input below into the Input tab. All three were run on the live Actor.

#### 1. Pain point monitoring

Find recent complaints about a tool or category. Replace the queries with your
own topic. A published example of this run is on the
[Reddit pain point monitor task](https://apify.com/runtime/reddit-scraper/examples/monitor-reddit-pain-points).

```json
{
  "searchQueries": ["CRM is too slow", "CRM sync problem", "hate our CRM"],
  "searchScope": "posts",
  "sortOrder": "relevance",
  "timeWindow": "month",
  "totalItemCap": 25,
  "postCap": 25,
  "commentCap": 0,
  "lightExtract": true,
  "enableDeduplication": true,
  "includeNSFW": false,
  "failOnNoResults": true,
  "useApifyProxy": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### 2. Buying intent detection

Catch people asking for alternatives or recommendations, newest first. Run it
on a daily schedule to get a fresh lead list.

```json
{
  "searchQueries": [
    "alternative to HubSpot",
    "looking for a CRM recommendation",
    "switching from Salesforce"
  ],
  "searchScope": "posts",
  "sortOrder": "new",
  "timeWindow": "week",
  "totalItemCap": 25,
  "postCap": 25,
  "commentCap": 0,
  "lightExtract": true,
  "enableDeduplication": true,
  "includeNSFW": false,
  "failOnNoResults": true,
  "useApifyProxy": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### 3. Subreddit tracking

Follow the latest posts of one community. Reddit blocks direct subreddit pages
from datacenter IPs, so this input uses residential proxies (available on Apify
plans that include residential proxy).

```json
{
  "startLinks": [{ "url": "https://www.reddit.com/r/Bonsai/" }],
  "totalItemCap": 25,
  "postCap": 25,
  "commentCap": 0,
  "lightExtract": true,
  "enableDeduplication": true,
  "includeNSFW": false,
  "failOnNoResults": true,
  "useApifyProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Common workflows

- **Pain point mining**: search for complaints, blockers, alternatives, and
  recommendations; export `headline`, `textBody`, `permalink`, and scores.
- **Competitor monitoring**: track mentions of competitors across subreddits and
  time windows.
- **Community research**: collect posts and comments from specific subreddits,
  profiles, leaderboards, or multireddits.
- **AI source collection**: keep `sourceInput`, `permalink`, author, subreddit,
  and timestamps for traceable summaries.

### Useful input fields

| Field                                   | Use                                                |
| --------------------------------------- | -------------------------------------------------- |
| `searchQueries`                         | One or more Reddit search queries.                 |
| `searchScope`                           | Search posts or communities.                       |
| `sortOrder`, `timeWindow`               | Control relevance and recency.                     |
| `startLinks`                            | Direct Reddit URLs.                                |
| `totalItemCap`, `postCap`, `commentCap` | Keep costs and runtime bounded.                    |
| `lightExtract`                          | Faster records for lead and pain point monitoring. |
| `enablePagination`                      | Continue beyond first pages when needed.           |
| `useApifyProxy`                         | Recommended for cloud runs.                        |

### Output fields

The dataset can include:

- `headline`
- `textBody`
- `permalink`
- `communityName`
- `communityTag`
- `author`
- `score`
- `voteScore`
- `commentTotal`
- `publishedAt`
- `comments`
- `profileUrl`
- `sourceInput`
- `listingUrl`
- `scrapedAt`

### Settings that convert best

- Prefer focused `searchQueries` over broad subreddit crawls for first runs.
- Start with `lightExtract: true` and `commentCap: 0`.
- Add comments only after the post-level output looks useful.
- Use `failOnNoResults: true` for scheduled monitoring.
- Keep caps explicit so runs cannot grow unexpectedly.

### Limitations

Reddit can block, delay, or alter public responses. The Actor uses fallback
paths, but some records can be partial. Each record has a `source` field:
absent for direct Reddit data, `rss_fallback` for Reddit RSS records, and
`duckduckgo_fallback` for search-engine discovery, which can lack score, date,
and comment data. The run log and status message show how many results came
from fallback paths. Keep source URLs, timestamps, and quality warnings when
feeding results to AI, CRM, or dashboards.

### Support

If a run returns unexpected data, open an issue from the Actor page with the
input used, the run ID, and the result you expected.

# Actor input Schema

## `startLinks` (type: `array`):

Reddit URLs to scrape directly. Supports subreddit, post, user, leaderboard, search, and multireddit URLs. If empty and no search queries are provided, the actor falls back to https://www.reddit.com/r/popular/.

## `searchQueries` (type: `array`):

Keyword searches to run against Reddit search.

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

Choose whether search queries return posts or communities/users.

## `sortOrder` (type: `string`):

Sort order passed to Reddit search.

## `timeWindow` (type: `string`):

Relative time filter for post searches.

## `totalItemCap` (type: `integer`):

Stop the run after this many items have been stored.

## `postCap` (type: `integer`):

Maximum number of posts collected per subreddit, feed, or user. Set to 0 to disable post collection where supported.

## `commentCap` (type: `integer`):

Maximum number of comments collected per post or user. Set to 0 to disable comment collection.

## `communityCap` (type: `integer`):

Maximum number of communities collected from search.

## `profileCap` (type: `integer`):

Maximum number of user profiles collected from community/user search results.

## `leaderboardCap` (type: `integer`):

Maximum number of communities collected from /subreddits/leaderboard.

## `scrollWaitSeconds` (type: `integer`):

Seconds to wait before retrying 403, 429, and connection errors.

## `useApifyProxy` (type: `boolean`):

Enable Apify Proxy when no custom proxy URLs are provided.

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

Advanced Apify Proxy or custom proxy settings. Your own residential or mobile proxy is strongly recommended for Reddit: add custom proxy URLs here. Shared Apify proxies are often blocked with 403 and results can fall back to partial data.

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

Exclude full-extract posts and comments with a lower score. Not applied in light extract mode.

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

When disabled, excludes full-extract posts and communities marked as NSFW. Not applied in light extract mode.

## `logMetrics` (type: `boolean`):

Log duration, throughput, filters, retries, and errors at the end of the run.

## `enablePagination` (type: `boolean`):

Follow Reddit listing pagination via the after cursor until caps are reached or no more pages are available.

## `dateFrom` (type: `string`):

Exclude full-extract items created before this ISO 8601 date. Not applied in light extract mode.

## `dateTo` (type: `string`):

Exclude full-extract items created after this ISO 8601 date. Not applied in light extract mode.

## `enableDeduplication` (type: `boolean`):

Skip duplicate full-extract items by entityId within the same run. Not applied in light extract mode.

## `lightExtract` (type: `boolean`):

Return only permalink, headline, and textBody for posts and comments. Communities, profiles, filters, deduplication, and extendResultFunction are skipped in this mode.

## `failOnNoResults` (type: `boolean`):

Fail the run when no entities are stored after crawl errors. Useful for internal validation and monitoring; leave disabled for normal scraping jobs that may intentionally return empty datasets.

## `extendResultFunction` (type: `string`):

Optional JavaScript function called as async ({ data, page }) => object for full-extract items. Invalid functions fall back to a no-op. Not executed in light extract mode.

## `debugLog` (type: `boolean`):

Enable extra debug logging for fetched URLs and HTTP status codes.

## Actor input object example

```json
{
  "startLinks": [
    {
      "url": "https://www.reddit.com/r/Bonsai/"
    }
  ],
  "searchQueries": [],
  "searchScope": "posts",
  "sortOrder": "relevance",
  "timeWindow": "all",
  "totalItemCap": 20,
  "postCap": 20,
  "commentCap": 25,
  "communityCap": 25,
  "profileCap": 25,
  "leaderboardCap": 25,
  "scrollWaitSeconds": 10,
  "useApifyProxy": true,
  "proxyConfiguration": {},
  "minScore": null,
  "includeNSFW": true,
  "logMetrics": true,
  "enablePagination": false,
  "dateFrom": null,
  "dateTo": null,
  "enableDeduplication": false,
  "lightExtract": false,
  "failOnNoResults": false,
  "extendResultFunction": null,
  "debugLog": 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 = {
    "startLinks": [
        {
            "url": "https://www.reddit.com/r/Bonsai/"
        }
    ],
    "totalItemCap": 20,
    "postCap": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("runtime/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 = {
    "startLinks": [{ "url": "https://www.reddit.com/r/Bonsai/" }],
    "totalItemCap": 20,
    "postCap": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("runtime/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 '{
  "startLinks": [
    {
      "url": "https://www.reddit.com/r/Bonsai/"
    }
  ],
  "totalItemCap": 20,
  "postCap": 20
}' |
apify call runtime/reddit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,runtime/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/T9dfTPh3XgzPpZXgp/builds/blSiMk5v2t5ATaETA/openapi.json
