# Reddit Scraper & Search API: Posts, Users, Subreddits (`parseforge/reddit-posts-scraper`) Actor

Search Reddit and scrape posts, subreddits and users from searches, subreddits or URLs. Filter by date, keywords, score and flair, get only new posts on schedules, and add comments, author activity and subreddit info.

- **URL**: https://apify.com/parseforge/reddit-posts-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 1,626 total users, 73 monthly users, 82.7% runs succeeded, 25 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.31 / 1,000 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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### Reddit Scraper & Search API: Posts, Users, Subreddits & Monitoring

**Search Reddit and scrape posts, subreddits, and users from any search, subreddit, user, or post URL: 500 posts from five subreddits came back in under 5 seconds of scraping in our last test run.** Every post carries its score, comments, upvote ratio, full body text, and computed virality and engagement signals. No login, no Reddit API key, no OAuth app. Export to CSV, JSON, Excel, or XML.

The official Reddit API needs an app registration and OAuth, rate-limits you, and bills high-volume use. This Actor reads Reddit's public feeds and search directly, filters every post by date, keywords, score, flair, and more, and hands back one fixed schema you can load anywhere.

| Who uses it | What they scrape Reddit for |
|---|---|
| Brand and social teams | Reddit monitoring: new mentions of a brand, product, or competitor, run on a schedule |
| Growth marketers | Reddit lead generation: threads where people ask for a recommendation or name a rival |
| Market researchers | Which topics, products, and communities a niche is discussing this week |
| Data scientists | Reddit datasets with body text for sentiment, topic, and RAG models |
| Community managers | Reddit user search and subreddit search to find the right communities and voices |

### What it does

The Actor takes subreddits, search terms, and Reddit URLs (subreddit, search, user, or single post), alone or together, and returns one flat row per result.

- 🧾 **Core fields:** title, author, subreddit, score, upvote ratio, comment count, and posting time.
- 📝 **Full body:** `selfText` as plain text and `selfTextHtml` as rendered HTML.
- 🚩 **Flags:** NSFW, spoiler, stickied, locked, archived, video, gallery, crosspost.
- 📊 **Computed signals:** virality score, engagement rate, controversy score, estimated views, post age, posting day and hour, and content type.
- 🔎 **Reddit search beyond posts:** the same search terms can return communities (subreddit search) and users (Reddit user search) as their own rows.
- ➕ **Optional add-ons**, each off by default: comments with nested replies, author profile, the author's recent activity, subreddit info, crossposts, and image downloads.

### What you can do with Reddit data

**📡 Run Reddit monitoring on a schedule.**

Search your brand and product names every hour with `postedAfter` set to one day and `onlyNewSinceLastRun` on. Each run returns, and bills, only the posts it has not delivered before.

**🎯 Find leads and feedback.**

Search problem phrases and product categories, keep posts that contain your keywords, drop the ones that mention a word you do not want, and read the threads where people ask for a recommendation.

**🧭 Map communities and voices.**

Turn on subreddit search and Reddit user search to list the communities and accounts around a topic, with subscribers, karma, and creation dates.

**📚 Build Reddit datasets and analytics.**

Collect thousands of posts with their body text, comments, and computed scores across subreddits and keywords for sentiment, topic, and trend analysis.

### Why choose this scraper

| | What you get |
|---|---|
| **One run, every source** | Subreddits, search terms, and subreddit, search, user, or post URLs together, all in the same schema. |
| **Filters that cut noise** | Date range, keywords to include or exclude, score, comments, upvote share, flairs, content type, domains, and authors. Only matching posts are written and billed. |
| **Only new posts on schedules** | `onlyNewSinceLastRun` remembers what earlier runs of the same input delivered and skips it. |
| **Signals already computed** | Virality, engagement, controversy, estimated views, and post age on every row, ready to sort. |
| **Bring your existing input** | Inputs written for other Reddit scrapers (`searches`, `subredditUrls`, `maxPostCount`, `listing`, `timeFilter`) work as they are. |
| **Pay only for what you turn on** | Comments, profiles, subreddit info, crossposts, and images are separate add-ons, off by default. |

