# Reddit Scraper (`dami_studio/reddit-scraper`) Actor

Scrape Reddit posts and comments from any subreddit or user profile by top/hot/new/rising over any time window. Returns full post data plus clean, TTS-ready text for research and social listening.

- **URL**: https://apify.com/dami\_studio/reddit-scraper.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Social media, AI, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.50 / 1,000 reddit post scrapeds

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Scraper

Pulls posts from any subreddit or user profile without an API key or login. Point it at a list of sources, pick a sort and time window, and you get back full post data including the body text (selftext), with optional cleaned, TTS-ready narration. Built for people batching Reddit content: short-form video scripts, research datasets, content monitoring.

### How it works

Reddit hard-blocks the anonymous `.json` API but still serves Atom RSS feeds from separate infrastructure that isn't rate-limited the same way, so the default `rss` method reads those feeds and parses them into structured records. RSS doesn't expose upvote scores or comments, so if you need those, add free Reddit "script" app credentials and the actor switches to the authenticated OAuth endpoint for that data.

### Input

Nothing is strictly required. If you pass no `sources`, the actor falls back to its prefilled examples. The fields you'll actually touch:

| Field | Required | Notes |
| --- | --- | --- |
| `sources` | no | Array of subreddits and/or user profiles. Accepts `tifu`, `r/tifu`, `u/spez`, `user/spez`, or a full reddit.com URL. Mixed lists are fine. |
| `sort` | no | One of `top`, `hot`, `new`, `rising`, `controversial`. Defaults to `top`. |
| `time` | no | Time window for `top` and `controversial`: `hour`, `day`, `week`, `month`, `year`, `all`. Ignored for the other sorts. Defaults to `day`. |
| `maxPostsPerSubreddit` | no | How many posts to return per source. Defaults to 10, max 100. |
| `method` | no | `rss` (default, no login), `oauth` (uses the creds below, adds scores/comments), or `json` (legacy anonymous API, usually blocked). |
| `cleanText` | no | Strips markdown, links, and edit stamps to produce narration sentences. On by default. Turn it off for raw text. |
| `requireStory` | no | Keep only text posts and apply the word-count fit. Off by default, which returns all post types. |
| `commentLimit` | no | Top comments to fetch per post. Needs Reddit app creds to be reliable; anonymous comment access is usually blocked. Defaults to 0. |
| `redditClientId` / `redditClientSecret` | no | Free "script" app credentials from reddit.com/prefs/apps. Only needed for comments and upvote scores. |
| `minScore`, `minWords`, `maxWords`, `minHookScore`, `includeNsfw`, `dedupeAcrossRuns` | no | Filters and run-to-run dedupe. Sensible defaults; leave them alone unless you're filtering for short-form fit. |
| `proxyConfiguration` | no | Residential proxy is recommended at volume. The RSS feeds work from most IPs, so it's not mandatory for small runs. |

### Output

Each post is one dataset item. Alongside the metadata you get `selftext` (the full post body) and, when `cleanText` is on, a `narration` field plus `ttsSegments` split into sentences ready to hand to a text-to-speech step.

Key fields: `id`, `subreddit`, `title`, `url`, `author`, `score`, `numComments`, `createdUtc`, `over18`, `selftext`, `postType`, `narration`, `ttsSegments`, `wordCount`, `readTimeSeconds`, `hookScore`, `fitsShort`. When `commentLimit` is set, a `comments` array (`author`, `body`, `score`, `depth`) and `fetchedCommentCount` are added. Set `rawMode` if you'd rather have the unshaped Reddit post object.

### Example

```json
{
  "sources": ["r/tifu", "r/AskReddit", "u/GallowBoob"],
  "sort": "top",
  "time": "week",
  "maxPostsPerSubreddit": 25,
  "cleanText": true
}
```

### Pricing

$0.50 per 1000 posts, pay per result, no subscription. Steps that use an AI model expect your own OpenAI key.

### Notes

Scores and comments are not in the RSS feed. If you need them, create a free script app at reddit.com/prefs/apps and pass `redditClientId` and `redditClientSecret`. Anonymous comment fetching is mostly blocked by Reddit and will usually come back empty.

# Actor input Schema

## `sources` (type: `array`):

Any mix of subreddits and Reddit user profiles. Accepts: 'askreddit', 'r/tifu', 'u/GallowBoob', 'user/spez', or a full reddit.com URL. Works for ANY subreddit or profile — not limited to AITA.

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

Optional alternative to 'sources' — plain subreddit names. Merged with 'sources'.

## `users` (type: `array`):

Optional — Reddit usernames to scrape submissions from (without u/). Merged with 'sources'.

## `method` (type: `string`):

rss = no key/login needed (recommended, default). oauth = use Reddit app creds below (adds score/comments). json = legacy anonymous API (often blocked).

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

top, hot (trending), new (latest), rising, or controversial.

## `time` (type: `string`):

Time window for 'top' and 'controversial' sorts (ignored for hot/new/rising). E.g. top of all time, top this year, top this week.

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

How many qualifying stories to return per subreddit.

## `minScore` (type: `integer`):

Skip posts below this upvote count.

## `minWords` (type: `integer`):

Skip stories shorter than this (too thin for a short).

## `maxWords` (type: `integer`):

Skip stories longer than this (won't fit a 30–90s short).

## `minHookScore` (type: `integer`):

Filter out weak openers. 0 = keep all.

## `requireStory` (type: `boolean`):

Keep only self/text-post stories (skip link/image posts) and apply the word-count fit. Off by default = return ALL posts. Turn on for faceless story videos.

## `includeNsfw` (type: `boolean`):

Include posts marked over-18. Off by default.

## `cleanText` (type: `boolean`):

Strip markdown/links/edit-stamps and produce TTS-ready sentences. Turn off for raw text.

## `rawMode` (type: `boolean`):

Output the complete raw Reddit post object instead of the shaped record.

## `dedupeAcrossRuns` (type: `boolean`):

Remember post IDs between runs so you never get the same story twice.

## `commentLimit` (type: `integer`):

Fetch up to this many top comments per post (0 = none). Reliable when you add Reddit app credentials below; anonymous Reddit usually blocks comment access.

## `redditClientId` (type: `string`):

Optional. The default RSS method needs no login. Add a free 'script' app's client ID (reddit.com/prefs/apps) only if you want upvote score + comment counts (not exposed via RSS).

## `redditClientSecret` (type: `string`):

The secret for your Reddit app (reddit.com/prefs/apps).

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

Datacenter (default) is fast and works for Reddit RSS feeds. Switch to RESIDENTIAL only if you hit blocks at high volume.

## Actor input object example

```json
{
  "sources": [
    "r/AskReddit"
  ],
  "method": "rss",
  "sort": "top",
  "time": "day",
  "maxPostsPerSubreddit": 10,
  "minScore": 0,
  "minWords": 30,
  "maxWords": 800,
  "minHookScore": 0,
  "requireStory": false,
  "includeNsfw": false,
  "cleanText": true,
  "rawMode": false,
  "dedupeAcrossRuns": true,
  "commentLimit": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Result rows / metadata are stored in the default dataset (one row per item).

## `files` (type: `string`):

Generated media/files (video, audio, images, captions) are stored in the default key-value store.

# 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 = {
    "sources": [
        "r/AskReddit"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/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 = {
    "sources": ["r/AskReddit"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("dami_studio/reddit-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 '{
  "sources": [
    "r/AskReddit"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call dami_studio/reddit-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/AGhc2bFovKXFtqvzW/builds/KuOeJVihZgL4hCwY2/openapi.json
