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

Reddit API Scraper searches Reddit by keyword or subreddit and returns post title, subreddit, author, score, upvote ratio, comment count and flair, with sort options. No Reddit account or API key needed. Export as JSON, CSV or Excel, or use the API.

- **URL**: https://apify.com/socialdataapi/reddit-api-scraper.md
- **Developed by:** [Social Data API](https://apify.com/socialdataapi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.95 / 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 API Scraper — Titles, Scores and Comments

Reddit API Scraper is a reddit scraper that searches Reddit by keyword and returns structured post data — title, subreddit, author, score, upvote ratio, and comment count. Search all of Reddit or narrow to specific subreddits, then sort by new, hot, top, relevance, or comments. Every response is **structured JSON**, ready to pass to an LLM, index into a vector store, or feed a brand-monitoring pipeline. No Reddit account, API key, or OAuth setup is needed — only public post data is read. Start with one keyword and scale from there.

![Reddit API Scraper: every matching Reddit post as JSON](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/h-reddit-api-scraper-hero.webp)

***

### What data can I extract with Reddit API Scraper?

Using this Reddit post search API, you will be able to extract the following Reddit data:

| 🔎 Keyword matched | 🆔 Post ID | 📝 Title | 💬 Self text (if text post) |
| --- | --- | --- | --- |
| 📘 Subreddit | 👤 Author username | ⭐ Score (net upvotes) | 💬 Comment count |
| 📊 Upvote ratio | 🔁 Crosspost count | 🏆 Award count | 📅 Created date (epoch + ISO) |
| 🚩 NSFW flag | 🎞️ Is-video flag | 📄 Is-self-post flag | 🖼️ Is-gallery flag |
| 🔗 Permalink | 🌐 Full URL | 🏷️ Post flair | 🏷️ Author flair |
| 🆔 Subreddit ID | 🔒 Subreddit type | 🔢 Post fullname (prefixed ID) | 🆔 Author ID |

***

### How to use Reddit API Scraper

Anyone who needs to scrape Reddit posts by keyword — a brand manager, a market researcher, or a RAG pipeline builder — gets one typed JSON row per matching post, grouped by keyword, from a single run.

**Copy to your AI assistant:**

```text
Reddit API Scraper (Apify Actor ID: socialdataapi/reddit-api-scraper, https://apify.com/socialdataapi/reddit-api-scraper) is an Apify Actor that returns Reddit posts matching one or more keywords as structured JSON: title, subreddit, author, score, upvote ratio, comment count, flair, and timestamps. Use it whenever someone needs Reddit discussion data without cookies, a login, or OAuth setup - brand or keyword monitoring, building a RAG corpus from real discussion text, or tracking engagement trends for a topic over time. Inputs: searchKeywords (array, required, one or more search terms, bulk-edit supported), subredditNames (array, optional, restricts the search to specific subreddits; leave empty to search all of Reddit), resultsLimitPerKeyword (integer, default 10, minimum 1, maximum 1000, posts to fetch per keyword), sorting (string, one of "new"|"hot"|"top"|"relevance"|"comments", default "new"). Each row also carries a keyword field naming which search found it, and a metaData object echoing that keyword for grouping. Reddit returns at most about 250 results for one search order; when resultsLimitPerKeyword is higher, the Actor adds results from the other orders and deduplicates by post ID.
```

#### Reddit API Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Add the Apify MCP server and your AI assistant can find and call this Actor on its own — no glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/reddit-api-scraper"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [**Reddit API Scraper**](https://apify.com/socialdataapi/reddit-api-scraper) in the Apify Store.
3. Enter your search keyword(s) and, optionally, the subreddits to scope the search to.
4. Click **Start**.
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale Reddit API Scraper to bulk

Used as a bulk reddit post scraper, `searchKeywords` and `subredditNames` both accept multiple values with bulk-edit support (one entry per line), so a single run already searches every keyword — optionally scoped to every listed subreddit — without repeated runs. Raise `resultsLimitPerKeyword` (up to 1000) to pull more posts per keyword in the same run.

***

### ✨ Features

Reddit API Scraper is a reddit data extractor that fetches clean, structured posts matching your keywords ⚡ with no HTML parsing required. It's ideal for brand and keyword monitoring, building a RAG corpus from real discussion text, tracking engagement trends over time, and scouting mentions inside specific communities.

It extracts, per post:

- **Title and self text** – the post's own headline and body text for text posts
- **Engagement metrics** – score, upvote ratio, comment count, crosspost count, and awards
- **Subreddit and author** – which community the post is in and who posted it
- **Flair and flags** – post and author flair, plus NSFW/video/gallery/original-content flags
- **Timestamps** – post creation time as both a raw Unix timestamp and an ISO 8601 string

⚡ Posts are written to the dataset the moment each one is found for its keyword, not buffered until a keyword or the run finishes, and every request runs through a fresh residential proxy session.

***

### Use cases 💡

Whether you need a reddit keyword monitoring tool for ongoing brand tracking or a one-off research pull, here's who gets value from each field:

- **Brand manager** — run it as a reddit brand mention scraper, tracking mentions by subreddit, score, and comment count to spot which communities drive engagement.
- **Market researcher** — build a time-ordered corpus of discussion text for a topic using self text and creation date.
- **RAG/AI engineer** — feed title and self text into a retrieval index, citing the permalink.
- **Data analyst** — chart engagement trends for a keyword over time using score and upvote ratio.
- **Community manager** — scope a search to specific subreddits and track recurring authors.

Building an AI agent? [Connect Reddit API Scraper over MCP](#reddit-api-scraper-mcp-server-use-these-actors-from-chatgpt-claude-or-cursor) and let it call the actor on its own.

***

### Why choose this actor?

1. **Streams every match as it's found.** Each post is pushed to the dataset the moment it's fetched for its keyword — not buffered until a keyword or the run finishes — and pages are deduplicated by post ID as they're walked.
2. **36 documented fields per post.** Every row carries title, self text, engagement metrics, flair, timestamps, and both an author and subreddit identity, with no HTML to strip out.
3. **5 sort orders and subreddit scoping, one Actor.** Search all of Reddit or scope to specific subreddits, sorted by new, hot, top, relevance, or comments, with results from other orders merged in automatically when one order alone can't reach your requested limit.

***

### ⬇️ Input

![Reddit API Scraper input: keywords, subreddits, results limit and sort order](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/h-reddit-api-scraper-input.webp)

The Actor accepts one or more search keywords in `searchKeywords` — the only required field.

| Parameter | Required | Type | Description | Example value |
| --- | --- | --- | --- | --- |
| `searchKeywords` | **Yes** | array | Words or phrases to search on Reddit. Bulk-edit supported, one keyword per line. | `["webscraping", "python"]` |
| `subredditNames` | No | array | Restrict the search to specific subreddits. Leave empty to search all of Reddit. | `["webscraping"]` |
| `resultsLimitPerKeyword` | No | integer (default `10`, minimum `1`, maximum `1000`) | Maximum number of posts to fetch per keyword. Higher values take longer. | `50` |
| `sorting` | No | string enum (default `"new"`) | Post order: `new`, `hot`, `top`, `relevance`, or `comments`. | `"new"` |

#### Free plan limits

Free plan: up to 20 posts per run (all keywords together) and 200 per month; paid plans have no limit.

#### Example input

```json
{
  "searchKeywords": ["webscraping", "python"],
  "subredditNames": ["webscraping"],
  "resultsLimitPerKeyword": 50,
  "sorting": "new"
}
```

***

### ⬆️ Output

![Reddit API Scraper output: one row per post with keyword, title, subreddit and author](https://api.apify.com/v2/key-value-stores/WYkyEfqs10huyXYxr/records/h-reddit-api-scraper-output.webp)

Every matching post is one typed, normalized JSON item with the same 36-key field set on every run, written to the dataset the moment it's found. Export Reddit posts to CSV, JSON, Excel, or any other format the Apify dataset export supports.

#### Example output

```json
{
  "keyword": "webscraping",
  "id": "1abcde",
  "name": "t3_1abcde",
  "title": "Best practices for large-scale web scraping in 2026",
  "selftext": "Curious what people are using for rotating proxies these days...",
  "selftext_html": "<div class=\"md\"><p>Curious what people are using for rotating proxies these days...</p></div>",
  "subreddit": "webscraping",
  "subreddit_name_prefixed": "r/webscraping",
  "subreddit_id": "t5_2sqho",
  "subreddit_type": "public",
  "author": "some_user",
  "author_fullname": "t2_xxxxx",
  "author_flair_text": null,
  "author_flair_type": "text",
  "link_flair_text": "Discussion",
  "link_flair_text_color": "dark",
  "link_flair_type": "text",
  "score": 214,
  "ups": 214,
  "upvote_ratio": 0.97,
  "num_comments": 38,
  "num_crossposts": 1,
  "total_awards_received": 0,
  "created_utc": 1753180800,
  "created_at": "2025-07-22T12:00:00+00:00",
  "over_18": false,
  "is_video": false,
  "is_self": true,
  "is_original_content": false,
  "is_gallery": false,
  "post_hint": null,
  "domain": "self.webscraping",
  "thumbnail": "self",
  "permalink": "/r/webscraping/comments/1abcde/best_practices_for_large_scale_web_scraping/",
  "url": "https://www.reddit.com/r/webscraping/comments/1abcde/best_practices_for_large_scale_web_scraping/",
  "metaData": {
    "keyword": "webscraping"
  }
}
```

***

### How does it work?

The Actor runs Reddit's own post search over plain HTTP rather than rendering reddit.com in a browser, so there is no headless browser in the request path. Your keyword, and optionally each subreddit, is searched in the order you picked, following pages until your configured limit is reached and deduplicating by post ID along the way. Every request goes through a fresh residential proxy session, and a refused or timed-out page is retried before being given up on. Only publicly accessible post data is returned, and the output schema stays stable regardless of changes to Reddit's own site or ranking algorithms.

***

### How do you integrate Reddit API Scraper into your stack?

Reddit API Scraper works with what you already use: a REST API callable from any language, MCP for AI agents, and no-code automation tools.

#### No-code tools (n8n, Make, LangChain)

In **n8n**, use the Apify node's "Run an Actor" action, or the HTTP Request node pointed at the Actor's run-sync endpoint with your Apify token. In **Make**, use the Apify app's "Run an Actor" module followed by "Get Dataset Items" to route new matching posts into Slack, a spreadsheet, or a CRM. In **LangChain**, install `langchain-apify` and call `ApifyActorsTool()` once the Actor is in your account to let an agent run it directly.

#### MCP integration for AI agents

Add the Apify MCP server and your agent can search for, add, and call this Actor on its own:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/reddit-api-scraper"
```

This registers the Apify MCP server as a tool your agent can call directly. Compatible with Claude Code, Cursor, and Windsurf.

***

### Is it legal to scrape Reddit posts?

Scraping publicly visible Reddit content is generally lawful — data a website makes available without requiring a login falls outside the scope of anti-hacking laws like the U.S. Computer Fraud and Abuse Act (*hiQ Labs, Inc. v. LinkedIn Corp.*, 9th Cir., 2019). Reddit API Scraper returns only publicly visible data — whatever content and metadata anyone can see on Reddit without signing in. Because each post record includes an author's Reddit username, it can still count as personal data under GDPR or CCPA if that username is linked or linkable to an identifiable person. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does Reddit API Scraper return?

The top fields are title, subreddit, author, score, and comment count, alongside 31 more covering flair, timestamps, and post flags — see [the data fields section](#what-data-can-i-extract-with-reddit-api-scraper) for the full list.

#### Does Reddit API Scraper require a Reddit account or login?

No. This reddit API scraper no login tool needs no Reddit credentials, API key, or app registration to set up — only an Apify account to run it.

#### What happens if a search returns zero results?

The Actor logs the keyword as returning 0 posts and moves on to the next one; no error is thrown and the run continues.

#### Can I scrape multiple Reddit keywords or subreddits at once?

Yes. As a reddit subreddit search scraper, `searchKeywords` and `subredditNames` both accept multiple values with bulk-edit support, and every keyword is searched against every listed subreddit — or all of Reddit if none are given — in the same run.

#### Does Reddit API Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — it's reachable through the Apify MCP server, which lets an AI assistant find and call it directly. Any agent that can call an HTTP endpoint can also use the REST API directly.

#### Does Reddit API Scraper return data in a format LLMs can use directly?

Yes. Typed, normalized JSON with consistent field names, no HTML parsing and no selectors. Pass title and self text straight to an LLM, index them into a vector store, or feed them to an agent tool with no transformation step.

#### What happens when Reddit changes its layout or anti-bot system?

The maintaining team updates the Actor when Reddit changes its site or defenses — your calls keep returning the same JSON schema with no changes on your end.

#### Can I use Reddit API Scraper without managing proxies or browser infrastructure?

Yes. There's no browser to configure — requests go out over plain HTTP — and a residential proxy session is applied automatically to every request.

#### Which Reddit post fields work best for AI training data and RAG indexing?

For RAG, index title and self text as your text content and keep the permalink as the citation link. For training data, post ID, created date, score, and comment count return as consistently typed primitives across every record.

# Actor input Schema

## `searchKeywords` (type: `array`):

Words or phrases to search on Reddit (e.g. webscraping, python, ChatGPT). Add multiple keywords with + Add or Bulk edit — results are grouped by keyword in the output. One keyword per line in bulk mode.

## `subredditNames` (type: `array`):

Optional. Restrict the search to specific subreddits (e.g. python, programming, learnprogramming). Leave empty to search all of Reddit. Add multiple with + Add or Bulk edit.

## `resultsLimitPerKeyword` (type: `integer`):

Maximum number of posts to fetch per keyword (1-1000). Higher values take longer. Default: 10. Free plan: up to 20 posts per run (all keywords together) and 200 per month; paid plans have no limit.

## `sorting` (type: `string`):

Order of the returned posts: New (latest first), Hot (trending now), Top (most upvoted of all time), Relevance (best match to your keyword), or Comments (most-commented first). Default: New.

## Actor input object example

```json
{
  "searchKeywords": [
    "webscraping"
  ],
  "resultsLimitPerKeyword": 10,
  "sorting": "new"
}
```

# Actor output Schema

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

Scraped Reddit posts, grouped by the search keyword that found them.

# 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 = {
    "searchKeywords": [
        "webscraping"
    ]
};

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

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

```

## MCP server setup

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