### How it compares

All four scrapers below read public Reddit posts. This one adds computed ranking signals on every row, a schedule-friendly "only new" mode, and keyword filters, and it costs less per result than the most-used Reddit scraper on Apify. The comparison uses each rival's public input options and Store price on September 17, 2026.

| Feature | ParseForge | trudax/reddit-scraper-lite | harshmaur/reddit-scraper | fatihtahta/reddit-scraper-search-fast |
|---|---|---|---|---|
| Computed virality, engagement, and controversy scores | Yes | No | Reddit's raw controversy flag | No |
| Skips posts delivered by earlier runs | Yes | No | No | No, you deduplicate |
| Keyword filters | Include and exclude | No | No | Include only |
| Date range filter | Yes | From date only | Yes | Yes |
| Subreddit search and user search | Both | Both | Subreddits only | No |
| Comments | Yes, with replies | Yes | Yes, with replies | Yes |
| Price per 1,000 results | $2.60 | $4.00 | $2.00 | $1.49 |

### What a Reddit post looks like

One unedited row from a verified run on September 17, 2026:

```json
{
  "id": "1wis938",
  "parsedId": "1wis938",
  "title": "How do you run a small business with your significant other?",
  "author": "Wandering_mind743",
  "authorId": "t2_2hrklzmhxy",
  "subreddit": "smallbusiness",
  "subredditId": "t5_2qr34",
  "score": 14,
  "upvoteRatio": 0.94,
  "numComments": 23,
  "createdUtc": "2026-09-17T12:11:24.000Z",
  "createdAt": "2026-09-17T12:11:24.000Z",
  "selfText": "My girlfriend and I run a small business together (she handles design, I take care of tech/marketing). Overall, it's going well, but we find ourselves talking about business all the time. Over dinners and weekends we keep discussing customer issues, logistics, inventory etc. If you are in the same boat, how do you separate work from personal life? Do you have some strict boundaries or rules?",
  "selfTextHtml": "<div class=\"md\"><p>My girlfriend and I run a small business together (she handles design, I take care of tech/marketing). Overall, it's going well, but we find ourselves talking about business all the time. Over dinners and weekends we keep discussing customer issues, logistics, inventory etc. If you are in the same boat, how do you separate work from personal life? Do you have some strict boundaries or rules?</p>\n</div>",
  "url": "https://www.reddit.com/r/smallbusiness/comments/1wis938/how_do_you_run_a_small_business_with_your/",
  "permalink": "https://www.reddit.com/r/smallbusiness/comments/1wis938/how_do_you_run_a_small_business_with_your/",
  "isVideo": false,
  "isGallery": false,
  "isSelf": true,
  "isOriginalContent": false,
  "isCrosspost": false,
  "thumbnail": "self",
  "thumbnailWidth": null,
  "thumbnailHeight": null,
  "domain": "self.smallbusiness",
  "linkFlairText": null,
  "over18": false,
  "spoiler": false,
  "stickied": false,
  "locked": false,
  "archived": false,
  "awards": 0,
  "contentCategories": null,
  "distinguished": null,
  "scrapedAt": "2026-09-17T15:24:13.287Z",
  "viralityScore": 5.9,
  "engagementRate": 164.3,
  "controversyScore": 9.9,
  "estimatedViews": 15,
  "postAgeHours": 3.2,
  "postedDay": "Thursday",
  "postedHour": 12,
  "contentType": "text",
  "status": "active",
  "imageUrl": null
}
```

Link posts carry an external `url` and `domain` instead of body text. Community and user rows carry `"type": "community"` or `"type": "user"` with their own fields: name, URL, subscribers or karma, and creation date.

### Configure the run

Mix subreddits, search terms, and Reddit URLs in one run. Filters run as each post is read, so only matches reach your dataset, and a URL's own sort and time window (`/top/?t=month`) are respected. The Input tab lists every option.

Monitor a brand every hour and get only new mentions from the last day, with their comment threads:

