# Reddit Search Scraper — Posts, Comments & Users (`logiover/reddit-search-scraper`) Actor

Search Reddit for posts, comments, or users by keyword, subreddit, time window, and sort. Returns title, author, score, subreddit, post text, URL, comments count, awards, flairs, and timestamps. Optionally fetches top comments per post. Uses Reddit's public .json endpoint — no auth, no proxy.

- **URL**: https://apify.com/logiover/reddit-search-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Automation, Social media, News
- **Stats:** 4 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 for posts, comments, or users by keyword + subreddit + time window. Returns full post metadata (title, author, score, comments count, awards, flairs, NSFW/spoiler flags, edit/created timestamps, post URL, embedded text/video/image), and optionally top comments per post.

Uses Reddit's public `.json` endpoint — no OAuth, no API key, no proxy needed for normal workloads.

### Features

- Bulk multi-search by `{query, subreddit, sort, time, type}` per item
- Search across all of Reddit or restrict to a single subreddit
- All 5 sort modes: relevance, hot, top, new, comments
- All 6 time windows: hour, day, week, month, year, all
- All 3 search types: `link` (posts), `comment`, `user`
- Optional: fetch top N comments per post (additional request each)
- Cursor-based pagination handled automatically
- Rich post normalization including isVideo/isImage/isSelfPost flags, upvote ratio, NSFW/spoiler/stickied flags, link flair, author flair, edit timestamps

### Input

