# Reddit Multi-Mode Scraper with Advanced Pro Filters (`vexaloom-labs/reddit-multi-mode-scraper-with-advanced-pro`) Actor

Scrape Reddit subreddit posts, post comment threads, and user profile posts, with any combination of modes in a single run. Filter by score, age, NSFW status, keyword, author, or comment depth before anything is saved. No login required.

- **URL**: https://apify.com/vexaloom-labs/reddit-multi-mode-scraper-with-advanced-pro.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** Social media, Automation, Lead generation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Research Scraper — Posts, Comments, Search, Users & Communities

One run, five ways to read Reddit: subreddit feeds, complete comment trees, keyword search, user profiles, and community details. Apply the filters you need before anything reaches your dataset, so you can go from a broad topic to a clean, analysis-ready table without stitching several tools together.

### What this actor does

- **Subreddit posts** — collect a community's hot, new, top, rising, controversial, or best posts, with native Reddit pagination and optional post body/media details.
- **Comment trees** — pull a post's comments with nesting depth, parent-comment linkage, scores, awards, edited/deleted flags, and optional expansion of collapsed branches.
- **Keyword search** — search Reddit posts, comments, or both, globally or inside one community, and sort by relevance, hot, top, new, or comment count.
- **User profiles** — read a user's profile summary (karma breakdown, cake day, account age, avatar, moderated communities, trophies) plus their posts and/or comments.
- **Community details** — get a subreddit's description, subscriber and activity counts, creation date, type, icon/banner, and optionally its public rules.
- **One shared filter layer** — score, age, comment count, upvote ratio, content type, flair, author, domain, keyword, NSFW, and comment depth filters run before records are saved.
- **Mixed-mode runs** — combine any modes in one execution; every row carries a `recordType` so you can split the output at a glance.

### Modes

| Mode | What it reads | Best for |
|---|---|---|
| `posts` | A subreddit's post listing | Community monitoring, trend discovery |
| `comments` | Comment trees from post URLs or IDs | Sentiment, moderation, discussion analysis |
| `search` | Reddit keyword search results | Topic research across Reddit |
| `users` | A user's profile and activity | Author research, influencer vetting |
| `subreddits` | Community about pages | Community discovery and comparison |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `posts` | One mode: `posts`, `comments`, `search`, `users`, or `subreddits`. |
| `modes` | array | `["posts"]` | Run several modes in one execution; overrides `mode`. |
| `subreddits` | array | `["python"]` | Communities for posts, comments, or subreddit details. Accepts names, `r/` prefixes, or URLs. |
| `searchQueries` | array | `["python"]` | Keywords for search mode. |
| `searchType` | string | `posts` | `posts`, `comments`, or `both`. |
| `searchSort` | string | `relevance` | `relevance`, `hot`, `top`, `new`, or `comments`. |
| `withinCommunity` | string | — | Restrict search to one subreddit. |
| `maxSearchResults` | integer | `50` | Maximum search results per query. |
| `enrichSearchResults` | boolean | `true` | Open the first few result posts to fill score, comment count, body, and media. |
| `postUrls` | array | — | Post URLs or IDs for comments mode. |
| `usernames` | array | — | Users for users mode. Accepts names, `u/` prefixes, or URLs. |
| `section` | string | `submitted` | Profile section: `overview`, `submitted`, or `comments`. |
| `sort` | string | `hot` | `hot`, `new`, `top`, `rising`, `controversial`, or `best`. |
| `timeFilter` | string | `day` | `hour`, `day`, `week`, `month`, `year`, or `all`. |
| `commentSort` | string | `confidence` | `confidence`, `top`, `new`, `controversial`, `old`, or `qa`. |
| `maxPosts` | integer | `25` | Posts per community or user. |
| `maxComments` | integer | `100` | Comments per post. |
| `maxItems` | integer | `1000` | Global cap across the whole run. |
| `expandThreads` | boolean | `true` | Load collapsed comment branches and additional profile pages. |
| `includePost` | boolean | `false` | Include the parent post record in comments mode. |
| `includeSubredditInfo` | boolean | `false` | Emit a community record alongside posts. |
| `includeRules` | boolean | `false` | Add public rules to subreddit records. |
| `minScore` | integer | — | Minimum post/comment score. |
| `maxScore` | integer | — | Maximum post/comment score. |
| `minComments` | integer | — | Minimum comment count on a post. |
| `maxPostComments` | integer | — | Maximum comment count on a post. |
| `minUpvoteRatio` | number | — | Minimum post upvote ratio (0–1). |
| `maxAgeDays` | integer | — | Drop records older than this many days. |
| `postedAfter` | date | — | Keep posts created on or after this date. |
| `postedBefore` | date | — | Keep posts created on or before this date. |
| `postType` | string | `all` | `all`, `self`, `link`, `image`, `video`, `gallery`, `poll`, `crosspost`, `gif`, or `multi_media`. |
| `excludeStickied` | boolean | `false` | Drop pinned/stickied posts. |
| `excludeNsfw` | boolean | `false` | Drop posts flagged NSFW. |
| `keywordFilter` | string | — | Keep records containing this text (title, body, or comment text). |
| `authorFilter` | string | — | Keep records whose author name contains this text. |
| `authorAllowlist` | array | — | Keep only these exact authors. |
| `authorBlocklist` | array | — | Exclude these exact authors. |
| `flairFilter` | string | — | Keep posts whose link flair contains this text. |
| `domainFilter` | string | — | Keep posts whose link domain contains this text. |
| `maxDepth` | integer | — | Maximum comment nesting depth. |