```json
{ "searchQueries": ["acme crm"], "sort": "new", "postedAfter": "1 day", "excludeAuthors": ["AutoModerator"], "onlyNewSinceLastRun": true, "includeComments": true, "commentDepth": 2 }
```

Grab the week's top posts from two subreddits, keeping only posts with real traction:

```json
{ "subreddits": ["programming", "datascience"], "sort": "top", "time": "week", "minScore": 100, "minComments": 25, "maxItems": 200 }
```

Run a subreddit search and a Reddit user search for a topic:

```json
{ "searchQueries": ["crm"], "searchTypes": ["communities", "users"] }
```

### Pricing

Pay-per-event: **$0.0026 per result** ($2.60 per 1,000) on the free plan, falling to $2.50 on Starter, $2.41 on Scale and $2.31 on Business, plus a run-start fee of $0.0475 per GB of memory (the run uses 4 GB, so $0.19 per run). You pay only for rows written to your dataset. A run with no usable input stops before reading anything and writes no rows, so only the start fee applies.

| Results collected | Approximate cost (free plan prices) |
|---|---|
| 100 | $0.45 |
| 1,000 | $2.79 |
| 10,000 | $26.19 |

Optional add-ons, billed only when you turn them on:

| Add-on | Price |
|---|---|
| Comments | $0.50 per 1,000 comments collected |
| Author profile | $3 per 1,000 authors |
| Author's recent activity | $5 per 1,000 authors |
| Subreddit info | $5 per 1,000 subreddits |
| Crossposts | $1.20 per 1,000 posts checked |
| Image download | $5 per 1,000 images |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Reddit Scraper](https://apify.com/parseforge/reddit-posts-scraper?fpr=vmoqkp).
3. Enter `subreddits`, `searchQueries`, or `startUrls`, pick a `sort` and `time`, add any filters, and click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab, or schedule the run for ongoing Reddit monitoring.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2?fpr=vmoqkp) or the [ApifyClient](https://docs.apify.com/api/client/js?fpr=vmoqkp) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live Reddit search through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/reddit-posts-scraper"
```

Then prompt it in plain language:

- *"Search Reddit for posts about vector databases from the past week and summarize the top 20 by score."*
- *"Find the subreddits and users that talk most about CRM software and list them with their subscribers and karma."*
- *"Check Reddit every morning for new posts that mention our product and give me only the ones I have not seen."*

Copy this into ChatGPT, Claude, or Cursor to start:

```
Use the Apify Actor "parseforge/reddit-posts-scraper" to search Reddit and collect posts, communities, and users. Input: { "subreddits": ["<name>"], "searchQueries": ["<keyword>"], "searchTypes": ["posts", "communities", "users"], "sort": "<hot|new|top|rising|relevance>", "postedAfter": "<7 days>", "maxItems": <n> }. Posts come back with title, author, subreddit, score, upvoteRatio, numComments, selfText, url, permalink, and createdAt. Call it with the ApifyClient and my APIFY_TOKEN.
```

### Troubleshooting

**Why am I getting no results?**

The subreddit may be misspelled, private, or banned, and the run says so in its status. For `sort: top` or `controversial`, or with `postedAfter`, widen the time window: a narrow `hour` or `day` returns nothing for quiet terms.

**Why fewer results than I asked for?**

A feed holds a limited number of posts, and your filters remove more. Reddit search without a login also returns fewer posts per term than the website. Loosen the filters, widen `time`, or add more subreddits and search terms.

**Why is a field empty?**

Link posts have no `selfText`, text posts have no external `domain`, and `linkFlairText` is `null` when a post has no flair. That is the post's real state.

**Why is the run slow?**

Each page holds up to 100 posts, so large `maxItems` values read more pages, and comments add one read per post. If a run reaches its time limit it keeps what it collected and says so; raise the timeout or lower `maxItems`.

**Why did my scheduled run return nothing new?**

With `onlyNewSinceLastRun` on, posts delivered by earlier runs of the same input are skipped, and the run says "No new items since the last run". Change `stateKey` to start a fresh list.

### FAQ

| Question | Answer |
|---|---|
| Do I need a Reddit API key or app? | No. It reads Reddit's public feeds and search, so there is no OAuth app, client secret, or token to manage. |
| How is this different from the Reddit API and its pricing? | The official API needs OAuth, rate-limits you, and bills high-volume use. Here you pay per result, with virality and engagement already computed. |
| Can I search all of Reddit, or only subreddits? | Both. `searchQueries` searches all of Reddit, `searchInSubreddit` scopes a search, and `subreddits` reads community feeds. |
| Does it do Reddit user search and subreddit search? | Yes. Set `searchTypes` to `communities`, `users`, or both. |
| Can I use it for Reddit monitoring? | Yes. Schedule it with `postedAfter` and `onlyNewSinceLastRun`, so every run returns only new posts. |
| Can I filter by date, keywords, score, or flair? | Yes: date range, keywords to include or exclude, score and comment ranges, upvote share, flairs, content type, domains, and authors. |
| Does it scrape comments? | Yes, as an add-on: turn on `includeComments`, set `commentLimit`, and use `commentDepth` for replies. |
| I use another Reddit scraper. Do I need to rewrite my input? | Usually not. `searches`, `subredditUrls`, `maxPostCount`, `listing`, `timeFilter`, and the `searchCommunities` / `searchUsers` flags are read as they are. |
| How many results per run? | Free plan: 10. Paid: up to 1,000,000, bounded by what the feeds, search, and filters return. |
| What are the virality and engagement scores? | Signals computed from score, comments, upvote ratio, and age for ranking. They are estimates, not official Reddit metrics. |
| Is this an official Reddit product? | No. It is unofficial and reads only public Reddit data. |

### Related actors

- [Reddit Posts & Comments Scraper](https://apify.com/parseforge/reddit-posts-comments-scraper?fpr=vmoqkp): posts with their full comment threads and 20 filters.
- [Reddit User Profiles Scraper](https://apify.com/parseforge/reddit-profiles-scraper?fpr=vmoqkp): public profile data for Reddit accounts.
- [X / Twitter Scraper](https://apify.com/parseforge/x-com-scraper?fpr=vmoqkp): public X posts by keyword or profile.
- [Instagram Posts Scraper](https://apify.com/parseforge/instagram-posts-scraper?fpr=vmoqkp): captions, likes, comments, and engagement scores from public posts.
- [Google Trends Scraper](https://apify.com/parseforge/google-trends-scraper?fpr=vmoqkp): interest over time for the topics you track on Reddit.

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Reddit, Inc. It collects only publicly available Reddit data. You are responsible for using the data in compliance with Reddit's terms and applicable laws, including GDPR, CCPA, and PIPL. Do not use it to identify, profile, or target individuals.

# Actor input Schema

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

How many posts to collect per run.

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

Direct Reddit URLs to scrape: subreddit, search, user or single post URLs. Empty rows are ignored. You can also type r/programming or u/username.

Examples:

- https://www.reddit.com/r/programming/
- https://www.reddit.com/r/javascript/top/
- https://www.reddit.com/search?q=machine+learning

Fill in at least one of Subreddits, Search terms or Reddit URLs, otherwise the run stops straight away with a message.

## `directUrls` (type: `array`):

Deprecated alias for `startUrls`, kept for inputs and schedules saved before this version. New runs should use `startUrls` instead.

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

Subreddit names to scrape, one per row, without the r/ prefix (r/programming and full subreddit URLs also work). Empty rows are ignored.

Examples: programming, javascript, datascience

Fill in at least one of Subreddits, Search terms or Reddit URLs, otherwise the run stops straight away with a message.

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

Search terms to find posts across Reddit, one per row. Each term searches all of Reddit unless you set a subreddit below. Empty rows are ignored.

Examples:

- machine learning
- best programming language 2025
- subreddit:programming typescript

## `searchInSubreddit` (type: `string`):

Limit search queries to a specific subreddit (optional). Leave empty to search all of Reddit.

## `searchTypes` (type: `array`):

What each search term looks for. Leave empty for posts. Communities and users come back as their own rows with a `type` field.

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

How to sort the posts:

- hot: Currently popular posts
- new: Most recent posts
- top: Highest scored posts (use with Time Filter)
- rising: Posts gaining momentum
- controversial: Most debated posts
- relevance: Best match (search only)

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

Time range for 'top', 'controversial', and search results:

- hour: Past hour
- day: Past 24 hours
- week: Past 7 days
- month: Past 30 days
- year: Past 365 days
- all: All time

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

Include posts marked as NSFW (Not Safe For Work / 18+)

## `includeSpoilers` (type: `boolean`):

Include posts marked as spoilers

## `includeStickied` (type: `boolean`):

Include moderator-pinned posts at the top of subreddits

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

Only include posts with at least this many upvotes. Leave empty for no minimum.

## `maxScore` (type: `integer`):

Only include posts with at most this many upvotes. Leave empty for no maximum.

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

Only include posts with at least this many comments. Leave empty for no minimum.

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

Only include posts with at most this many comments. Leave empty for no maximum.

## `flairFilter` (type: `string`):

Only include posts with one of these flairs. Separate several with commas. Not case-sensitive.

Example: Discussion, Question, Tutorial

## `domainFilter` (type: `string`):

Only include posts from URLs containing this domain.

Examples: youtube.com, github.com, imgur.com

## `authorFilter` (type: `string`):

Only include posts from this specific author (username without u/).

## `excludeFlairs` (type: `array`):

Drop posts with any of these flairs. Not case-sensitive.

## `includeKeywords` (type: `array`):

Keep only posts whose title or body contains at least one of these words or phrases. Not case-sensitive.

## `excludeKeywords` (type: `array`):

Drop posts whose title or body contains any of these words or phrases. Not case-sensitive.

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

Keep only posts created after this date, or within a relative window such as 7 days. On feeds sorted by new, reading stops once posts get older than this.

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

Keep only posts created before this date, or older than a relative window such as 1 day.

## `contentTypes` (type: `array`):

Keep only these kinds of posts. Leave empty for all.

## `excludeDomains` (type: `array`):

Drop posts linking to any of these domains, for example youtube.com.

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

Drop posts from these usernames, for example AutoModerator.

## `minUpvotePercent` (type: `integer`):

Keep only posts with at least this share of upvotes (0-100). Leave empty for no minimum.

## `onlyNewSinceLastRun` (type: `boolean`):

For schedules: skip posts this same input already collected in an earlier run, so you only get and pay for new ones. The list is kept in a key-value store named reddit-posts-scraper-state in your account.

## `stateKey` (type: `string`):

Share or separate the 'already collected' list between inputs. Leave empty to derive it from the sources.

## `maxPages` (type: `integer`):

Maximum number of pages to scrape per subreddit/query. Each page contains up to 100 posts.

## `postsPerSource` (type: `integer`):

Maximum posts to scrape from each subreddit or search query.

## `includeAuthorProfile` (type: `boolean`):

Fetch each post author's public profile (karma, account age, verified status) and attach it under the `authorProfile` field. Charged once per author. Off by default.

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

Fetch the top comments for each post and attach them under the `comments` field. Charged with the comment event (see Pricing). Off by default.

## `commentLimit` (type: `integer`):

How many top comments to fetch per post when 'Include comments' is on.

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

1 returns top-level comments only. Higher values include replies down to that depth, each with `depth` and `parentId`.

## `includeSubredditInfo` (type: `boolean`):

Attach the subreddit's subscribers, active users, creation date and description under `subredditInfo`. Charged once per subreddit.

## `includeUserHistory` (type: `boolean`):

Attach the author's latest posts and comments under `authorHistory`. Charged once per author.

## `userHistoryLimit` (type: `integer`):

How many recent posts and comments to attach per author.

## `includeCrossposts` (type: `boolean`):

Attach other submissions of the same link (crossposts and reposts) under `crossposts`. Charged per post checked. Off by default.

## `downloadMedia` (type: `boolean`):

Download each post's image (and thumbnail) and host it on Apify storage, attaching the hosted URL under the `media` field. Images only — videos are skipped. Off by default.

## `mcpConnector` (type: `string`):

Pick a connector (Notion, Linear, Airtable, Jira, Monday, etc.) or click '+' to create a new one via OAuth. See the README for the full list of 16 verified-working MCP services with use case examples.

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

Per-post: one Notion sub-page / GitHub issue / Linear ticket per scraped Reddit post (default). Summary: a single message at the end with top post + stats.

## `mcpTarget` (type: `string`):

For services that need a destination: paste the URL or ID. Notion example: https://www.notion.so/Reddit-abc123def. Slack/Discord don't need this. For Notion, connect the target page to your Apify integration via Notion's Connections menu before running.

## `mcpMessage` (type: `string`):

Leave empty for a pretty pre-formatted default. Or write your own Markdown — Notion renders headings (#), lists (-), quotes (>), bold (\*\*), links ([text](url)), dividers (---).

Per-post placeholders: {{post.title}}, {{post.url}}, {{post.author}}, {{post.score}}, {{post.subreddit}}, {{post.permalink}}, {{post.numComments}}, {{post.selfText}}, {{post.createdAt}}, {{post.domain}}.

Summary placeholders: {{totalPosts}}, {{durationSec}}, {{topPost.title}}, {{topPost.url}}, {{topPost.score}}, {{topPost.author}}, {{topPost.subreddit}}, {{datasetUrl}}.

## `mcpTool` (type: `string`):

Override the auto-detected MCP tool. By default the actor picks the first write-style tool on the connector (e.g. send_message for Slack, notion-create-pages for Notion, create_issue for Linear/GitHub). Leave empty for auto-detect.

## `mcpArguments` (type: `object`):

Override the full argument shape (e.g. Notion's rich_text blocks). If empty, arguments are auto-built from the message + the tool's inputSchema. Leave empty for normal use.

## `mcpProxyUrlOverride` (type: `string`):

Diagnostic only. Bypasses Apify's MCP proxy and talks directly to an MCP server URL — useful for debugging Apify proxy issues. Example: https://mcp.airtable.com/mcp. Leave empty for normal use.

## `mcpTokenOverride` (type: `string`):

Diagnostic only. Used with the URL override above — paste the service's API key or PAT to authenticate directly. Example: for Airtable, get a PAT at airtable.com/create/tokens with scopes data.records:write + schema.bases:read. Leave empty for normal use.

## Actor input object example

```json
{
  "maxItems": 10,
  "subreddits": [
    "programming",
    "javascript",
    "typescript"
  ],
  "sort": "hot",
  "time": "day",
  "includeNSFW": true,
  "includeSpoilers": true,
  "includeStickied": true,
  "onlyNewSinceLastRun": false,
  "maxPages": 10,
  "postsPerSource": 100,
  "includeAuthorProfile": false,
  "includeComments": false,
  "commentLimit": 20,
  "commentDepth": 1,
  "includeSubredditInfo": false,
  "includeUserHistory": false,
  "userHistoryLimit": 10,
  "includeCrossposts": false,
  "downloadMedia": false,
  "mcpMode": "perPost"
}
```

# Actor output Schema

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

Complete dataset with all scraped Reddit posts including titles, authors, scores, comments, flairs, and metadata

# 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 = {
    "maxItems": 10,
    "subreddits": [
        "programming",
        "javascript",
        "typescript"
    ],
    "sort": "hot",
    "time": "day",
    "maxPages": 10,
    "postsPerSource": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/reddit-posts-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 = {
    "maxItems": 10,
    "subreddits": [
        "programming",
        "javascript",
        "typescript",
    ],
    "sort": "hot",
    "time": "day",
    "maxPages": 10,
    "postsPerSource": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/reddit-posts-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 '{
  "maxItems": 10,
  "subreddits": [
    "programming",
    "javascript",
    "typescript"
  ],
  "sort": "hot",
  "time": "day",
  "maxPages": 10,
  "postsPerSource": 100
}' |
apify call parseforge/reddit-posts-scraper --silent --output-dataset

```

## MCP server setup

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