# Reddit Subreddit & Search Scraper (Posts, Scores) (`webdatatools/reddit-scraper`) Actor

Scrape Reddit posts from any subreddit listing (hot, new, top, rising, controversial) or Reddit-wide search: title, author, score, comment count, flair, time, domain and link. Comment bodies are not included.

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

## Pricing

from $0.84 / 1,000 posts

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

### What is Reddit Subreddit & Search Scraper?

Reddit Subreddit & Search Scraper collects posts from any subreddit listing (hot, new, top, rising, controversial) or from Reddit-wide search. Each post becomes one dataset row with its title, author, score, comment count, flair, time, domain and link. No Reddit login and no API key are needed.

### Why use Reddit Subreddit & Search Scraper?

- Score and comment count for subreddit listings, so you can rank posts by traction.
- Search results for any keyword, across all of Reddit.
- Pay only for posts saved. Empty results cost nothing.
- Runs through Apify Residential proxies, because Reddit blocks datacenter IPs.

### How to use Reddit Subreddit & Search Scraper

1. Enter one or more subreddits (`webscraping` or `r/webscraping`) and/or search queries.
2. Choose the sort and, for Top or Controversial, the timeframe.
3. Set the maximum posts per subreddit and run it.
4. Download the dataset as JSON, CSV, Excel or HTML, or read it through the API.

### Example input

```json
{
    "subreddits": ["programming"],
    "sort": "top",
    "timeframe": "week",
    "maxPostsPerSubreddit": 30,
    "searchQueries": []
}
```

### Example output

A real row from a run on 2026-10-23 (subreddit `programming`, sort Top, timeframe week):

```json
{
    "source": "subreddit",
    "query": "programming",
    "postId": "t3_1xbl8y1",
    "title": "Eight Bits of Trust; eMudhra's CA keys cracked in milliseconds",
    "subreddit": "programming",
    "author": "Dear-Economics-315",
    "score": 899,
    "commentCount": 151,
    "upvoteRatio": 0.9827956989247312,
    "createdAt": "2026-10-21T12:01:54.307Z",
    "postType": "link",
    "domain": "scotthelme.co.uk",
    "flair": null,
    "url": "https://www.reddit.com/r/programming/comments/1xbl8y1/eight_bits_of_trust_emudhras_ca_keys_cracked_in/",
    "snippet": null,
    "language": "en",
    "listing": "top/week",
    "position": 1
}
```

Search rows have the same shape, with `source: "search"`, the search text in `query`, and `snippet` filled. Score, comment count, upvote ratio, post type and domain are `null` for search rows, because Reddit's search feed does not include them.

### Data table

| Field | Subreddit rows | Search rows |
|---|---|---|
| `postId`, `title`, `author`, `url`, `createdAt`, `subreddit` | yes | yes |
| `score`, `commentCount`, `upvoteRatio`, `postType`, `domain`, `flair`, `language` | yes | `null` |
| `snippet` (start of the post text) | `null` | yes |
| `listing` | sort (for example `hot`, `top/week`) | `search` |

### Input parameters

- **Subreddits**: subreddit names or subreddit URLs.
- **Search queries**: Reddit-wide search terms. Each query returns up to 25 posts.
- **Subreddit sort**: hot, new, top, rising or controversial.
- **Timeframe**: used for Top and Controversial, and for search when the search sort is Top.
- **Search sort**: relevance, new, top or most comments.
- **Max posts per subreddit**: 1 to 1000. Reddit returns about 24 posts per page. A listing can end before the maximum.
- **Proxy configuration**: keep the RESIDENTIAL group.
- **Max concurrency**: how many subreddits or searches run at the same time.

### Pricing

Pay per post saved: a pay-per-event price per result (see the Actor page for the current tiers). The run stops before it would exceed your max total charge.

### Reddit Subreddit & Search Scraper vs. the Reddit API

The official Reddit API needs an application and OAuth. This Actor reads the public pages that Reddit serves to visitors, so it needs no account. It does not provide comment bodies, post bodies, user profiles or private or quarantined communities.

### Using Reddit Subreddit & Search Scraper with AI agents and MCP

Use it from the Apify MCP server or the API with a subreddit name or search query. Pay-per-event pricing is charged per post, so an agent that sets a `maxTotalChargeUsd` never goes over that budget.

### FAQ

**Why do some runs return fewer posts than I asked for?**
Reddit ends a listing after a limited number of posts for some sorts and communities. The Actor stops when Reddit returns no new posts.

**Why is score empty for search results?**
Reddit's search feed does not include score or comment count. Use a subreddit listing if you need those numbers.

**Does it collect comments?**
No. Comment pages were not reachable through the residential route during testing (2026-10-23), so comments are not included.

**Does it work from a datacenter IP?**
No. Reddit returned HTTP 403 for direct datacenter requests. Keep the RESIDENTIAL proxy group.

### Support and feedback

If you find a problem, open an issue in the Actor's Issues tab. A review helps other users find it.

# Actor input Schema

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

Subreddit names, e.g. `webscraping` or `r/webscraping`. Full subreddit URLs also work.

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

Reddit-wide search terms, e.g. `web scraping proxy`. Search returns up to 25 posts per query.

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

Listing order for subreddits.

## `timeframe` (type: `string`):

Used for subreddit Top and Controversial, and for search when Search sort is Top.

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

Order for search queries.

## `maxPostsPerSubreddit` (type: `integer`):

Posts to collect for each subreddit (Reddit returns about 24 per page).

## `proxyConfiguration` (type: `object`):

Reddit blocks datacenter IPs. Keep Apify Proxy with the RESIDENTIAL group.

## `maxConcurrency` (type: `integer`):

Jobs (subreddits or searches) run at the same time.

## Actor input object example

```json
{
  "subreddits": [
    "webscraping"
  ],
  "searchQueries": [],
  "sort": "hot",
  "timeframe": "week",
  "searchSort": "new",
  "maxPostsPerSubreddit": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 2
}
```

# Actor output Schema

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

All posts from 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 = {
    "subreddits": [
        "webscraping"
    ],
    "searchQueries": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("webdatatools/reddit-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 = {
    "subreddits": ["webscraping"],
    "searchQueries": [],
}

# Run the Actor and wait for it to finish
run = client.actor("webdatatools/reddit-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 '{
  "subreddits": [
    "webscraping"
  ],
  "searchQueries": []
}' |
apify call webdatatools/reddit-scraper --silent --output-dataset

```

## MCP server setup

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