#### Example: top posts from two communities

```json
{
  "mode": "posts",
  "subreddits": ["python", "programming"],
  "sort": "top",
  "timeFilter": "week",
  "maxPosts": 50,
  "minScore": 25,
  "excludeNsfw": true
}
```

#### Example: a post's comment tree, shallow only

```json
{
  "mode": "comments",
  "postUrls": ["https://www.reddit.com/r/programming/comments/1abc123/interesting_discussion/"],
  "maxComments": 200,
  "maxDepth": 2,
  "commentSort": "top"
}
```

#### Example: search posts and comments, then profile a user

```json
{
  "modes": ["search", "users"],
  "searchQueries": ["vector database"],
  "searchType": "both",
  "maxSearchResults": 30,
  "usernames": ["spez"],
  "section": "overview",
  "maxPosts": 20
}
```

#### Example: community details with rules

```json
{
  "mode": "subreddits",
  "subreddits": ["python", "MachineLearning"],
  "includeRules": true
}
```

### Output

Every row includes `recordType` (`subreddit_post`, `comment`, `profile`, `user_profile`, `subreddit`, or `summary`).

#### Post records

`post_id`, `post_name`, `title`, `author`, `author_id`, `author_fullname`, `author_flair`, `subreddit`, `subreddit_prefixed`, `subreddit_id`, `subreddit_subscribers`, `subreddit_type`, `content`, `content_html`, `content_url`, `url`, `permalink`, `external_url`, `url_overridden_by_dest`, `domain`, `post_hint`, `post_type`, `media_type`, `score`, `ups`, `upvote_ratio`, `num_comments`, `link_flair`, `thumbnail_url`, `created_utc`, `created_at`, `edited`, `edited_at`, `is_self`, `is_stickied`, `is_locked`, `is_archived`, `is_pinned`, `is_nsfw`, `is_spoiler`, `is_original_content`, `is_crosspost`, `is_gallery`, `total_awards_received`, `awards`, `gilded_count`, `num_crossposts`, `crosspost_parent`, `language`, `has_media`, `images`, `gallery_images`, `gallery_count`, `video_url`, `poll_data`, `title_word_count`, `post_age_seconds`, `search_term`, `crawled_at`, `source`.

#### Comment records

`comment_id`, `comment_name`, `post_id`, `post_title`, `post_url`, `author`, `author_id`, `author_fullname`, `text`, `body_html`, `score`, `permalink`, `parent_id`, `parent_comment_id`, `parent_kind`, `parent_positions`, `depth`, `position`, `replies_count`, `subreddit`, `subreddit_prefixed`, `subreddit_id`, `is_op`, `is_edited`, `edited_at`, `is_stickied`, `is_collapsed`, `is_deleted`, `is_automod`, `is_likely_bot`, `comment_age_seconds`, `distinguished`, `controversiality`, `user_flair`, `word_count`, `body_quote_count`, `body_code_count`, `body_link_count`, `awards_count`, `total_awards_received`, `gilded_count`, `content_type`, `avatar`, `created_utc`, `created_at`, `search_term`, `crawled_at`, `source`.

#### Profile post records

Post fields above, plus `author_metadata` with the profile summary.

