# Reddit Posts Scraper (`socialdataapi/reddit-posts-scraper`) Actor

Reddit Posts Scraper — Extract Reddit post data including titles, text, scores, upvotes, comments, authors, subreddit names, timestamps, and post URLs. Useful for content research, trend discovery, audience insights, competitor analysis, and social listening.

- **URL**: https://apify.com/socialdataapi/reddit-posts-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 $1.40 / 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 Posts Scraper — Subreddits, Comments, Scores and Flair

Reddit Posts Scraper pulls posts and their nested comment threads from a subreddit, a user's post history, a direct post URL, or a site-wide keyword search. Each result returns the post title, author, score, comment count, real post date, subreddit, flair, NSFW/spoiler flags, and outbound link. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social-listening pipeline. **No Reddit account or cookies needed.** Start with one subreddit or keyword, then add as many sources as the run needs.

***

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

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

| 📄 Post title | 👤 Author username | 📌 Subreddit | ⬆️ Score (upvotes) |
|---|---|---|---|
| 💬 Comment count | 📅 Post date (ISO) | 🕐 Post date (epoch) | 🔗 Permalink |
| 🌐 Post URL | 🖼️ Preview image (if available) | 🌄 Thumbnail image (if available) | 📝 Post text (self-posts) |
| 🧵 Nested comment threads | 🆔 Post ID | 🧩 Author account ID | 🏷️ Subreddit type |
| 🔞 NSFW flag | 🙈 Spoiler flag | 🌍 Outbound domain | ↗️ Outbound link |
| 🔁 Crosspost count | 🏳️ Flair | ✅ Success flag | ⚠️ Error message (failed rows only) |

***

### How to use Reddit Posts Scraper

It is for anyone who wants to scrape Reddit posts without writing a scraper of their own — researchers, social-listening teams, and AI agent builders alike.

**Copy to your AI assistant:**

```text
Reddit Posts Scraper (Apify Actor ID: socialdataapi/reddit-posts-scraper, https://apify.com/socialdataapi/reddit-posts-scraper) is an Apify Actor that returns Reddit posts and their nested comment threads as structured JSON: post title, author, score, comment count, post date, subreddit, flair, and outbound link. Use it whenever someone needs Reddit post data without cookies, a login, or a browser - trend research, social listening, or feeding an LLM agent live Reddit context. Inputs: startUrls (array of subreddit names, user profiles, post URLs, or search keywords, required), maxPosts (integer, max posts per source, default 10), maxComments (integer, max comments and replies per post, default 5), sortOrder (string, "hot"|"new"|"top"|"rising", default "top"), timeFilter (string, "hour"|"day"|"week"|"month"|"year"|"all", default "week"), proxyConfiguration (object, proxy settings, default useApifyProxy: false). A post that fails to scrape is written as a smaller diagnostic row with success: false, and that row is never billed - only a fully scraped post counts toward the charged row_result event.
```

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

