# Reddit Scraper API (`harshmaur/reddit-scraper-api`) Actor

Real-time Reddit API: send one HTTP request with keywords or Reddit links and get posts, comments, communities or user profiles back in seconds. No Reddit API key. Pay per result.

- **URL**: https://apify.com/harshmaur/reddit-scraper-api.md
- **Developed by:** [Harsh Maur](https://apify.com/harshmaur) (community)
- **Categories:** Social media, Lead generation, Agents
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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 Scraper API — Real-Time Reddit Data in One HTTP Request (No Reddit API Key)

![Reddit Scraper API banner: one HTTP request in, Reddit data out, no run to poll](https://raw.githubusercontent.com/harshmaur/reddit-readme-assets/main/banners/server-v1.png)

**Call one URL, get Reddit posts, comments, communities and user profiles back in the same answer. No run to start, no dataset to poll, no Reddit app to register. Pay only for the items you get.**

[![Try on Apify](https://img.shields.io/badge/Apify-Try%20Now-00C7B7?style=for-the-badge\&logo=apify)](https://apify.com/harshmaur/reddit-scraper-api) [![Input Schema](https://img.shields.io/badge/Input-Schema-blue?style=for-the-badge)](https://apify.com/harshmaur/reddit-scraper-api/input-schema) [![API Docs](https://img.shields.io/badge/API-Docs-orange?style=for-the-badge)](https://apify.com/harshmaur/reddit-scraper-api/api)

[What it is](#what-is-reddit-scraper-api) • [Quick start](#how-to-call-the-reddit-scraper-api) • [Requests](#request-examples-keywords-subreddits-posts-and-users) • [Response](#response-format) • [Limits](#request-limits-and-response-time) • [Errors](#error-codes) • [Pricing](#how-much-does-the-reddit-scraper-api-cost) • [FAQ](#faq)

***

### What is Reddit Scraper API?

**Reddit Scraper API** is a Reddit data endpoint that stays online. You send an HTTP request with keywords or Reddit links. The answer to that request holds the items as JSON.

Use it when your code needs Reddit data **now**:

- A chatbot or AI agent that looks up what Reddit says about a product while the user waits.
- A sales tool that checks new posts that mention a competitor when a rep opens a lead.
- A dashboard widget that shows the latest posts from a subreddit when the page loads.
- A Slack command or a webhook step in n8n, Make or Zapier that needs one answer, not a job to track.

It reads the public Reddit pages that anyone can open in a browser. You do not need a Reddit account, a Reddit developer app or a Reddit API key.

#### What one request can return

Each item has a `dataType` field:

- **`post`**: title, body, author, subreddit, score, comment count, flair, media and dates.
- **`comment`**: body, author, score, depth, the parent and the post it belongs to.
- **`community`**: a subreddit with its title, description and member count.
- **`user_profile`**: a Redditor's karma, account age and profile links.

The fields have the same names as the dataset of [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper), so code that reads one listing can read the other.

***

### How to call the Reddit Scraper API

![How Reddit Scraper API works: send one GET or POST request to /scrape and get the items back in the answer, with request limits and typical response times](https://raw.githubusercontent.com/harshmaur/reddit-readme-assets/main/sections/server-flow-v1.png)

1. Copy your Apify API token from [Settings → API & Integrations](https://console.apify.com/settings/integrations).
2. Send a GET request to `/scrape` with the fields as query parameters:

```bash
curl "https://harshmaur--reddit-scraper-api.apify.actor/scrape?searchTerms=notion%20alternative&maxPostsCount=20" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN"
```

3. Read `items` from the JSON answer.

You can also send the token as a `token` query parameter. The first request after a quiet period can take longer, because the server starts first. The next requests go to the server that is already running.

***

### Request examples: keywords, subreddits, posts and users

Every field from the input form works as a query parameter (GET) or in a JSON body (POST). Repeat a query parameter to send a list: `searchTerms=crm&searchTerms=helpdesk`.

#### Search Reddit for a keyword

```bash
curl "https://harshmaur--reddit-scraper-api.apify.actor/scrape?searchTerms=best%20crm%20for%20startups&searchSort=new&searchTime=week&maxPostsCount=25" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN"
```

#### Get the newest posts from a subreddit

```bash
curl -X POST "https://harshmaur--reddit-scraper-api.apify.actor/scrape" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://www.reddit.com/r/productivity/new/"], "maxPostsCount": 25}'
```

#### Get a post and its comments

```json
{
  "startUrls": ["https://www.reddit.com/r/productivity/comments/1r4r2bm/"],
  "crawlCommentsPerPost": true,
  "maxCommentsPerPost": 50
}
```

#### Get a user profile and recent posts

```json
{
  "startUrls": ["https://www.reddit.com/user/spez/"],
  "maxPostsCount": 20,
  "maxCommentsCount": 0
}
```

#### Python

```python
import requests

answer = requests.post(
    "https://harshmaur--reddit-scraper-api.apify.actor/scrape",
    headers={"Authorization": "Bearer YOUR_APIFY_TOKEN"},
    json={"searchTerms": ["notion alternative"], "maxPostsCount": 20},
    timeout=90,
)
for item in answer.json()["items"]:
    print(item["dataType"], item.get("title"), item.get("postUrl"))
```

#### JavaScript

```js
const answer = await fetch("https://harshmaur--reddit-scraper-api.apify.actor/scrape", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_APIFY_TOKEN", "Content-Type": "application/json" },
  body: JSON.stringify({ subredditUrls: ["r/SaaS"], maxPostsCount: 10 }),
});
const { items, meta } = await answer.json();
```

***

### Response format

![The Reddit Scraper API response: an items list and a meta object with itemCount, partial, durationMs, failedRequests and warnings](https://raw.githubusercontent.com/harshmaur/reddit-readme-assets/main/sections/server-output-v1.png)

A successful answer has HTTP status 200, the `items` list and a `meta` summary:

```json
{
  "items": [
    {
      "dataType": "post",
      "id": "t3_1r4r2bm",
      "parsedId": "1r4r2bm",
      "title": "/r/productivity is being hit hard by AI generated slop",
      "body": "Please report any content that you believe is AI generated...",
      "authorName": "mcagent",
      "communityName": "r/productivity",
      "postUrl": "https://www.reddit.com/r/productivity/comments/1r4r2bm/",
      "upVotes": 234,
      "commentsCount": 104,
      "flair": null,
      "postType": "text",
      "createdAt": "2026-02-14T17:51:20.000Z",
      "crawledAt": "2026-11-18T12:55:36.440Z"
    }
  ],
  "meta": {
    "itemCount": 1,
    "partial": false,
    "durationMs": 2079,
    "failedRequests": 0,
    "warnings": []
  }
}
```

- `meta.itemCount` is the number of items, and the number of results you pay for.
- `meta.partial` is `true` when the time limit stopped the request early. You get the items found until then.
- `meta.failedRequests` counts Reddit pages that could not be read for this request.
- `meta.warnings` lists input that was changed or ignored, each with a `code` and a `message`.

***

### Request limits and response time

One request is one short job. These limits keep each answer fast:

| Limit | Value |
| --- | --- |
| Posts in one request | 100 |
| Comments in one request | 200 |
| Communities in one request | 100 |
| Time for one request | 60 seconds, then a partial answer |
| Request body | 1 MB |

The posts limit counts every target together. For example, 3 keywords with `maxPostsCount` 50 ask for 150 posts, so the API refuses the request and tells you which field to lower. The answer arrives in milliseconds, and you pay nothing for it.

Typical times we measured: a subreddit page in about 2 seconds, a user profile with 20 posts in about 5 seconds, a keyword search for 20 posts in 13 to 17 seconds, and a post with 50 comments in about 20 seconds.

Do you need thousands of posts, a full subreddit archive or a daily schedule? Use [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper). It runs as a batch job with no per-request limit.

***

### Error codes

An error answer has this shape: `{"error": {"code": "...", "message": "..."}}`.

| Status | `code` | What to do |
| --- | --- | --- |
| 400 | `invalid_value`, `invalid_json`, `limit_exceeded`, `missing_targets` and other input codes | Fix the input. The message names the field. |
| 404 | `not_found` | Send the request to `/scrape`. |
| 405 | `method_not_allowed` | Use GET or POST. |
| 413 | `body_too_large` | Send a body smaller than 1 MB. |
| 429 | `server_busy` | Wait for the seconds in the `Retry-After` header, then send it again. |
| 502 | `fetch_failed` | Reddit gave no data for this request. Try again in a minute. |
| 500 | `internal_error` | Try again. If it continues, open an issue. |

***

### How much does the Reddit Scraper API cost?

You pay per result. Each post, comment, community or user profile in an answer is one result. The price per 1,000 results is on the [Pricing tab](https://apify.com/harshmaur/reddit-scraper-api/pricing).

- A request that fails, or that the API refuses, costs nothing.
- An empty answer costs nothing.
- `maxPostsCount` and the other limits are caps. If a keyword matches only 8 posts, you pay for 8.

***

### FAQ

#### How is this different from running Reddit Scraper through the API?

Reddit Scraper is a batch job. You start a run, wait for it to finish, then read the dataset. Reddit Scraper API answers the HTTP request itself, so one call gives you the data. Choose the API for small, fast lookups and Reddit Scraper for large or scheduled jobs.

#### Which input fields does the API support?

It supports the search, URL, date, flair, NSFW, sort and comment fields of Reddit Scraper, with the same names. The AI analysis fields and delivery to Slack, Notion or Google Sheets are only in [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper). If you send one of those fields, the API ignores it and adds an `unsupported_field` warning to `meta.warnings`.

#### Can I filter posts by date?

Yes. Use `postedAfter` and `postedBefore` with a date (`2026-11-01`) or a relative period (`7 days`). Use `commentedAfter` and `commentedBefore` for comments.

#### Can I search inside one subreddit?

Yes. Add `withinCommunity` with the subreddit name, for example `withinCommunity=startups`.

#### Can I send many requests at the same time?

Yes. The API runs several requests at the same time and adds more capacity when the load goes up. When all slots are in use, you get a 429 answer with a `Retry-After` header. Wait that many seconds and send the request again.

#### Can I use it from an AI agent?

Yes. The API answers plain HTTP with JSON, so any agent that can call a URL can use it. This listing also publishes an OpenAPI description of `/scrape`, which many agent frameworks can import as a tool.

#### Can I start it from the Apify Console instead?

Yes. Fill in the input form and start a run. The run does one request and saves the items to the run's dataset.

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

No. The API reads public Reddit pages. You need only your Apify API token.

***

### More Reddit scrapers

| Actor | When to use it instead |
| --- | --- |
| [Reddit Scraper](https://apify.com/harshmaur/reddit-scraper) | Large or scheduled jobs: thousands of posts, full subreddits, AI analysis and delivery to Slack, Notion or Sheets. |
| [Reddit Search Scraper](https://apify.com/harshmaur/reddit-search-scraper) | Keyword monitoring as a scheduled run that saves every match to a dataset. |
| [Reddit Comments Scraper](https://apify.com/harshmaur/reddit-comments-scraper) | Every comment in long threads, with nested replies, from a list of post links. |
| [Reddit User Scraper](https://apify.com/harshmaur/reddit-user-scraper) | Post and comment history of many Redditors in one run. |
| [Subreddit Scraper](https://apify.com/harshmaur/reddit-subreddit-scraper) | The full post archive of a community. |

***

[![Try Reddit Scraper API](https://img.shields.io/badge/🚀_Try_Reddit_Scraper_API-00C7B7?style=for-the-badge)](https://apify.com/harshmaur/reddit-scraper-api)

*Built by [Harsh Maur](https://github.com/harshmaur) • Questions? [Contact support](mailto:harshmaur@gmail.com)*

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search Reddit for, for example "best crm for startups". Each keyword is a separate search. A request returns at most 100 posts in total, so 4 keywords × 25 posts fit and 5 × 25 do not.

## `searchPosts` (type: `boolean`):

Include posts in keyword search results.

## `searchComments` (type: `boolean`):

Include comments in keyword search results. Each comment is a billed result (up to 'Max search comments' per keyword).

## `searchCommunities` (type: `boolean`):

Include communities (subreddits) in keyword search results.

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

Restrict keyword search to a single subreddit. This is a name, not a post limit. Accepts a bare name (developers), r/developers, or a full subreddit URL. Leave empty to search all of Reddit. Only applies to Search Keywords.

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

Controls how keyword search results are ranked. Only applies to Search Keywords, not Direct URLs.

## `searchTime` (type: `string`):

Limit keyword search results to posts from a specific time window. Only applies to Search Keywords.

## `startUrls` (type: `array`):

Reddit links to scrape: a post, a subreddit page, a user profile or a search page. Sort and time range do not apply to links.

## `subredditUrls` (type: `array`):

Subreddit names or links to scrape, for example AskReddit or r/AskReddit. All subreddits share one Max posts total.

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

Keep only posts created on or after this date (YYYY-MM-DD, UTC) or a relative period such as '1 day'. Results come newest first. A window far in the past can need more than 60 seconds; the answer then has partial results.

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

Only keep posts created on or before this date (the end of that day, 23:59:59 UTC). A relative value such as '1 day' keeps only posts at least one day old.

## `commentedAfter` (type: `string`):

Only keep comments created on or after this date (UTC), or within a relative period such as '1 day' for a daily schedule. Applies when comments are collected (comment search, or 'Scrape comments for each post').

## `commentedBefore` (type: `string`):

Only keep comments created on or before this date (UTC).

## `onlyWithFlair` (type: `boolean`):

When enabled, drop posts with no flair and keep only those that have a flair assigned. Applies to Search Keywords, subreddit URLs, the Full Subreddit Scrape, and user profiles.

## `crawlCommentsPerPost` (type: `boolean`):

Add the comments of each post to the results. Max posts × Max comments per post must be 200 or less, for example 10 posts × 20 comments.

## `includeNSFW` (type: `boolean`):

Include posts marked as Not Safe For Work in results. Applies to both Search Keywords and Direct URLs.

## `maxPostsCount` (type: `integer`):

Posts returned for each keyword and each Reddit URL. All subreddits in Subreddits share one total. One request returns at most 100 posts.

## `maxCommentsCount` (type: `integer`):

Comments returned for each keyword when 'Search for comments' is on, and for each user profile. One request returns at most 200 comments.

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

Comments returned for each post when 'Scrape comments for each post' is on. One request returns at most 200 comments.

## `maxCommunitiesCount` (type: `integer`):

Communities returned for each keyword when 'Search for communities' is on. One request returns at most 100 communities.

## Actor input object example

```json
{
  "searchTerms": [
    "notion alternative"
  ],
  "searchPosts": true,
  "searchComments": true,
  "searchCommunities": false,
  "withinCommunity": "",
  "searchSort": "new",
  "searchTime": "all",
  "startUrls": [],
  "subredditUrls": [],
  "onlyWithFlair": false,
  "crawlCommentsPerPost": false,
  "includeNSFW": false,
  "maxPostsCount": 20,
  "maxCommentsCount": 200,
  "maxCommentsPerPost": 20,
  "maxCommunitiesCount": 2
}
```

# Actor output Schema

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

All Reddit items from the run. Use the 'dataType' field to filter by type.

# 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 = {
    "searchTerms": [
        "notion alternative"
    ],
    "searchComments": true,
    "searchSort": "new",
    "searchTime": "all",
    "startUrls": [],
    "crawlCommentsPerPost": false,
    "maxPostsCount": 20,
    "maxCommentsCount": 200,
    "maxCommentsPerPost": 20,
    "maxCommunitiesCount": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("harshmaur/reddit-scraper-api").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 = {
    "searchTerms": ["notion alternative"],
    "searchComments": True,
    "searchSort": "new",
    "searchTime": "all",
    "startUrls": [],
    "crawlCommentsPerPost": False,
    "maxPostsCount": 20,
    "maxCommentsCount": 200,
    "maxCommentsPerPost": 20,
    "maxCommunitiesCount": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("harshmaur/reddit-scraper-api").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 '{
  "searchTerms": [
    "notion alternative"
  ],
  "searchComments": true,
  "searchSort": "new",
  "searchTime": "all",
  "startUrls": [],
  "crawlCommentsPerPost": false,
  "maxPostsCount": 20,
  "maxCommentsCount": 200,
  "maxCommentsPerPost": 20,
  "maxCommunitiesCount": 2
}' |
apify call harshmaur/reddit-scraper-api --silent --output-dataset

```

## MCP server setup

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

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/p0fPxoRIMZGnhfKJb/builds/VlpUR0xHuYT2G5DKA/openapi.json