#### User profile records

`username`, `user_id`, `profile_url`, `icon_img`, `snoovatar_img`, `description`, `total_karma`, `post_karma`, `comment_karma`, `awardee_karma`, `awarder_karma`, `created_utc`, `created_at`, `account_created`, `account_age_years`, `is_mod`, `is_gold`, `has_verified_email`, `verified`, `moderated_subreddits`, `trophies`.

#### Subreddit records

`subreddit`, `subreddit_prefixed`, `subreddit_id`, `url`, `title`, `description`, `public_description`, `subscribers`, `active_user_count`, `weekly_active_users`, `weekly_contributions`, `created_utc`, `created_at`, `subreddit_type`, `over18`, `quarantine`, `community_icon`, `icon_img`, `banner_img`, `primary_color`, `key_color`, `lang`, `rules`.

#### Summary record

One row at the end of every run with `modes`, `modeStats` (pushed/dropped/errors per mode), `totalPushed`, `totalErrors`, `totalDropped`, and `scrapedAt`. If nothing is emitted, a second summary row explains why.

### Use cases

- Track a topic across several subreddits and keep only high-scoring, recent posts.
- Pull shallow comment trees for a quick sentiment pass without walking every reply.
- Search Reddit for a product or phrase, then compare how different communities discuss it.
- Vetting an author: see their profile summary, recent posts, and comment history together.
- Compare community size, activity, and rules before launching a campaign or research project.

### Limitations

- Reddit may challenge individual post/comment pages on some cloud networks even when feed, search, profile, and community pages load. When that happens, comments mode emits no rows and records a mode error (visible in the summary and run status) rather than partial or fabricated data; retry from another network or use a saved copy of the thread.
- Reddit caps listings and search at a source-side maximum; very large `maxItems` requests may stop before that number when Reddit stops paginating. Comment search returns Reddit's first server-rendered result page per query (typically 8-10 rows); post search paginates further.
- Private, quarantined, banned, and login-only communities cannot be read anonymously.
- Search results from older archive data may not include the newest posts; live Reddit search is used first when available.

### FAQ

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

No. The actor reads public Reddit pages and public search feeds. No credentials are required.

#### How many records can I get?

Set `maxItems` for a global cap, `maxPosts` per community/user, `maxComments` per post, and `maxSearchResults` per query. Reddit itself limits how far a listing or search can paginate; very large requests may stop at the source's own ceiling.

#### Why is a field missing from some records?

Fields that Reddit does not expose for a particular record are omitted rather than filled with empty values. For example, a text post has no external link domain, and a search-result comment has no post score.

#### Do the filters apply to every mode?

`minScore`, `maxScore`, `maxAgeDays`, `keywordFilter`, `authorFilter`, `authorAllowlist`, `authorBlocklist`, `excludeNsfw`, and the post-level filters apply wherever the corresponding field exists. `maxDepth` applies to comments. `postedAfter` and `postedBefore` apply to posts.

#### Can I search inside one subreddit?

Yes. Set `searchQueries` and put the community name in `withinCommunity`.

#### What is the difference between `mode` and `modes`?

`mode` runs one mode. `modes` is a list and can run several modes in one execution. When `modes` is set, it takes priority.

#### Why did a mode produce nothing?

Its required input was empty (for example, comments mode without `postUrls`), the community/post is private or unavailable, or your filters removed every row. Check the `summary` record's `modeStats` for counts.

#### Is this affiliated with Reddit?

No. This is an independent tool that reads Reddit's public pages; it is not operated or endorsed by Reddit.

# Actor input Schema

## `mode` (type: `string`):

Run one mode. Prefer `modes` to combine modes in a single run.

## `modes` (type: `array`):

Run multiple modes in one execution, for example \["posts", "search"]. When set, this overrides the single `mode` field.

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

Communities to read for posts, comments or subreddit details. Accepts bare names, r/ prefixes, or full Reddit URLs.

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

Keywords for search mode. Supports Reddit search syntax such as author:, flair:, site:, quotes, AND/OR/NOT and -exclusions.

## `searchType` (type: `string`):

Search for posts, comments, or both.

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

How to order search results.

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

Restrict search results to a single subreddit. Leave empty to search all of Reddit.

## `maxSearchResults` (type: `integer`):

Cap search results (posts or comments) for each query.

## `enrichSearchResults` (type: `boolean`):