Point your AI assistant at the Apify MCP server and it can run this Actor on its own — already added as a tool, ready to call with your input, reading back the same typed JSON rows this README documents. No glue code, no scraping logic in your prompts.

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

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [Reddit Posts Scraper](https://apify.com/socialdataapi/reddit-posts-scraper) in the Apify Store.
3. Enter your Reddit subreddit name or URL, user profile, post URL, or search keyword(s) in `startUrls`.
4. Click **Start** (or send your API request).
5. Download or stream your results in JSON, CSV, or Excel.

#### How to scale Reddit Posts Scraper to bulk

`startUrls` accepts as many entries as you want in a single run — mix subreddit names, user profiles, post URLs, and keyword searches freely. Duplicate subreddits (however they were entered) are merged automatically, so you don't pay to scrape the same community twice. For a recurring sweep, schedule the same input from the Actor's Schedule tab in the Apify Console, or call the API on your own interval and diff each run's dataset against the previous one by `post_id` to see new discussion and rising scores.

***

### ✨ Features

Reddit Posts Scraper fetches clean, structured posts and their comment threads from Reddit, working as a reddit subreddit scraper, a user post-history puller, and a keyword search tool in one Actor. It's ideal for trend research, social listening, brand monitoring, and feeding an LLM or RAG pipeline with grounded Reddit context.

It extracts, per post:

- **Post title** – the headline as posted
- **Author and author account ID** – the poster's username and Reddit's own stable account id, which survives a username change
- **Score and comment count** – upvotes minus downvotes, and Reddit's own total comment count
- **Nested comment threads** – replies nested inside the comment that started them, expanded past Reddit's own "load more comments" stub
- **Subreddit, flair, and NSFW/spoiler flags** – where the post lives and how it's labeled
- **Outbound domain and link** – the destination for a link post, or the subreddit's own self-post value for a text post

⚡ A post that fails to scrape is still written to the dataset as a diagnostic row, and that row is never billed — only a fully scraped post counts toward the charged event.

***

### Use cases 💡

- **Market researcher** — compare post score and comment count across subreddits to spot what's resonating this week.
- **Brand monitoring analyst** — run a keyword search for a product name and track how fast a mention spreads.
- **AI engineer** — feed post titles, text, and nested comments straight into an LLM or a RAG vector store as grounded context.
- **Community manager** — run it as a reddit user posts scraper to see what an account has actually posted, sorted by score or recency.
- **Data engineer** — run it as a reddit post data scraper and join on the stable author account ID instead of a mutable username.

Building an AI agent? [Connect this Actor over MCP](#mcp-integration-for-ai-agents) and let it call the actor on its own.

***

### Why choose this actor?

1. **Extract Reddit posts from multiple sources in one run.** A recorded run returned 10 posts from 2 sources — a subreddit and a keyword search — in 26.8 seconds, each with its comments nested inside.
2. **Comment threads that don't stop at the first screen.** A recorded post came back with 3,542 comments reported by Reddit and a nested reply thread that kept expanding past Reddit's own "load more comments" stub.
3. **Four source types, one reddit subreddit data scraper.** Subreddit names, user post histories, direct post URLs, and site-wide keyword searches all return the same 24-field row shape.

***

### ⬇️ Input

Reddit Posts Scraper accepts a list of subreddits, user profiles, Reddit URLs, or search keywords in `startUrls` — the only required field.

| Parameter | Required | Type | Description | Example value |
|---|---|---|---|---|
| startUrls | Yes | array (string list) | One entry per line: a subreddit name/URL, `u/username` or user URL, a direct post URL, or a keyword phrase. Duplicates are merged. | `["technology", "artificial intelligence"]` |
| maxPosts | No | integer | Max posts to scrape per source (1–1000, default 10). | `5` |
| maxComments | No | integer | Max comments — and replies at every nesting level — per post (0–1000, default 5). `0` skips comments entirely. | `3` |
| sortOrder | No | string (`"hot"`|`"new"`|`"top"`|`"rising"`) | How Reddit sorts the posts; default `"top"`. | `"top"` |
| timeFilter | No | string (`"hour"`|`"day"`|`"week"`|`"month"`|`"year"`|`"all"`) | Time window, used only when sortOrder is `"top"` or `"rising"`; default `"week"`. | `"week"` |
| proxyConfiguration | No | object (proxy) | Apify proxy settings for the residential-proxy fallback tier; default `{"useApifyProxy": false}`. | `{"useApifyProxy": false}` |

#### Free plan limits

Users on the Apify free plan can fetch up to 20 posts per run (all sources together) and 200 posts per month. When the limit is reached, the run finishes successfully with a status message explaining the limit. Upgrade to any paid Apify plan to remove these limits.

#### Example input

```json
{
  "startUrls": ["technology", "artificial intelligence"],
  "maxPosts": 5,
  "maxComments": 3,
  "sortOrder": "top",
  "timeFilter": "week",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

***

### ⬆️ Output

Every run turns reddit posts to JSON: one typed, normalized item per post, with the same field set every time, streamed into the dataset as each post finishes. Export as JSON, CSV, Excel, XML, or HTML from the Output tab, or read the dataset through the Apify API. A post that fails to scrape is written instead as a smaller, fixed diagnostic row (`success: false`) that is never billed.

#### Example output

```json
[
  {
    "post_id": "1x0ow0f",
    "title": "\"Software is over\": Developer uses AI to build free Adobe clones after frustration with cancellation fees",
    "author": "Federal-Block-3275",
    "created_utc": 1791460303,
    "num_comments": 3542,
    "score": 25045,
    "permalink": "/r/technology/comments/1x0ow0f/software_is_over_developer_uses_ai_to_build_free/",
    "post_url": "https://www.reddit.com/r/technology/comments/1x0ow0f/software_is_over_developer_uses_ai_to_build_free/",
    "image_url": "https://external-preview.redd.it/fn1wQtGYoFKZ-QD8CNZAS-sxfoVAhjVOdcVjDI6AkS0.jpeg?auto=webp&s=723c3f31097d079c4061f27e450ac569e756a9fd",
    "thumbnail_url": "https://external-preview.redd.it/fn1wQtGYoFKZ-QD8CNZAS-sxfoVAhjVOdcVjDI6AkS0.jpeg?width=140&height=118&auto=webp&s=159e66c8ab2119bb7de58b88dd0793eaa8f38384",
    "comments": [
      {
        "author": "Calcutec_1",
        "body": "the trick wit Adobe cancelation fees is to first change to a different subscription tier, then you get a new 14 day free cancelation window.",
        "score": 4501,
        "created_utc": 1791460815,
        "replies": [
          {
            "author": "sociofobs",
            "body": "The trick with Adobe cancellation fees is to never give those scum a single cent in the first place.",
            "score": 2842,
            "created_utc": 1791463074,
            "replies": []
          }
        ]
      },
      {
        "author": "navinjohnsonn",
        "body": "Dear god, just let me edit a PDF without signing my life away for $20 a month.",
        "score": 998,
        "created_utc": 1791461422,
        "replies": []
      }
    ],
    "subreddit": "technology",
    "success": true,
    "published_at": "2026-10-08T11:51:43Z",
    "author_fullname": "t2_21chz32pmw",
    "subreddit_type": "public",
    "over_18": false,
    "spoiler": false,
    "domain": "techspot.com",
    "outbound_url": "https://www.techspot.com/news/114136-software-over-developer-uses-ai-build-free-adobe.html",
    "num_crossposts": 4,
    "link_flair_text": "Artificial Intelligence"
  },
  {
    "post_id": "1v9f3kd",
    "title": "Local nonprofit wins state innovation award",
    "author": "example_user",
    "subreddit": "news",
    "permalink": "/r/news/comments/1v9f3kd/local_nonprofit_wins_state_innovation_award/",
    "comments": [],
    "success": false,
    "error_message": "RuntimeError: no working connection (direct blocked, proxy unavailable)"
  }
]
```

***

### How does it work?

Reddit Posts Scraper reads Reddit's own public data without opening a browser or asking for a Reddit account. It tries a direct connection first, and if a request comes back blocked or rate-limited it switches to Apify's own residential proxy automatically, retrying with a fresh connection until the request goes through or the retry budget runs out. It can also act as a reddit keyword search scraper when you give it a phrase instead of a subreddit or username. Every post, comment, and reply it returns is already visible to a logged-out visitor — nothing from a private, quarantined, or login-gated community is read. Listing pages are followed automatically past Reddit's own per-page cap, so one run can return far more posts than fit on a single page, and the output schema stays the same shape no matter which source type you point it at.

***

**When Reddit blocks comment access:** if Reddit's live comment endpoint refuses the run, the Actor says so once in the log and fills each post's `comments` field from a public Reddit archive (Arctic Shift) instead. These are real archived comments in the same shape, but their scores are as of the archive's capture, not live; very new posts the archive has not captured yet come back with an empty `comments` list. Comments are never invented.

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

It works as a reddit post scraper API you can call from any language you already use: a REST API call, MCP for AI agents that call it directly, or a no-code automation tool.

#### MCP integration for AI agents

Point your AI assistant at the Apify MCP server and it can read Reddit on its own — already added as a tool, ready to call with your input, reading back the same typed JSON rows documented above. No glue code, no scraping logic in your prompts.

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

This registers the Apify MCP server in Claude Code, Cursor, or Windsurf with this Actor ready to run; ask the connected agent to run it with your input.

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

In n8n, the Apify node's "Run an Actor" operation (or the HTTP Request node pointed at the run-sync endpoint with your token) runs it from a workflow. In Make, the Apify app's "Run an Actor" module followed by "Get Dataset Items" does the same. In LangChain, install `langchain-apify` and pass this Actor's ID, `socialdataapi/reddit-posts-scraper` (https://apify.com/socialdataapi/reddit-posts-scraper), to `ApifyActorsTool` to call it as a tool inside an agent chain.

***

### Is it legal to scrape Reddit data?

Scraping publicly accessible Reddit content is generally permitted, and courts have repeatedly treated data that anyone can view without logging in as outside the scope of unauthorized-access claims. Reddit Posts Scraper returns only publicly available data — post text, scores, comments, and the poster's public username, exactly what any visitor sees without logging in. Scraping public data is generally permissible under GDPR too, but storing and using it — especially usernames and comment text tied to identifiable people — must still comply with local data-protection law. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

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

Post title, author, score, comment count, and nested comment threads are the core fields — see [the data fields section](#what-data-can-i-extract-with-reddit-posts-scraper) for the full list.

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

No. Only public post and comment data is extracted — nothing from a private, quarantined, or login-gated community. No Reddit account, cookie, or API key is needed to run it.

#### How fast does Reddit Posts Scraper run?

A recorded run returned 10 posts — 5 from a subreddit and 5 from a keyword search, each with up to 3 comments — in 26.8 seconds, with the first post stored after 4.6 seconds. Every run reads live data, not a cache.

#### What happens if a post is private, deleted, or doesn't exist?

An entry in `startUrls` that doesn't match a recognizable Reddit subreddit, user, post, or search URL is skipped with a logged warning. A post that starts scraping but fails (a blocked request, a parse error) is still written to the dataset as a diagnostic row — `success: false` plus a short `error_message` — and that row is never billed.

#### Can I scrape multiple Reddit posts at once?

Yes — `startUrls` is a list, and it doubles as a reddit user posts scraper too: add `u/username`, `user/username`, or a full profile URL alongside your subreddits and keywords, and every entry runs in the same job.

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

Yes — it is available as an MCP tool. Show the command above to register it in Claude Code, Cursor, or Windsurf. Any agent that can call an HTTP endpoint can use the REST API directly.

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

Yes. Typed, normalized JSON with consistent field names, no HTML parsing or CSS selectors. Pass it straight to an LLM, index it into a vector store, or feed it to an agent tool — no transformation step.

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

This Actor is maintained and updated when Reddit changes its layout or defenses — your calls keep returning the same JSON schema with no changes on your end.

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

Yes. A direct connection is tried first, and the Actor switches to Apify's own residential proxy automatically if a request gets blocked or rate-limited. You send one request and get structured JSON back — no proxy accounts, no headless browser setup, no maintenance.

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

For RAG: the text-rich fields — the post title, post text, and nested comments. For training data: the numeric and boolean fields — post score, comment count, NSFW flag, and spoiler flag. All fields are typed primitives (strings, integers, booleans), so no normalization is needed.

***

### Your feedback

Found a bug or missing a field? Open an issue from this Actor's page in the Apify Console (Issues tab) with a sample source and what you expected to see — it helps ship a fix faster. The team maintaining this Actor reads every report.

# Actor input Schema

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

Enter one item per line. You can mix:

1. Full URLs — e.g. https://www.reddit.com/r/news/ or a direct post URL
2. Subreddit names — e.g. news or r/news
3. User profiles — e.g. u/username or https://www.reddit.com/user/username/ (that user's posts)
4. Search keywords — e.g. artificial intelligence (searches Reddit)

Duplicate entries are merged. At least one entry is required. Free plan: up to 20 posts per run (all sources together) and 200 per month; paid plans have no limit.

## `maxPosts` (type: `integer`):

Max number of posts to scrape **per** subreddit or keyword (1–1000). If you have 3 sources and set 50, you can get up to 150 posts total.

## `maxComments` (type: `integer`):

Max comments to fetch for each post (0–1000). Set to **0** to skip comments and only get post metadata (faster).

## `sortOrder` (type: `string`):

How Reddit should sort the posts. Hot = trending now, New = latest first, Top = most upvoted, Rising = gaining traction.

## `timeFilter` (type: `string`):

Time range for results. Only applies when Sort order is **Top** or **Rising**. Ignored for Hot and New.

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

Choose which proxies to use. The actor tries a direct connection first, and automatically falls back to Apify's own residential proxy if Reddit blocks or rate-limits a request. Recommended for large runs or when you hit blocks.

## Actor input object example

```json
{
  "startUrls": [
    "news",
    "r/technology",
    "https://www.reddit.com/r/news/",
    "artificial intelligence"
  ],
  "maxPosts": 10,
  "maxComments": 2,
  "sortOrder": "top",
  "timeFilter": "week",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped items in the Actor's default dataset.

# 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 = {
    "startUrls": [
        "https://www.reddit.com/r/news/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/reddit-posts-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 = {
    "startUrls": ["https://www.reddit.com/r/news/"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/reddit-posts-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 '{
  "startUrls": [
    "https://www.reddit.com/r/news/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call socialdataapi/reddit-posts-scraper --silent --output-dataset

```

## MCP server setup

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