# Reddit Search Scraper (`toolzerhub/reddit-search-scraper`) Actor

Search Reddit by keyword across posts, comments, subreddits, or users. Get result ID, post ID, subreddit ID, username, title, author, subreddit, creation date, score, and comment count for every match. No Reddit account or API key required.

- **URL**: https://apify.com/toolzerhub/reddit-search-scraper.md
- **Developed by:** [ToolzerHub](https://apify.com/toolzerhub) (community)
- **Categories:** Social media, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Reddit Search Scraper

Search Reddit by keyword and export the results as structured rows. Pagination is automatic.

### Input

| Field | Use it for |
|---|---|
| **`keyword`** | What to search for. Required. |
| **`search_type`** | `post` (default), `comment`, `user` or `subreddit`. |
| **`maxItems`** | Caps the run. Default `100`. Set `0` for no limit. |

```json
{
  "keyword": "sourdough starter troubleshooting",
  "search_type": "post",
  "maxItems": 300
}
```

### Read this before picking `search_type`

**`post` and `comment` are the two that reliably return results.** Those are the search types Reddit serves properly, and they are what this Actor is built around.

`user` and `subreddit` are accepted, but Reddit frequently returns nothing at all for them -- not an error, just an empty response. When that happens the run log says so explicitly rather than reporting a clean run that happened to save zero rows. Do not read an empty `user` search as "no such accounts exist".

If you need to find accounts, search `post` or `comment` for your topic and collect the `author` column instead. It is a longer route and a more reliable one.

### Output

One row per result. Which fields are populated depends on what you searched for.

| Field | Contents |
|---|---|
| **`id`** | The record's own ID |
| **`post_id`** | Post ID, on post and comment results |
| **`subreddit_id`**, **`subreddit`** | The community the result belongs to |
| **`username`**, **`author`** | The account behind the result |
| **`title`** | Post or subreddit title |
| **`created_at`** | Creation timestamp |
| **`score`** | Net score |
| **`num_comments`** | Comment count, on post results |

```json
{
  "id": "t3_1v03k9x",
  "post_id": "t3_1v03k9x",
  "title": "My starter smells like acetone - is it dead?",
  "author": "breadanxiety",
  "subreddit": "Sourdough",
  "created_at": "2026-07-20T14:31:07.000Z",
  "score": 842,
  "num_comments": 213
}
```

Rows come out flat. Reddit wraps every search hit in a layer of ranking and telemetry around the actual record; that wrapper is stripped, so the fields you want are at the top level rather than nested one deep.

### Questions

**Why is `title` empty on my comment results?**
Because comments do not have titles. Each `search_type` populates a different subset of the columns -- that is one table covering four result shapes, not fields going missing.

**Why did I get fewer results than `maxItems`?**
Reddit's search stops issuing cursors well before a keyword is exhausted. The run ends when there is no next page, the page is empty, or the same cursor comes back twice.

**Can I restrict the search to one subreddit?**
Not with an input field. Search the keyword and filter on the `subreddit` column afterwards, or go directly to the [Subreddit Posts Scraper](https://apify.com/toolzerhub/reddit-subreddit-posts-scraper) if you already know the community.

**Can I sort or filter by date?**
No. Results come back in Reddit's own relevance order. Sort on `created_at` after the run.

### Related Actors

| Actor | Purpose |
|---|---|
| [Reddit Post Scraper](https://apify.com/toolzerhub/reddit-post-scraper) | Full detail on the posts you found, batched cheaply |
| [Reddit Subreddit Posts Scraper](https://apify.com/toolzerhub/reddit-subreddit-posts-scraper) | Everything in one community rather than one keyword |
| [Reddit Feed Scraper](https://apify.com/toolzerhub/reddit-feed-scraper) | What is on the front page right now |

# Actor input Schema

## `keyword` (type: `string`):

Keyword or phrase to search Reddit for.

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

Type of Reddit content to search for.

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

Maximum number of items to save. Set 0 for no limit.

## Actor input object example

```json
{
  "keyword": "cats",
  "search_type": "post",
  "maxItems": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

Every record collected during this run

# 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 = {
    "keyword": "cats",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/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 = {
    "keyword": "cats",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("toolzerhub/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 '{
  "keyword": "cats",
  "maxItems": 20
}' |
apify call toolzerhub/reddit-search-scraper --silent --output-dataset

```

## MCP server setup

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