```json
{
  "searches": [
    { "query": "ai agent", "subreddit": "MachineLearning", "sort": "new", "time": "month", "type": "link" },
    { "query": "openai",   "subreddit": "",               "sort": "top",  "time": "week",  "type": "link" }
  ],
  "maxResultsPerSearch": 100,
  "fetchComments": false,
  "maxCommentsPerPost": 10
}
````

| Field | Type | Default | Notes |
|---|---|---|---|
| `searches` | array | (required) | Each `{query, subreddit?, sort?, time?, type?}` |
| `maxResultsPerSearch` | int | 100 | Reddit caps at ~1000 |
| `fetchComments` | bool | false | Adds 1 request per post |
| `maxCommentsPerPost` | int | 10 | Cap when fetchComments on |

#### Sort + time + type

| Field | Options |
|---|---|
| `sort` | `relevance`, `hot`, `top`, `new`, `comments` |
| `time` | `hour`, `day`, `week`, `month`, `year`, `all` |
| `type` | `link` (posts, default), `comment`, `user` |

### Output (one row per result)

```json
{
  "resultType": "link",
  "id": "1abc234",
  "fullname": "t3_1abc234",
  "subreddit": "MachineLearning",
  "subredditId": "t5_2qh1i",
  "subredditSubscribers": 3450000,
  "author": "JaneAI",
  "authorFlair": "PhD Student",
  "title": "Our new AI agent paper achieves SOTA on...",
  "text": "We present a new approach...",
  "url": "https://arxiv.org/abs/2025.12345",
  "permalink": "https://www.reddit.com/r/MachineLearning/comments/1abc234/our_new_ai_agent_paper.../",
  "isSelfPost": false,
  "isVideo": false,
  "isImage": false,
  "thumbnail": "https://b.thumbs.redditmedia.com/...jpg",
  "score": 1245,
  "upvoteRatio": 0.94,
  "numComments": 187,
  "numCrossposts": 12,
  "awards": 3,
  "flair": "Research",
  "domain": "arxiv.org",
  "isNsfw": false,
  "isSpoiler": false,
  "isStickied": false,
  "createdAt": "2026-05-15T14:23:00.000Z",
  "editedAt": null,
  "comments": [
    { "id": "j1abc", "author": "...", "text": "Great work!", "score": 56, "createdAt": "...", "permalink": "...", "awards": 0 }
  ],
  "searchQuery": { "query": "ai agent", "subreddit": "MachineLearning", "sort": "new", "time": "month", "type": "link" },
  "scrapedAt": "2026-05-18T12:00:00.000Z"
}
```

### Use cases

- **Brand monitoring:** track mentions of your product/company across all of Reddit
- **Competitor intel:** monitor what users are saying about competitors in niche subreddits
- **Trend research:** discover emerging topics in r/MachineLearning, r/Entrepreneur, etc.
- **Content discovery:** seed your newsletter / blog with top-of-week posts per topic
- **Influencer research:** identify high-karma users posting on specific topics (use `type=user`)
- **Sentiment analysis pipelines:** bulk-ingest posts/comments for downstream NLP
- **Crisis monitoring:** real-time scrape (run every 5min) for mentions of your brand + negative sentiment keywords

### Notes

- **No auth needed:** Reddit's `.json` endpoint is public. Anonymous rate limit is generous for normal scraping (a few hundred requests per minute per IP).
- **High-volume runs:** if you scrape 1000+ posts in a tight loop you may see 429s — the actor backs off automatically. For heavy use, run with Apify residential proxy.
- **Search depth limit:** Reddit itself caps search at ~1000 results regardless of pagination — the actor stops automatically.
- **Comments are top 10 by score** — for full comment threads, use a separate dedicated Reddit comments scraper or hit `<permalink>.json` manually.
- **Old Reddit data:** for pre-2022 historical data, Pushshift dumps are more comprehensive (Reddit search ignores very old indexes).
- **`type=user` mode** returns user profiles matching the query — useful for influencer discovery in a niche.

***

### Changelog

- **2026-05-20** — Maintenance pass: reviewed the input schema and default values for a smooth one-click start, and rebuilt the Actor on the latest base image.

*Last reviewed: 2026-05-20.*

# Actor input Schema

## `searches` (type: `array`):

List of search objects. Each: `query` (required text), `subreddit` (restrict to a sub or empty for all of Reddit), `sort` (relevance/hot/top/new/comments), `time` (hour/day/week/month/year/all), `type` ('link'=posts, 'comment'=comments, 'user'=users). Each runs as a separate search.

## `maxResultsPerSearch` (type: `integer`):

Cap items per search. Reddit serves 25/page (max 100 with `limit=100`) and caps the search depth at ~1000 results (~10 pages).

## `fetchComments` (type: `boolean`):

When enabled, fetch the top 10 comments for each post (additional request per post — slows down the run). Only applies when `type` is 'link'.

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

When `fetchComments` is on, limit comments fetched per post.

## `proxyConfig` (type: `object`):

Reddit blocks Apify datacenter IPs aggressively. Use residential proxy. Default: residential pool (any country). For higher success rate try countryCode 'US'.

## Actor input object example

```json
{
  "searches": [
    {
      "query": "shopify",
      "subreddit": "ecommerce",
      "sort": "new",
      "time": "month",
      "type": "link"
    },
    {
      "query": "salesforce",
      "subreddit": "",
      "sort": "comments",
      "time": "year",
      "type": "link"
    },
    {
      "query": "side hustle",
      "subreddit": "Entrepreneur",
      "sort": "top",
      "time": "all",
      "type": "comment"
    }
  ],
  "maxResultsPerSearch": 100,
  "fetchComments": false,
  "maxCommentsPerPost": 10,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `title` (type: `string`):

Post title or comment snippet

## `subreddit` (type: `string`):

Subreddit name

## `author` (type: `string`):

Reddit username

## `score` (type: `string`):

Net upvotes

## `numComments` (type: `string`):

Comment count on the post

## `createdAt` (type: `string`):

ISO timestamp

## `permalink` (type: `string`):

Permalink to the post/comment

## `scrapedAt` (type: `string`):

ISO scrape timestamp

# 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 = {
    "searches": [
        {
            "query": "ai agent",
            "subreddit": "MachineLearning",
            "sort": "new",
            "time": "month",
            "type": "link"
        },
        {
            "query": "openai",
            "subreddit": "",
            "sort": "top",
            "time": "week",
            "type": "link"
        }
    ],
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/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 = {
    "searches": [
        {
            "query": "ai agent",
            "subreddit": "MachineLearning",
            "sort": "new",
            "time": "month",
            "type": "link",
        },
        {
            "query": "openai",
            "subreddit": "",
            "sort": "top",
            "time": "week",
            "type": "link",
        },
    ],
    "proxyConfig": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/reddit-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searches": [
    {
      "query": "ai agent",
      "subreddit": "MachineLearning",
      "sort": "new",
      "time": "month",
      "type": "link"
    },
    {
      "query": "openai",
      "subreddit": "",
      "sort": "top",
      "time": "week",
      "type": "link"
    }
  ],
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call logiover/reddit-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/reddit-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Search Scraper — Posts, Comments & Users",
        "description": "Search Reddit for posts, comments, or users by keyword, subreddit, time window, and sort. Returns title, author, score, subreddit, post text, URL, comments count, awards, flairs, and timestamps. Optionally fetches top comments per post. Uses Reddit's public .json endpoint — no auth, no proxy.",
        "version": "0.0",
        "x-build-id": "saLEk3pWdrEb1m42K"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~reddit-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-reddit-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~reddit-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-reddit-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~reddit-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-reddit-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searches"
                ],
                "properties": {
                    "searches": {
                        "title": "Searches",
                        "type": "array",
                        "description": "List of search objects. Each: `query` (required text), `subreddit` (restrict to a sub or empty for all of Reddit), `sort` (relevance/hot/top/new/comments), `time` (hour/day/week/month/year/all), `type` ('link'=posts, 'comment'=comments, 'user'=users). Each runs as a separate search."
                    },
                    "maxResultsPerSearch": {
                        "title": "Max Results per Search",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Cap items per search. Reddit serves 25/page (max 100 with `limit=100`) and caps the search depth at ~1000 results (~10 pages).",
                        "default": 100
                    },
                    "fetchComments": {
                        "title": "Fetch Top Comments per Post",
                        "type": "boolean",
                        "description": "When enabled, fetch the top 10 comments for each post (additional request per post — slows down the run). Only applies when `type` is 'link'.",
                        "default": false
                    },
                    "maxCommentsPerPost": {
                        "title": "Max Comments per Post",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "When `fetchComments` is on, limit comments fetched per post.",
                        "default": 10
                    },
                    "proxyConfig": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Reddit blocks Apify datacenter IPs aggressively. Use residential proxy. Default: residential pool (any country). For higher success rate try countryCode 'US'."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
