# Reddit Search Scraper - Keyword & Brand Monitoring ($1.5/1k) (`harshmaur/reddit-search-scraper`) Actor

Search Reddit by keyword and scrape every matching post, comment, and subreddit. Monitor brand mentions, track topics, and find leads with sort and time-range filters — all of Reddit or one community. No API key, no login. Export CSV/Excel/JSON. From $1.50 per 1,000 results.

- **URL**: https://apify.com/harshmaur/reddit-search-scraper.md
- **Developed by:** [Harsh Maur](https://apify.com/harshmaur) (community)
- **Categories:** AI, Social media, Agents
- **Features:** Limited permissions
- **Stats:** 326 total users, 109 monthly users, 99.7% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.50 / 1,000 result saveds

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/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 Search Scraper — Search Reddit by Keyword & Scrape the Results (No API Key)

**The Reddit keyword search scraper: turn any search term into structured posts, comments, and subreddits. No login, no API key, no rate limits — from $1.50 per 1,000 results.**

[![Try on Apify](https://img.shields.io/badge/Apify-Try%20Now-00C7B7?style=for-the-badge\&logo=apify)](https://apify.com/harshmaur/reddit-search-scraper) [![Input Schema](https://img.shields.io/badge/Input-Schema-blue?style=for-the-badge)](https://apify.com/harshmaur/reddit-search-scraper/input-schema) [![API Docs](https://img.shields.io/badge/API-Docs-orange?style=for-the-badge)](https://apify.com/harshmaur/reddit-search-scraper/api)

[What it does](#what-does-reddit-search-scraper-do) • [How to use](#how-to-search-reddit-by-keyword-step-by-step) • [Input](#input-example-reddit-keyword-monitoring) • [Limits](#search-limits-max-is-a-cap-not-a-quota) • [Output](#output-example) • [Use cases](#what-can-you-do-with-scraped-reddit-search-results) • [Pricing](#how-much-does-reddit-search-scraper-cost) • [FAQ](#faq)

***

### What does Reddit Search Scraper do?

**Reddit Search Scraper** is built around one job: you give it keywords, it runs each one as a [Reddit](https://www.reddit.com/) search and saves everything that matches as clean, structured data. Each term can return **posts** (the default), **comments**, and **communities (subreddits)** — pick any combination per run.

You stay in control of how Reddit ranks the matches: sort by **relevance, hot, top, new, or comment count**, and narrow the window from the **last hour** all the way out to **all time**. Want laser focus instead of site-wide coverage? Point `withinCommunity` at a single subreddit (`gaming` and `r/gaming` both work) and the search never leaves it. You can even flip on `crawlCommentsPerPost` to pull the discussion under every post the search finds.

There is **no Reddit account, no OAuth app, and no API key** involved — the scraper reads public Reddit directly and sidesteps the official API's 600-requests-per-10-minutes ceiling. Results land in your Apify dataset ready to export as **JSON, CSV, Excel, XML, or HTML**, or to flow into **n8n, Zapier, Make, the REST API, or MCP-connected AI agents**.

#### What a keyword search returns

Each hit is one dataset row. `dataType` tells you the shape:

- **`post`** (on by default) — submissions that match the keyword
- **`comment`** — matching comments with thread context, when `searchComments` is on
- **`community`** — subreddits whose name or description matches, when `searchCommunities` is on

Enable any mix in one run. This listing is **keyword search only** — paste post or subreddit URLs into the all-in-one [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper) instead.

***

### How to search Reddit by keyword (step by step)

Going from a keyword to a downloadable dataset takes about a minute:

1. [Sign up for Apify](https://apify.com/) for free, or log in to your existing account
2. Open [Reddit Search Scraper](https://apify.com/harshmaur/reddit-search-scraper)
3. Add one or more **Search keywords** — each one runs as its own independent Reddit search
4. Tick what you want back: **posts** (on by default), **comments**, and/or **communities**
5. Pick a **sort order** (relevance / hot / top / new / comments) and a **time range** (last hour → all time)
6. Optionally fill **Search inside one subreddit (name)** to stay inside one subreddit
7. Hit **Start**, then grab your results as JSON, CSV, or Excel from the dataset tab

> 💡 Every saved item carries the `searchTerm` that produced it, so multi-keyword runs are trivial to split apart afterwards.

**Fine-tuning knobs:** `maxPostsCount`, `maxCommentsCount`, and `maxCommunitiesCount` are per-keyword **caps** (never more than N stored; `0` turns that type off). `crawlCommentsPerPost` + `maxCommentsPerPost` add the comment thread under each matched post; `includeNSFW` opts into 18+ content (off by default).

***

### Input example: Reddit keyword monitoring

A classic reddit brand monitoring setup — watch a brand name across all of Reddit, freshest mentions first, restricted to the past week:

```json
{
  "searchTerms": ["Notion", "Notion AI"],
  "searchPosts": true,
  "searchComments": true,
  "searchCommunities": false,
  "searchSort": "new",
  "searchTime": "week",
  "maxPostsCount": 100,
  "maxCommentsCount": 200,
  "includeNSFW": false
}
```

To keep the same watchlist inside one community, add `"withinCommunity": "r/productivity"` — the search then runs only against that subreddit. The scraper also collects the comment thread under each matching post, because `crawlCommentsPerPost` is on by default. Each of those comments is a billed result. Set `"crawlCommentsPerPost": false` to skip them, or lower `"maxCommentsPerPost"` (default 200).

**Keyword inside one subreddit:**

```json
{
  "searchTerms": ["Notion"],
  "withinCommunity": "r/productivity",
  "searchPosts": true,
  "searchSort": "top",
  "searchTime": "month",
  "maxPostsCount": 50
}
```

***

### Search limits: max is a cap, not a quota

`maxPostsCount`, `maxCommentsCount`, and `maxCommunitiesCount` are **per-keyword ceilings**. `maxPostsCount: 50` means *up to* 50 posts for that term — never more, and often fewer.

They are not a billed allowance you prepaid. Set a type's max to `0` to switch that type off.

Reddit itself returns at most about **1,000 hits per keyword**. A high cap (the input schema allows up to 50,000) cannot pull more than that search window. Use a tighter keyword or `withinCommunity` when you need older or deeper matches; a broad term with `searchTime: "all"` still stops around Reddit's window.

***

### Output example

Every match is saved as a flat JSON object with a `dataType` discriminator (`post`, `comment`, or `community`). Here's a post item found by a keyword search:

```json
{
  "dataType": "post",
  "id": "t3_1kx94qe",
  "parsedId": "1kx94qe",
  "title": "Switched our whole team to Notion AI — honest review after 3 months",
  "body": "We migrated from a mix of Confluence and Google Docs back in March...",
  "postType": "text",
  "flair": "Review",
  "authorName": "ops_lead_42",
  "authorId": "t2_9k3mfa",
  "parsedAuthorId": "9k3mfa",
  "communityName": "r/productivity",
  "parsedCommunityName": "productivity",
  "subredditName": "productivity",
  "subredditId": "t5_2qkq6",
  "subredditSubscribers": 2890000,
  "postUrl": "https://www.reddit.com/r/productivity/comments/1kx94qe/",
  "url": "https://www.reddit.com/r/productivity/comments/1kx94qe/",
  "score": 847,
  "upVotes": 847,
  "upvoteRatio": 0.94,
  "commentsCount": 213,
  "totalAwardsReceived": 1,
  "nsfw": false,
  "over18": false,
  "isSelf": true,
  "locked": false,
  "stickied": false,
  "edited": false,
  "domain": "self.productivity",
  "mediaType": "text",
  "hasMedia": false,
  "isVideo": false,
  "isGallery": false,
  "ageHours": 52.4,
  "scorePerHour": 16.16,
  "commentsPerHour": 4.06,
  "engagementTotal": 1060,
  "commentToScoreRatio": 0.25,
  "isHighEngagement": true,
  "titleLength": 62,
  "bodyLength": 1845,
  "wordCount": 322,
  "createdAt": "2026-06-07T09:14:00.000Z",
  "crawledAt": "2026-06-09T13:38:00.000Z",
  "searchTerm": "Notion AI"
}
```

Posts arrive with 70+ fields in total — including media details (`galleryImages`, `mediaAssets`, `videoUrl`), moderation flags, and derived engagement analytics. Comment items add thread context (`postTitle`, `parentId`, `depth`, `controversiality`, `isSubmitter`), and community items report `membersCount`, `onlineUsersCount`, descriptions, and icons.

***

### What can you do with scraped Reddit search results?

- 🔔 **Reddit brand monitoring** — track keywords on Reddit like your brand, product names, and common misspellings; sort by `new`, schedule the run, and catch every mention while it's still answerable.
- 🎯 **Lead generation** — search phrases your buyers actually type ("looking for a CRM", "alternative to X") and surface threads where a helpful reply can win a customer.
- 📊 **Market research** — pull unfiltered opinions on a product category from across Reddit or inside one niche subreddit, then mine the `body` text for pain points and feature requests.
- 📈 **Trend tracking** — re-run the same keywords on a schedule with `searchTime: "day"` and watch `score`, `commentsCount`, and `scorePerHour` to spot topics gaining momentum before they peak.
- ✍️ **Content discovery** — find the top-voted questions and discussions around your topic (`searchSort: "top"`) to fuel blog posts, videos, and FAQ pages people already want.

***

### Turn Reddit search results into qualified leads with AI

Keyword search finds the threads; the AI add-on tells you which ones are worth a reply. With **`aiAnalysis`** on, each post and comment that matches your keywords carries `sentimentLabel`, `sentimentScore`, `intent`, `emotion`, `entities`, and, because these results came from a search, a `relevanceScore` from 0 to 1 against your exact query. Reddit's own search is loose on long phrases, and sorting by that column drops the noise.

The **AI flag checkboxes** are the lead-qualification questions typed out for you: `wantsHelp` (they are looking for a solution), `willingToPay` (a budget or quote is on the table), `isOwner` (the author runs a business), `hasPain`, `mentionsPrice`, `featureRequest`, `isVendor`, plus the two extractions `painPoint` and `competitor`. Answers are typed fields inside `aiFlags` on every result, so a lead list is `intent = seeking_recommendation AND aiFlags.willingToPay = true`, nothing more. Any ticked flag also switches `aiAnalysis` on.

For niche criteria, **`customLabels`** lets you add up to five of your own questions in plain English, e.g. `{"is_uk": "true if the author is in the UK or mentions GBP"}`, returned under `customLabels`.

```json
{
  "searchTerms": ["crm for small agency", "hubspot alternative"],
  "searchSort": "new",
  "searchTime": "month",
  "aiAnalysis": true,
  "wantsHelp": true,
  "willingToPay": true,
  "competitor": true
}
```

### How much does Reddit Search Scraper cost?

Billing is **pay per result** — there is no subscription and no platform markup. You're charged a small fee to start the run plus a per-item fee for every result stored:

- **Run start:** $0.02
- **Per stored result:** $0.0015

That works out to **$1.52 for 1,000 results**, $15.02 for 10,000, and so on — roughly **from $1.50 per 1,000 results**, with zero cost between runs. A daily keyword-monitoring schedule that saves 50 mentions per day costs about $0.10/day.

Keep runs cheap by tuning `maxPostsCount` / `maxCommentsCount` per search term: you only pay for what gets stored. A `maxPostsCount` of 1,000 is a ceiling — if the keyword only matches 80 posts, you are billed for 80 stored results plus the start fee, not 1,000.

***

The AI fields are a paid add-on: **$0.50 per 1,000 analyzed results** for `aiAnalysis`, and **$0.10 per 1,000 results per AI flag or custom label**. Paid Apify plans only, off by default, and results the AI could not process are not billed.

### FAQ

#### Do I need a Reddit API key or account?

No. Reddit Search Scraper reads publicly visible search results directly, so there's nothing to register: no API key, no OAuth app, no Reddit login. It also isn't bound by the official API's 600 requests per 10 minutes limit.

#### Can I monitor a keyword on Reddit over time?

Yes — this is the actor's sweet spot. Configure your keywords with `searchSort: "new"` and a short window like `searchTime: "day"`, then create a **Schedule** in the Apify Console to re-run it hourly or daily. Pair it with a webhook or an n8n/Zapier/Make flow and new mentions land in Slack, a spreadsheet, or your CRM automatically.

#### Can I search within a single subreddit?

Yes. Set `withinCommunity` to the subreddit — plain name (`gaming`) or prefixed (`r/gaming`) both work — and every search term runs only inside that community. Leave it empty to search all of Reddit.

#### What's the difference between searching for posts, comments, and communities?

They're three independent toggles. `searchPosts` (default on) returns submissions that match your keywords, `searchComments` (default on) returns individual matching comments with their thread context, and `searchCommunities` returns subreddits whose name or description matches. Enable any mix in one run; the `dataType` field tells each item apart.

#### Can I also get the comments under each post the search finds?

Yes, and it is on by default. With `crawlCommentsPerPost` on, the scraper visits every matched post and collects its comment thread, up to `maxCommentsPerPost` (default 200). Each comment is billed as one result, so expect longer runs and a higher cost. Turn it off when you only need the posts.

#### How do the sort and time filters work?

`searchSort` mirrors Reddit's own search ranking: `relevance`, `hot`, `top`, `new`, or `comments`. `searchTime` constrains results to the `hour`, `day`, `week`, `month`, `year`, or `all` time. For monitoring, `new` + a tight window works best; for research, `top` + `year` or `all` surfaces the canonical threads.

#### Can I pull results for an exact date range, like a past calendar year?

Use `postedAfter` / `postedBefore` (and `commentedAfter` / `commentedBefore` for comments) with `YYYY-MM-DD` dates or ISO-8601 timestamps in UTC. These define an absolute window, which `searchTime` cannot — its `year` option means the trailing 12 months, not 2025. With a date range set, the scraper searches newest-first and stops once it reads past your start date. Keep in mind Reddit returns at most ~1,000 results per keyword, so pairing the date range with a focused keyword (and `withinCommunity`) is what lets you reach further into the past.

#### Can I keep only flaired posts?

Turn on `onlyWithFlair` to discard search hits that have no flair and keep only the ones tagged with a flair. Combine it with a keyword and `withinCommunity` to pull, say, only the "Discussion"-style categorized posts from a community. Each kept result still includes its `flair` field.

#### How many results can I get per keyword?

Each search term gets its own **cap**: up to `maxPostsCount` posts (default 50, schema maximum 50,000), `maxCommentsCount` comments, and `maxCommunitiesCount` subreddits. That number is a ceiling, not a quota Reddit will fill. Set a limit to `0` to switch that result type off. Reddit's own search window is about 1,000 hits per keyword, so a cap above that does not guarantee more rows.

#### Why is the dataset empty, or smaller than my max?

The `max*` fields stop extra rows from being stored; they do not invent matches.

Work through this list:

1. **Keyword + `searchTime`** — a rare phrase with `hour` or `day` often returns nothing. Try `week` or `all`, or a shorter term.
2. **`withinCommunity`** — if that subreddit barely uses the phrase, clear the field to search all of Reddit.
3. **NSFW** — 18+ hits are excluded unless `includeNSFW` is on.
4. **A max of `0`** — that type is switched off.
5. **Date filters** — `postedAfter` / `postedBefore` drop hits outside the window, and Reddit's ~1,000-result cap can sit in front of an old range.
6. **`onlyWithFlair`** — drops every unflaired post.

This actor does not scrape pasted Reddit URLs. A `/r/…/comments/…` link belongs on [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper). If the dataset is still empty, open the run's **Issues** tab.

#### Which export formats and integrations are supported?

Datasets download as **JSON, CSV, Excel, XML, or HTML** straight from Apify. For automation, trigger and consume runs via **n8n, Zapier, Make, or the REST API** — and MCP-compatible AI agents (Claude, ChatGPT, Cursor) can call the actor as a tool through the [Apify MCP server](https://mcp.apify.com/).

#### Do I need to choose a build version for scheduled searches?

No. Keep the default `latest` tag in your schedule, task or API call. A keyword monitor that names a fixed build number keeps old code that Reddit can block. It stops with `build-not-found` when we remove that build.

***

#### Can the scraper score how relevant each result is to my keyword?

With `aiAnalysis` on, every search result gets a `relevanceScore` between 0 and 1 for your exact query, alongside sentiment and intent. Filter to results above 0.7 and Reddit's loose keyword matching stops being a problem. Add the `wantsHelp` and `willingToPay` checkboxes to surface buyers directly.

### More Reddit scrapers

Searching by keyword is just one way in. If your starting point is a URL, a user, or a whole community, one of these siblings will fit better:

| Actor | When to use it instead |
| --- | --- |
| [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper) | The all-in-one: combine keyword search, direct post/profile/subreddit URLs, and full-subreddit crawls in a single run. |
| [Reddit Comments Scraper](https://apify.com/harshmaur/reddit-comments-scraper) | You already have post URLs and want every comment in the thread, nested replies included. |
| [Reddit User Scraper](https://apify.com/harshmaur/reddit-user-scraper) | You're profiling specific Redditors — karma, account age, and their post/comment history. |
| [Subreddit Scraper](https://apify.com/harshmaur/reddit-subreddit-scraper) | You want a community's full post archive rather than keyword matches. |

***

[![Try Reddit Search Scraper](https://img.shields.io/badge/🚀_Try_Reddit_Search_Scraper-00C7B7?style=for-the-badge)](https://apify.com/harshmaur/reddit-search-scraper)

*Built by [Harsh Maur](https://github.com/harshmaur) • Questions? [Contact support](mailto:harshmaur@gmail.com)*

# Actor input Schema

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

Enter one or more keywords to search Reddit (e.g. "best laptops 2026", "AI news"). Each keyword runs as a separate search. Free Apify plans search the first 40 keywords per run (paid plans are unlimited) — extra keywords are skipped and noted in the run log. Quoted phrases return fewer posts, especially inside one community.

## `searchPosts` (type: `boolean`):

Include posts in search results.

## `searchComments` (type: `boolean`):

Include comments in search results. Each comment is a billed result (up to 'Max comments' per search).

## `searchCommunities` (type: `boolean`):

Include communities (subreddits) in search results.

## `withinCommunity` (type: `string`):

Restrict the search to a single subreddit name (not a post limit), e.g. gaming or r/gaming. Leave empty to search all of Reddit.

## `searchSort` (type: `string`):

Controls how search results are ranked.

## `searchTime` (type: `string`):

Limit results to posts from a specific time window.

## `aiAnalysis` (type: `boolean`):

Adds AI-judged fields to posts and comments: `sentimentLabel` (positive / negative / neutral / mixed / uncertain), `sentimentScore` (-1 to 1), `intent` (question, seeking_recommendation, complaint, praise, purchase_intent, comparison, announcement, self_promotion, discussion), `emotion` (joy, excitement, anger, frustration, sadness, disappointment, fear, surprise, neutral), `entities` (brands, products and companies mentioned), and — for keyword-search results — `relevanceScore` (0 to 1). Posts also receive a `contentCategory`. The model understands Reddit slang and sarcasm; bot and moderator boilerplate is labelled `uncertain` free of charge. Each analyzed result is billed once as an `analyzed_item` event — see the Pricing tab. Requires a paid Apify plan and is ignored on free plans.

## `wantsHelp` (type: `boolean`):

Adds `aiFlags.wantsHelp` (true/false) to every analyzed post and comment: true when the author is looking for a product, service, or person to solve their problem — the classic lead signal. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `isOwner` (type: `boolean`):

Adds `aiFlags.isOwner` (true/false) to every analyzed post and comment: true when the author founded, owns, or operates a business (not a customer or employee). Billed as one `custom_label` event per result ($0.10 per 1,000).

## `isVendor` (type: `boolean`):

Adds `aiFlags.isVendor` (true/false) to every analyzed post and comment: true when the author is selling, promoting, or recruiting testers for their own product or service. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `hasPain` (type: `boolean`):

Adds `aiFlags.hasPain` (true/false) to every analyzed post and comment: true when the author describes a problem, a failed tool, or something not working. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `mentionsPrice` (type: `boolean`):

Adds `aiFlags.mentionsPrice` (true/false) to every analyzed post and comment: true when the text mentions a price, fee, retainer, subscription cost, or money spent. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `featureRequest` (type: `boolean`):

Adds `aiFlags.featureRequest` (true/false) to every analyzed post and comment: true when the author asks for or describes a feature or product that does not exist yet. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `willingToPay` (type: `boolean`):

Adds `aiFlags.willingToPay` (true/false) to every analyzed post and comment: true when the author names a budget, asks for a quote, or says they would pay. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `painPoint` (type: `boolean`):

Adds `aiFlags.painPoint` (text) to every analyzed post and comment: the problem or unmet need in under 15 words, or none. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `competitor` (type: `boolean`):

Adds `aiFlags.competitor` (text) to every analyzed post and comment: the competing product, brand, or tool mentioned, or none. Billed as one `custom_label` event per result ($0.10 per 1,000).

## `postedAfter` (type: `string`):

Only keep posts created on or after this date. Accepts YYYY-MM-DD (e.g. 2025-01-01) or a full ISO-8601 datetime, interpreted as UTC, or a relative value counted back from the run start, e.g. '1 day' for a daily schedule. When set, results are fetched newest-first and the Time range above is ignored. Reddit caps each search at ~1,000 posts, so an older window behind a very high-volume keyword may be only partly reachable.

## `postedBefore` (type: `string`):

Only keep posts created on or before this date. Accepts YYYY-MM-DD (e.g. 2025-12-31) or a full ISO-8601 datetime; a plain date covers the whole day in UTC. A relative value such as '1 day' keeps only posts at least one day old.

## `commentedAfter` (type: `string`):

Only keep comments created on or after this date (YYYY-MM-DD or ISO-8601, UTC), or within a relative period such as '1 day'. Applies to comment search and to per-post comments.

## `commentedBefore` (type: `string`):

Only keep comments created on or before this date (YYYY-MM-DD or ISO-8601, UTC).

## `onlyWithFlair` (type: `boolean`):

When enabled, keep only posts that have a flair assigned and drop flairless ones.

## `maxPostsCount` (type: `integer`):

Maximum number of posts to save per search (when 'Search for posts' is enabled). Each saved post is a billed result. Reddit search returns up to about 2,000 posts for a busy keyword.

## `maxCommentsCount` (type: `integer`):

Maximum number of comments to save per search (when 'Search for comments' is enabled).

## `maxCommunitiesCount` (type: `integer`):

Maximum number of communities to save per search (when 'Search for communities' is enabled).

## `crawlCommentsPerPost` (type: `boolean`):

When enabled, comments are also collected for every post found. This significantly increases run time and data output. Each comment is a billed result: 50 posts × 200 comments can be 10,000 results.

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

Maximum comments to scrape per individual post (when 'Scrape comments for each post' is enabled). Each comment is a billed result: 50 posts × 200 comments can be 10,000 results.

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

Include posts marked as Not Safe For Work in results.

## `customLabels` (type: `object`):

Define your own labels as `{"label_name": "plain-language instruction"}` and the AI evaluates each one on every analyzed post and comment, returning them under `customLabels` on each result. Example: `{"mentions_pricing": "true if the text complains about pricing or cost", "competitor": "name the competing product mentioned, or none"}`. Up to 5 labels; names must be short identifiers (letters, digits, underscore). The AI flag checkboxes above do not count against this cap. Each label evaluated on each result is billed as one `custom_label` event — 3 labels on 1,000 results = 3,000 events. An evaluation that finds nothing (an empty/null answer, when your instruction allows it) is still an evaluation and is charged; nothing is charged for results the AI could not process. Setting custom labels enables the full AI Analysis on the same items — each labeled result is also billed once as an `analyzed_item`. Paid add-on: requires a paid Apify plan; ignored on free plans.

## Actor input object example

```json
{
  "searchTerms": [
    "artificial intelligence"
  ],
  "searchPosts": true,
  "searchComments": true,
  "searchCommunities": false,
  "withinCommunity": "",
  "searchSort": "new",
  "searchTime": "all",
  "aiAnalysis": false,
  "wantsHelp": false,
  "isOwner": false,
  "isVendor": false,
  "hasPain": false,
  "mentionsPrice": false,
  "featureRequest": false,
  "willingToPay": false,
  "painPoint": false,
  "competitor": false,
  "onlyWithFlair": false,
  "maxPostsCount": 50,
  "maxCommentsCount": 50,
  "maxCommunitiesCount": 5,
  "crawlCommentsPerPost": true,
  "maxCommentsPerPost": 200,
  "includeNSFW": false,
  "customLabels": {}
}
```

# Actor output Schema

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

All scraped Reddit data including posts, comments, communities, and user profiles. Use 'dataType' field to filter by type.

## `runSummaryMap` (type: `string`):

Visual report of this run: how many posts, comments and communities were saved, what was skipped and why, and any input we adjusted for you.

## `runSummaryJson` (type: `string`):

The same run summary as machine-readable JSON, for pipelines and monitoring.

# 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 = {
    "searchTerms": [
        "artificial intelligence"
    ],
    "searchSort": "new",
    "searchTime": "all",
    "maxPostsCount": 50,
    "maxCommentsCount": 50,
    "maxCommunitiesCount": 5,
    "maxCommentsPerPost": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("harshmaur/reddit-search-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 = {
    "searchTerms": ["artificial intelligence"],
    "searchSort": "new",
    "searchTime": "all",
    "maxPostsCount": 50,
    "maxCommentsCount": 50,
    "maxCommunitiesCount": 5,
    "maxCommentsPerPost": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("harshmaur/reddit-search-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 '{
  "searchTerms": [
    "artificial intelligence"
  ],
  "searchSort": "new",
  "searchTime": "all",
  "maxPostsCount": 50,
  "maxCommentsCount": 50,
  "maxCommunitiesCount": 5,
  "maxCommentsPerPost": 200
}' |
apify call harshmaur/reddit-search-scraper --silent --output-dataset

```

## MCP server setup

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