# Reddit Search (`crawlix/reddit-search`) Actor

Reddit search extracts public posts, subreddits, images, videos, comments, and user profiles across Reddit by keyword. Seamlessly switch between 5 specialized extraction modes with Pay-Per-Event billing, deduplication parity, custom sort filters, and clean JSON/CSV/Excel dataset exports.

- **URL**: https://apify.com/crawlix/reddit-search.md
- **Developed by:** [Crawlix](https://apify.com/crawlix) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

The **Reddit Search** is an all-in-one, enterprise-grade data extraction powerhouse engineered to search, discover, and harvest public data across the entire Reddit ecosystem. Designed for market researchers, brand intelligence analysts, data scientists, machine learning engineers, and growth hackers, this reddit search unifies five specialized search capabilities into a single seamless interface: discussion posts, subreddits and communities, visual media assets, nested comment discussions, and user profiles.

Instead of deploying and maintaining multiple disconnected tools, the reddit search provides a versatile mode switcher. By providing target search terms, users can toggle between extracting full discussion threads, discovering active communities, collecting high-resolution images and videos, mining authentic comment replies, or scouting authoritative creator profiles. Each returned record is normalized, enriched with metadata, and formatted for analytical pipelines.

Operating under a transparent Pay-Per-Event pricing model, the reddit search ensures you only pay for successfully saved records. With integrated support for custom sorting algorithms, granular time windows, and international proxy routing, this reddit search delivers unmatched versatility for any digital research workflow.

#### Core Capabilities Matrix

- **5-in-1 Unified Mode Switching**: Easily toggle between Posts, Communities, Media, Comments, and People search with this single reddit search.
- **Granular Sorting & Time Filtering**: Customize result ordering with Relevance, Hot, Top, New, or Comment Count, alongside time windows from Past Hour to All Time.
- **Filter Interaction Awareness**: Automatically adheres to platform filtering logic—when sorting by Hot or New, time filtering is safely streamlined without configuration errors.
- **Direct High-Resolution Media Extraction**: Discovers direct image, video, and GIF URLs for computer vision datasets and creative curation.
- **Parent Context Preservation**: When harvesting comments, extracts parent post headlines and URLs alongside the comment text.
- **Strict Deduplication Parity**: Every record identifier is strictly deduplicated before storage, guaranteeing that your dataset contains only unique records with zero duplicate charges.
- **Zero-Null Standard**: Dynamic field inclusion strips empty attributes row by row, keeping your exported CSV, JSON, and Excel tables clean and lightweight.
- **Resilient Infrastructure**: Direct residential proxy integration guarantees high extraction uptime across international regions without interruptions.

***

### Practical Use Cases & Applications

The reddit search supports a wide range of commercial, academic, and analytical workflows:

#### 1. 360-Degree Brand & Competitor Intelligence

Monitor discussions, sentiment shifts, community reception, and customer complaints across Reddit. Marketing teams use this reddit search to track product mentions in posts, analyze comment feedback, and identify subreddits discussing competitors.

#### 2. Multi-Modal Machine Learning & AI Training Datasets

Acquire paired conversational text, question-answer pairs, and labeled visual content. Machine learning teams rely on the reddit search to harvest conversational dialogue for NLP fine-tuning and high-resolution imagery for computer vision training.

#### 3. Market Research & Consumer Voice Discovery

Discover authentic consumer needs, recurring frustrations, and emerging cultural trends. Product managers and strategy consultants use this reddit search to identify unmet product demands directly from unfiltered community conversations.

#### 4. Influencer Discovery & Talent Sourcing

Locate subject-matter experts, micro-influencers, and technical leaders who actively share high-quality contributions. Recruitment agencies and creator managers use the people search mode of the reddit search to find specialized domain authorities.

#### 5. Community Ecosystem Mapping & Niche Discovery

Identify fast-growing subreddits around emerging topics, technologies, or consumer hobbies. Digital marketers utilize this reddit search to find the most relevant communities for content marketing and brand engagement.

#### 6. Public Relations & Crisis Early Warning

Track breaking controversies or viral consumer discussions before they escalate into mainstream news. PR teams run automated monitoring jobs with the reddit search to catch negative threads early.

***

### Target Audiences & Engineering Teams

This reddit search is purpose-built for diverse professionals seeking automated Reddit data extraction:

- **Data Engineers & Architects**: Integrate a single, flexible data collection engine into enterprise data lakes, Snowflake, or BigQuery via REST API.
- **Market Research Analysts**: Gather qualitative consumer insights across thousands of organic discussions without manual browsing.
- **NLP & Computer Vision Scientists**: Ingest high-volume conversational text and verified media assets with this versatile reddit search.
- **Growth Marketers & Brand Strategists**: Uncover high-intent community threads where prospective buyers discuss problems your product solves.
- **Automation Developers**: Connect Reddit data feeds directly into business intelligence tools, automated alerts, and custom analytics workflows.

***

### Key Architectural Advantages & Reliability

The reddit search incorporates enterprise-grade engineering principles to ensure consistent data delivery:

#### Modular Mode Architecture

Under the hood, the reddit search is built upon isolated, dedicated extraction engines for posts, communities, media, comments, and profiles. Each mode maintains independent parsing rules, guaranteeing high stability and seamless updates when platform layouts evolve.

#### Strict Deduplication Parity

When collecting extensive search results, online platforms often return repeated items across result boundaries. The reddit search maintains an internal verified identifier index. Duplicate items are instantly discarded without charging events or advancing progress trackers, guaranteeing 100% parity between target counts and final dataset rows.

#### Zero-Null Data Purity Standard

Traditional scrapers often clutter output tables with hundreds of empty columns or null values. This reddit search implements recursive dynamic field inclusion: any attribute lacking data for a specific record is completely omitted from that row, maximizing storage efficiency and downstream analytical speed.

#### Anti-Interruption Fallback

Network hiccups and platform adjustments are handled gracefully. In the rare event of a connection interruption, the reddit search safely seals all collected records in the cloud dataset and finishes with a clean exit status, preventing data loss.

#### Budget-Capped Spending Protection

Utilize Apify Max Total Charge limits with confidence. The reddit search checks spending limits after every single charge event, immediately pausing further operations the instant your predefined budget ceiling is reached.

***

### Quickstart: Step-by-Step Execution Guide

Getting started with the reddit search takes less than one minute:

1. **Select Search Mode**: Choose your desired target mode (`Posts`, `Communities`, `Media`, `Comments`, or `People`).
2. **Set Up Search Keywords**: Enter your target terms in the `keyword` input field (e.g. `flower`, `artificial intelligence`, `espresso machine`).
3. **Define Output Volume**: Set `max_items` to the number of unique records you wish to collect (prefilled to 10 for free accounts).
4. **Configure Filters (Optional)**: If extracting Posts or Media, select your preferred Sort Order and Time Range. For Comments, choose between Relevance, Top, or New.
5. **Choose Connection Country**: Select your preferred Connection Country (defaults to United States for optimal platform responsiveness).
6. **Run the Scraper**: Click the **Start** button on the Apify Console. Watch the live progress tracker step toward your target count.
7. **Export Your Dataset**: Download your structured records in JSON, CSV, Excel, XML, or Parquet format with a single click.

***

### Input Parameters & Configuration Reference

The reddit search provides an intuitive configuration interface:

| Parameter Key | UI Title | Data Type | Default | Description |
|---|---|---|---|---|
| `search_type` | Search Mode | String (Select) | `posts` | Target content type: `posts`, `communities`, `media`, `comments`, or `people`. The reddit search activates the appropriate extraction pipeline. |
| `keyword` | Search Keyword(s) | Array of Strings | `["flower"]` | Target search terms to query. Provide one or multiple keywords to discover matching records with the reddit search. |
| `max_items` | Max Results | Integer | `10` | Total number of unique records to extract. Free tier accounts are capped at 10 items per run; paid accounts have no volume limit. |
| `sort` | Sort Order | String (Select) | `relevance` | Ordering method for search results. Options: `relevance`, `hot`, `top`, `new`, `comments`. Filters are free of charge. Ignored for communities and people. |
| `time` | Time Range | String (Select) | `all` | Publication time frame for posts and media. Options: `all`, `year`, `month`, `week`, `day`, `hour`. Ignored when Hot or New is selected. |
| `proxyCountry` | Connection Country | String (Select) | `US` | Origin country for network connections. Defaults to United States for optimal platform responsiveness. |

> **Note on Free Account Limits**: Free Apify tier accounts are capped at a maximum of 10 items per run. Upgrading to any paid Apify tier unlocks unlimited volume per run with this reddit search.

***

### Extracted Dataset Schema & Field Definitions

The reddit search extracts rich, normalized attributes dynamically tailored to your selected search mode. Output fields are organized into two availability tiers:

#### Fields That Most of the Time May Come in the Output

*Core fields consistently populated across standard extractions:*

- `search_type` *(string)*: Classification of the extracted record (`post`, `community`, `media`, `comment`, or `profile`).
- `id` *(string)*: Unique platform identifier for the record (e.g. `t3_...`, `t1_...`, `t2_...`, or `t5_...`).
- `title` *(string)*: Headline title of the post, name of the community, or title of the media submission.
- `url` *(string)*: Direct canonical link to the thread, community, media, comment, or user profile.
- `author` *(string)*: Public username of the creator or comment author (for posts, media, comments).
- `subreddit` *(string)*: Prefixed community name where the discussion resides (e.g. `r/flowers`).
- `score` *(integer)*: Net score (upvotes minus downvotes) recorded at extraction time.
- `created_at` *(string)*: Publication timestamp formatted in standard ISO 8601.
- `query` *(string)*: The specific keyword query that discovered this record.
- `scraped_at` *(string)*: ISO timestamp recording when the record was extracted.

#### Fields Less Often Available (Present When Provided by the Listing or Broadcaster)

*Mode-specific and context-dependent attributes:*

- `author_id` *(string)*: Internal user account identifier of the submission author.
- `subreddit_id` *(string)*: Unique identifier of the host community.
- `comments_count` *(integer)*: Total comment count on posts and media submissions.
- `body` *(string)*: Full text content of comment replies.
- `text_content` *(string)*: Full text body or selftext content of text discussions.
- `media_url` *(string)*: Direct high-resolution link to shared images, videos, or GIFs.
- `media_type` *(string)*: Classification of media assets (`image`, `video`, `gif`, `gallery`).
- `thumbnail_url` *(string)*: Preview thumbnail image link if generated by the platform.
- `subscribers` *(integer)*: Total member count for subreddit communities.
- `subscribers_formatted` *(string)*: Formatted member text (e.g. `125,000 members`).
- `username` *(string)*: Clean username without prefix for user profile searches.
- `display_name` *(string)*: Custom title or profile display name configured by the user.
- `avatar_url` *(string)*: Direct link to the user avatar icon or profile picture.
- `karma` *(integer)*: Aggregate karma score for user profiles.
- `description` *(string)*: Subreddit description or user biography text.
- `domain` *(string)*: External host domain for shared link posts (e.g. `i.redd.it`, `youtube.com`).
- `is_nsfw` *(boolean)*: Flag indicating age-restricted or adult content.
- `post_id` *(string)*: Parent post thread identifier for comment records.
- `post_title` *(string)*: Headline title of the submission thread hosting a comment.
- `post_url` *(string)*: Canonical link to the parent submission thread.

> *Note on Dynamic Field Inclusion: A field with no value is omitted from the row.*

#### Sample JSON Output Record

```json
{
  "search_type": "post",
  "id": "t3_1h7a9bc",
  "title": "Beautiful blooming flower garden in early spring",
  "url": "https://www.reddit.com/r/flowers/comments/1h7a9bc/beautiful_blooming_flower_garden_in_early_spring/",
  "author": "nature_enthusiast",
  "author_id": "t2_abc123xyz",
  "subreddit": "r/flowers",
  "subreddit_id": "t5_2qgzy",
  "score": 342,
  "comments_count": 58,
  "created_at": "2024-05-18T14:30:00.000Z",
  "domain": "i.redd.it",
  "media_url": "https://i.redd.it/flower_sample.jpg",
  "media_type": "image",
  "query": "flower",
  "scraped_at": "2024-11-20T12:30:00.000Z"
}
```

***

### Operational Constraints & Platform Limits

When designing workflows around the reddit search, consider the following platform characteristics:

- **Public Content Scope**: The reddit search extracts publicly accessible content. Private, restricted, or quarantined subreddits that require private invitations are excluded.
- **Search Depth Boundaries**: Like all major online platforms, search result directories reflect a finite depth of matching records for any single keyword and filter configuration.
- **Deleted or Removed Content**: Submissions or comments that have been removed by moderators or deleted by authors prior to extraction will not appear in search results.
- **Free Account Quota**: Free tier accounts on Apify are subject to a strict 10-item cap per run. Paid subscription plans have no volume restrictions.
- **Filter Interaction Rules**: When selecting `Hot` or `New` sort modes, Reddit automatically disables time-based filtering. The reddit search respects this logic automatically.

***

### Best Practices & Performance Optimization

To maximize the value and efficiency of your data extraction operations:

1. **Match Mode to Use Case**: Use `posts` for broad discussions, `communities` for audience mapping, `media` for visual curation, `comments` for sentiment analysis, and `people` for creator discovery with the reddit search.
2. **Combine Queries**: Provide multiple related keywords in the `keyword` string list input to aggregate diverse discussions in a single execution.
3. **Leverage Time Windows Wisely**: For tracking breaking news or product launches, pair `Top` sorting with `Past Week` or `Past Month` to isolate top-voted recent discussions.
4. **Schedule Recurring Runs**: Automate recurring runs via the Apify platform scheduler (e.g. daily at 08:00 UTC) to continuously feed your analytics dashboards with the reddit search.
5. **Set Realistic Target Counts**: For niche topics with limited discussion volume, setting `max_items` to 50–100 ensures fast completion without requesting non-existent items.

***

### Troubleshooting & Frequently Asked Questions

#### Why did my run stop at exactly 10 items?

Free tier accounts on the Apify platform are capped at 10 items per run (`FREE_USER_MAX_ITEMS = 10`). To extract larger volumes of records, upgrade your Apify account to any paid tier. If you are already on a paid tier and encounter this limit, please report it via the Issues tab on this actor Console with your Run ID.

#### Is the 10-item free limit per day or per run?

The limit applies per run. Free accounts can test the reddit search with up to 10 items on any execution.

#### How do I switch between different search types?

Simply choose your desired option in the `Search Mode` dropdown: Posts, Communities, Media, Comments, or People. The reddit search automatically routes the search to the dedicated pipeline.

#### Why is the Time Range filter not working with Hot or New sort orders?

Reddit's platform architecture does not support time filtering when sorting by Hot or New. When either mode is selected, the reddit search automatically ignores the time filter and extracts records matching the chosen sort order without error.

#### Can I search multiple keywords in a single run?

Yes. You can provide multiple keywords in the `keyword` string list input. The reddit search processes each term in sequence until your total target count is fulfilled.

#### What happens if a keyword has fewer results than my requested max_items?

The reddit search exhausts all available matching records on the platform, saves all unique records collected, and exits cleanly with a normal completion status.

#### How does Pay-Per-Event billing work?

You are charged strictly for successfully extracted and stored records. If an error occurs or zero results match your query, no billing events occur.

***

### Technical Architecture Glossary

- **Pay-Per-Event (PPE)**: A transparent monetization architecture where charges occur only upon verified record extraction, eliminating upfront subscription waste.
- **Deduplication Parity**: An algorithmic check that guarantees the final dataset row count matches the exact number of unique items discovered, discarding repeated records.
- **Zero-Null Standard**: An output standard where empty, null, or blank attributes are completely removed from the pushed record to ensure pristine data tables.
- **Search Mode Switcher**: A control selector allowing users to toggle between five specialized Reddit search pipelines from a single actor.
- **Subreddit**: An independent, topic-specific community on Reddit dedicated to discussions around a specific subject.
- **Comment Thread**: A tree of conversational replies attached to a parent post submission.
- **Net Score**: The aggregate upvote tally calculated by subtracting downvotes from upvotes on a post or comment.
- **Free Account Cap**: A standard 10-item volume limit applied per run to free Apify accounts to facilitate safe testing.

***

### Support & Feedback Channels

We actively maintain the **Reddit Search** to ensure total synchronization with platform updates.

- **Bug Reports & Inquiries**: If you experience an issue or wish to request additional features, open a ticket directly in the **Issues** tab on the Apify Actor Console.
- **Include Your Run ID**: To accelerate investigation, please include your specific **Run ID** when submitting an issue.
- **Continuous Maintenance**: Our engineering team monitors platform changes daily to provide rapid updates and ensure uninterrupted extraction reliability.

# Actor input Schema

## `search_type` (type: `string`):

Select which Reddit content type to search and extract. The scraper seamlessly activates the dedicated extraction engine for your chosen target.

## `keyword` (type: `array`):

Target search terms to query (e.g. 'flower', 'machine learning', 'mechanical keyboards'). Free plan users can collect up to 10 records per run; paid accounts have unlimited collection.

## `max_items` (type: `integer`):

Maximum number of unique records to extract for each search keyword. Free plan accounts are capped at 10 items total per run; paid accounts have no volume limit.

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

Select how search results should be sorted: Relevance, Hot, Top, New, or Comment Count. For Comments search, only Relevance, Top, and New are supported. Ignored for Communities and People search.

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

Filter results by publication window: All Time, Past Year, Past Month, Past Week, Today, or Past Hour. Ignored when Hot or New is selected, or when searching Communities, Comments, or People.

## `proxyCountry` (type: `string`):

Select the origin country connection for network queries. Defaults to United States (US).

## Actor input object example

```json
{
  "search_type": "posts",
  "keyword": [
    "flower"
  ],
  "max_items": 10,
  "sort": "relevance",
  "time": "all",
  "proxyCountry": "US"
}
```

# Actor output Schema

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

All collected Reddit records from this run. Use the Export button on the Output tab to download in CSV, Excel, JSON, or XML format.

# 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 = {
    "search_type": "posts",
    "keyword": [
        "flower"
    ],
    "max_items": 10,
    "sort": "relevance",
    "time": "all",
    "proxyCountry": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlix/reddit-search").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 = {
    "search_type": "posts",
    "keyword": ["flower"],
    "max_items": 10,
    "sort": "relevance",
    "time": "all",
    "proxyCountry": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("crawlix/reddit-search").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 '{
  "search_type": "posts",
  "keyword": [
    "flower"
  ],
  "max_items": 10,
  "sort": "relevance",
  "time": "all",
  "proxyCountry": "US"
}' |
apify call crawlix/reddit-search --silent --output-dataset

```

## MCP server setup

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

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/SZEXhbMoCv9ep2dAe/builds/xsWBaPbiwwtGxMfbg/openapi.json