Open the first few search-result posts to fill score, comment count, body and media. Disable for the fastest search runs.

## `postUrls` (type: `array`):

Reddit post URLs or bare post IDs to read comment trees from.

## `usernames` (type: `array`):

Reddit users to read. Accepts plain names, u/ prefixes, or full profile URLs.

## `section` (type: `string`):

Which part of a user's profile to read.

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

How to sort subreddit listings and profile posts.

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

Time range for top/controversial sorts and search.

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

How to order comments inside a thread.

## `maxPosts` (type: `integer`):

Stop after this many posts for each subreddit or profile.

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

Stop after this many comments for each post URL.

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

Global safety cap for the whole run, across all modes.

## `expandThreads` (type: `boolean`):

Load collapsed 'more comments' branches and additional profile pages when available.

## `includePost` (type: `boolean`):

Emit the parent post record in comments mode in addition to its comments.

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

Emit one subreddit metadata record per community in posts mode.

## `includeRules` (type: `boolean`):

Add the public rules list to subreddit metadata records.

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

Drop posts and comments with a lower score. Leave empty for no minimum.

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

Drop posts and comments with a higher score. Leave empty for no maximum.

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

Keep only posts that have at least this many comments.

## `maxPostComments` (type: `integer`):

Keep only posts that have at most this many comments.

## `minUpvoteRatio` (type: `number`):

Keep only posts at or above this upvote ratio (0 to 1).

## `maxAgeDays` (type: `integer`):

Drop posts and comments older than this many days.

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

Keep only posts created on or after this date (YYYY-MM-DD, UTC).

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

Keep only posts created on or before this date (YYYY-MM-DD, UTC).

## `postType` (type: `string`):

Keep only posts of this type. Choose 'all' to keep every type.

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

Drop pinned/stickied posts from listings and search results.

## `excludeNsfw` (type: `boolean`):

Drop posts Reddit flags as NSFW (18+).

## `keywordFilter` (type: `string`):

Keep only posts or comments whose title, body or text contains this text (case-insensitive).

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

Keep only records whose author name contains this text (case-insensitive).

## `authorAllowlist` (type: `array`):

Keep only records by these exact usernames (case-insensitive).

## `authorBlocklist` (type: `array`):

Drop records by these exact usernames (case-insensitive).

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

Keep only posts whose link flair contains this text (case-insensitive).

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

Keep only posts whose link domain contains this text (case-insensitive).

## `maxDepth` (type: `integer`):

In comments mode, drop comments nested deeper than this level.

## Actor input object example

```json
{
  "mode": "posts",
  "modes": [
    "posts"
  ],
  "subreddits": [
    "python"
  ],
  "searchQueries": [
    "python"
  ],
  "searchType": "posts",
  "searchSort": "relevance",
  "maxSearchResults": 50,
  "enrichSearchResults": true,
  "postUrls": [],
  "usernames": [],
  "section": "submitted",
  "sort": "hot",
  "timeFilter": "day",
  "commentSort": "confidence",
  "maxPosts": 1,
  "maxComments": 100,
  "maxItems": 3,
  "expandThreads": true,
  "includePost": false,
  "includeSubredditInfo": false,
  "includeRules": false,
  "postType": "all",
  "excludeStickied": false,
  "excludeNsfw": false
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset containing every scraped Reddit record and the run summary.

# 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 = {
    "modes": [
        "posts"
    ],
    "subreddits": [
        "python"
    ],
    "searchQueries": [
        "python"
    ],
    "postUrls": [],
    "usernames": [],
    "maxPosts": 1,
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/reddit-multi-mode-scraper-with-advanced-pro").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 = {
    "modes": ["posts"],
    "subreddits": ["python"],
    "searchQueries": ["python"],
    "postUrls": [],
    "usernames": [],
    "maxPosts": 1,
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/reddit-multi-mode-scraper-with-advanced-pro").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 '{
  "modes": [
    "posts"
  ],
  "subreddits": [
    "python"
  ],
  "searchQueries": [
    "python"
  ],
  "postUrls": [],
  "usernames": [],
  "maxPosts": 1,
  "maxItems": 3
}' |
apify call vexaloom-labs/reddit-multi-mode-scraper-with-advanced-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/reddit-multi-mode-scraper-with-advanced-pro"
        }
    }
}
```

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/Xyjs2Re83cI6mCDZJ/builds/8NqcUjPnceaJI8pg3/openapi.json
