# Reddit Subreddit Scraper (`coregent/reddit-subreddit-scraper`) Actor

Extract public subreddit metadata from Reddit communities: subscriber counts, weekly visitors and contributions, titles, descriptions, creation dates, NSFW and restriction flags, icons, banners, rules and post flairs. Optionally collect new, hot, top or rising posts. No Reddit login or API key.

- **URL**: https://apify.com/coregent/reddit-subreddit-scraper.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Stats:** 6 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 subreddit results

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

## Reddit Subreddit Scraper

![Reddit Subreddit Scraper](https://raw.githubusercontent.com/coregentdevspace/reddit-subreddit-scraper-assets/main/thumbnail-reddit-subreddit-scraper.png "Reddit Subreddit Scraper — subscribers, weekly activity, rules, icons and optional posts from any public subreddit")

Give it a list of subreddits and get one clean row per community back: subscriber count, weekly
visitors and contributions, creation date, type, NSFW and restriction flags, title and descriptions,
icon, banner, rules and post flair templates. You can also pull new, hot, top, rising or
controversial posts from each community. No Reddit account, cookies or API key needed.

**Any subreddit in, clean community metadata out.**

### What it does

- Takes subreddit names in any common form, in bulk: `startups`, `r/startups`,
  `https://www.reddit.com/r/startups/`, `https://old.reddit.com/r/startups/`. Equivalent spellings
  are merged **before** anything is fetched or charged.
- Returns **one row per community** with:
  - ID, name, title, short and long description, canonical URL
  - subscribers, weekly visitors, weekly contributions
  - creation date, type, NSFW, quarantine and restriction flags
  - icon, banner, brand colour, language and Reddit's topic tags
- Adds the community's **public rules** (on by default) and its **post flair templates** (optional).
- Optionally collects **posts** as separate rows. You pick the sort (NEW, HOT, TOP, RISING,
  CONTROVERSIAL), a time range for TOP and CONTROVERSIAL, a per-subreddit limit and an "only posts
  newer than" filter.
- Private, banned, quarantined and nonexistent communities get a **status row** instead of failing
  the run, and those rows are free.
- Pushes rows as it goes, so a late failure never loses what was already captured.

### Quick start

Minimal:

```json
{
  "subreddits": ["r/startups", "dataengineering"]
}
```

Metadata with rules and flair templates:

```json
{
  "subreddits": ["startups", "python"],
  "includeRules": true,
  "includePostFlairs": true
}
```

Recent posts:

```json
{
  "subreddits": ["startups"],
  "includePosts": true,
  "postSort": "NEW",
  "maxPostsPerSubreddit": 100,
  "postsNewerThan": "7 days"
}
```

Top posts of the month:

```json
{
  "subreddits": ["dataengineering"],
  "includePosts": true,
  "postSort": "TOP",
  "topTimeRange": "MONTH",
  "maxPostsPerSubreddit": 100
}
```

### FAQ

**Which subreddit input formats work?** A bare name (`startups`), `r/startups`, `/r/startups`, or any
`reddit.com` subreddit URL, including `www.`, `old.` and `new.`, and URLs with a trailing sort or
`/about/`. Post, comment, user, search and multireddit URLs are rejected with a reason in the log,
as are `r/all` and `r/popular`. A single run takes up to 1,000 communities.

**Do I need a Reddit login or API key?** No. You don't supply credentials, cookies or keys of any
kind.

**Which community fields are returned?** See [Subreddits](#subreddits) below.

**Are subscriber counts included?** Yes, as `subscribers`.

**Are active users included?** Reddit no longer publishes an "online now" figure for most
communities. When it does, `activeUsers` carries it; otherwise `activeUsers` is `null`. The
activity signal Reddit shows today is `weeklyVisitors` and `weeklyContributions`, and both are
always included. All activity numbers are point-in-time and can change a lot between runs.

**Are rules included?** Yes, by default: short name, full description, violation reason and
Reddit's ordering. If the rules can't be read, you still get the community row, marked
`PARTIAL_RESULT`.

**Are post flairs included?** Switch on `includePostFlairs` to get each community's public post
flair templates (ID, text, moderator-only flag). Reddit doesn't publish flair colours on this route,
so `backgroundColor` and `textColor` are `null`.

**Can posts be scraped too?** Yes. Switch on `includePosts`. Posts are separate rows with
`rowType: "post"`, so a community's metadata isn't repeated on every post.

**Which post fields will I get?** It depends on which source served the listing; the `provider`
and `dataQuality` fields on each post tell you. Reddit currently blocks its own post listing for
Apify's datacenter proxy, so with the default proxy most posts come from a backup source
(`provider: "tikhub"`, `dataQuality: "PARTIAL"`). Those rows have ID, title, author, score, comment
count, flair, post type, created date, permalink, link, media, thumbnail, the stickied, locked
and crosspost flags, and a crosspost's original post. The text is a short preview, and upvote ratio, author ID, language and the
spoiler/NSFW/archived flags are `null`. Posts read from Reddit's own listing (`provider:
"reddit-web"`, `dataQuality: "FULL"`) have every field, including the full text. To get those, put
your own proxy in **Custom proxy URLs**.

**Are crossposts handled?** Yes. A crosspost row has `postType: "CROSSPOST"` and links to the
original post, its ID and its community (or `u_<username>` when it was posted to a profile), from
either source. See [Posts](#posts).

**Which sort modes work?** NEW, HOT, TOP, RISING and CONTROVERSIAL. TOP and CONTROVERSIAL take a
time range: past hour, day, week, month, year or all time. RISING is passed to Reddit as asked; on
smaller communities Reddit may serve it in the same order as HOT.

**How far back can posts go?** Reddit's live listings expose a bounded history, commonly around the
most recent or top ~1,000 posts per listing. A NEW listing with `postsNewerThan` stops as soon as it
reaches older posts. Other sorts are read in Reddit's order and then filtered by date, which never
means "every post in that period".

**What do LIVE and ARCHIVE mean?** Every row says `source: "LIVE"`: it was read from Reddit during
your run. This Actor has no archive fallback. If one is ever added, its rows will say `ARCHIVE` and
will never be mixed in silently.

**Are private communities supported?** No. A private, gold-only, banned or quarantined community
returns a free status row with whatever Reddit shows publicly (usually its ID, creation date and
public description) and its status. Its posts are never fetched.

**Are NSFW communities supported?** Their metadata, yes. `isNsfw` is on the row. Posts from NSFW
communities, and NSFW-tagged posts elsewhere, are collected only when you switch on `includeNsfw`.

**How does pricing work?** See [Pricing](#pricing).

**Can runs be scheduled?** Yes. Use Apify Schedules to track subscriber or activity changes over
time. Each run is an independent snapshot.

**Can I call it through the API or MCP?** Yes. Use the Apify API, the JavaScript and Python
clients, or Apify's MCP server, with the same JSON input as above.

### Input reference

| Field | Default | What it does |
|---|---|---|
| `subreddits` | — | Communities to scrape (required). Names, `r/name` or URLs. Up to 1,000. |
| `includeRules` | `true` | Add public rules to each community row. |
| `includePostFlairs` | `false` | Add post flair templates to each community row. |
| `includePosts` | `false` | Also collect posts as separate rows. |
| `postSort` | `NEW` | `NEW`, `HOT`, `TOP`, `RISING`, `CONTROVERSIAL`. |
| `topTimeRange` | `WEEK` | `HOUR`, `DAY`, `WEEK`, `MONTH`, `YEAR`, `ALL`. Only for TOP and CONTROVERSIAL. |
| `maxPostsPerSubreddit` | `25` | Post cap per community (1–1,000). |
| `postsNewerThan` | — | `24 hours`, `7 days`, `2 weeks` or a date such as `2026-09-01`. Older posts are skipped and not charged. |
| `includeNsfw` | `false` | Collect posts from NSFW communities and NSFW-tagged posts. |
| `maxConcurrency` | `5` | Communities processed in parallel (1–20). |
| `requestDelayMs` | `0` | Extra pacing for post listings. |
| `debugMode` | `false` | Verbose logs. |
| `proxyConfiguration` | Apify Datacenter | See [Proxy policy](#-proxy-policy). |

### Output

All rows go to the run's default dataset. Each row has a `rowType`, either `subreddit` or `post`.
The dataset has five views: **Overview** (both row types, in the columns they share: subreddit,
title, URL, created date and so on), **Subreddits**, **Rules & flairs**, **Posts** and **Status**. In
the Subreddits view post rows show as blank lines, and the other way round in the Posts view. Every
field is present on every row of its type, and fields Reddit didn't provide are `null`.

The examples below are real records from a platform run on 2026-10-11 (input: `startups`,
`pics`, `interestingasfuck`, `lounge`, `fatpeoplehate` and a made-up name, with posts on). Each one
shows the columns of its view. Post authors are anonymised and long texts are shortened. Download the
full dataset as JSON to get every field on every row.

#### Overview

Both row types together, in the columns they share.

![Overview table view](https://raw.githubusercontent.com/coregentdevspace/reddit-subreddit-scraper-assets/main/reddit-subreddit-scraper-output-overview-table-view.png "Overview: subreddit and post rows in their shared columns")

A subreddit row:

```json
{
  "rowType": "subreddit",
  "subreddit": "startups",
  "status": "SUCCESS",
  "title": "The community for ventures designed to scale rapidly | Read our rules before posting ❤️",
  "url": "https://www.reddit.com/r/startups/",
  "createdAt": "2008-01-25T05:23:46.341Z",
  "subscribers": 2138903,
  "weeklyVisitors": 84962,
  "score": null,
  "commentsCount": null,
  "author": null,
  "postType": null,
  "dataQuality": "FULL",
  "input": "startups"
}
```

A post row:

```json
{
  "rowType": "post",
  "subreddit": "startups",
  "status": null,
  "title": "\"i will not promote\" how to get conversations with hvac ppl",
  "url": "https://www.reddit.com/r/startups/comments/1x3ep1o/",
  "createdAt": "2026-10-11T17:53:47.257Z",
  "subscribers": null,
  "weeklyVisitors": null,
  "score": 2,
  "commentsCount": 5,
  "author": "example_user",
  "postType": "TEXT",
  "dataQuality": "PARTIAL",
  "input": "startups"
}
```

#### Subreddits

One row per community.

```json
{
  "rowType": "subreddit",
  "status": "SUCCESS",
  "name": "startups",
  "title": "The community for ventures designed to scale rapidly | Read our rules before posting ❤️",
  "subscribers": 2138903,
  "weeklyVisitors": 84962,
  "weeklyContributions": 1801,
  "activeUsers": null,
  "createdAt": "2008-01-25T05:23:46.341Z",
  "subredditType": "public",
  "isNsfw": false,
  "isQuarantined": false,
  "isRestricted": false,
  "publicDescription": "Welcome to /r/startups, the place to discuss startup problems and solutions. Startups are companies that are designed to grow and scale rapidly.  Be sure to read and follow all of our rules--we have specific places for common content and requests.",
  "rulesCount": 9,
  "topics": [
    "Startups & Entrepreneurship"
  ],
  "iconUrl": "https://b.thumbs.redditmedia.com/c7zj4Bem2INlJARtR9RfI_MsFlzzFlc57sejeYfSFNA.png",
  "bannerUrl": "https://styles.redditmedia.com/t5_2qh26/styles/bannerBackgroundImage_5inll9lan7511.jpg?frame=1&auto=webp&format=pjpg&s=a4088dedd81472060f4dfc7dfcf140a89951ff77",
  "url": "https://www.reddit.com/r/startups/",
  "subredditId": "t5_2qh26",
  "dataQuality": "FULL",
  "input": "startups",
  "scrapedAt": "2026-10-11T18:49:34.187Z"
}
```

#### Rules & flairs

The community's public rules and post flair templates. The first 2 of r/startups' 9 rules are shown.
`postFlairs` is `null` here because `includePostFlairs` was off. When it's on, each template has
`id`, `text`, `isModOnly`, `backgroundColor` and `textColor` (the last two are always `null`).

```json
{
  "name": "startups",
  "status": "SUCCESS",
  "rulesCount": 9,
  "rules": [
    {
      "shortName": "Relevant Content Only",
      "description": "We are a community of discussion based around startups, not traditional businesses.\n\nAll content must be relevant to startups.\n\nYou are welcome to ask how to apply startup methodologies to your traditional business if you frame your question in a non-promotional way. We want you to be able to ask any question that helps your startup.",
      "violationReason": "not relevant",
      "priority": 0
    },
    {
      "shortName": "No direct sales, advertisements, or promotion",
      "description": "**No direct sales, advertisements, or promotional posts of any kind**. We have designated places that are an exception to this rule and they will always be stickied at the top of /r/startups.\n\n* You MAY share your startup in the Monthly Share Your Startup thread\n\nSelf-promotion is anything you have an interest, stake or relationship with including being friends with someone at the company.\n\nAt the end of the day, /r/startups moderators have the final say if your comments are promotional or not.",
      "violationReason": "No direct sales, advertisements, or self-promotion",
      "priority": 1
    }
  ],
  "postFlairs": null,
  "url": "https://www.reddit.com/r/startups/"
}
```

#### Posts

One row per post. This one came from the backup source (`provider: "tikhub"`), which is what Apify's
datacenter proxy gets today (see the FAQ). So `text` is a preview, and `upvoteRatio`, `isNsfw` and
`isSpoiler` are `null`. Posts read from Reddit's own listing (`provider: "reddit-web"`) have the full
text and every flag.

```json
{
  "rowType": "post",
  "subreddit": "startups",
  "title": "\"i will not promote\" how to get conversations with hvac ppl",
  "author": "example_user",
  "score": 2,
  "upvoteRatio": null,
  "commentsCount": 5,
  "flair": "I will not promote",
  "postType": "TEXT",
  "createdAt": "2026-10-11T17:53:47.257Z",
  "permalink": "https://www.reddit.com/r/startups/comments/1x3ep1o/",
  "externalUrl": null,
  "crosspostParentUrl": null,
  "thumbnailUrl": null,
  "isStickied": false,
  "isNsfw": null,
  "isSpoiler": null,
  "isLocked": false,
  "text": "built an after-hours voice agent for hvac - linkedin free tier: 5 messages, 1 reply, from a retired owner - 60-80 ig + fb dms over 4 days: 0 replies - posted in…",
  "listingSort": "NEW",
  "listingRank": 1,
  "postId": "1x3ep1o",
  "provider": "tikhub",
  "scrapedAt": "2026-10-11T18:49:39.063Z"
}
```

`postType` is one of `TEXT`, `LINK`, `IMAGE`, `GALLERY`, `VIDEO`, `POLL`, `CROSSPOST` or `UNKNOWN`.
`media` (in the full record) lists the post's own images or video stream, never avatars.

A crosspost (`postType: "CROSSPOST"`, `isCrosspost: true`) names the post it was shared from in
`crosspostParentId`, `crosspostParentSubreddit` and `crosspostParentUrl` (the **Crossposted from**
column). When the original was posted to a user's profile rather than a community,
`crosspostParentSubreddit` is Reddit's profile name for it, `u_<username>`, and the link goes to the
`/user/` page. All three are `null` on other posts. On backup-source rows a crosspost's `media` and
`thumbnailUrl` are the original post's. This r/pics post was shared from r/drones (platform run,
2026-10-12; in the full record `crosspostParentId` is `1x3q70p`, `crosspostParentSubreddit` is
`drones`, and `media` holds the original's 1080 × 1920 image):

```json
{
  "rowType": "post",
  "subreddit": "pics",
  "title": "Snake River • Jackson Hole",
  "author": "example_user",
  "score": 36,
  "upvoteRatio": null,
  "commentsCount": 2,
  "flair": null,
  "postType": "CROSSPOST",
  "createdAt": "2026-10-12T02:26:57.341Z",
  "permalink": "https://www.reddit.com/r/pics/comments/1x3q7i2/",
  "externalUrl": null,
  "crosspostParentUrl": "https://www.reddit.com/r/drones/comments/1x3q70p/",
  "thumbnailUrl": "https://cf.preview.redd.it/gzum6tk06yuh1.jpeg?width=1080&auto=webp&s=de63ac47e25a2807716387f847c06bd1de8e9cfe",
  "isStickied": false,
  "isNsfw": null,
  "isSpoiler": null,
  "isLocked": false,
  "text": null,
  "listingSort": "NEW",
  "listingRank": 2,
  "postId": "1x3q7i2",
  "provider": "tikhub",
  "scrapedAt": "2026-10-12T03:28:52.435Z"
}
```

#### Status

Every community's outcome. A private community's row is free:

```json
{
  "name": "lounge",
  "status": "PRIVATE_SUBREDDIT",
  "unavailableReason": "GOLD_ONLY",
  "unavailableMessage": null,
  "statusNote": null,
  "dataQuality": "STATUS_ONLY",
  "provider": "tikhub",
  "postsExcludedReason": null,
  "input": "lounge",
  "sourceInputs": [
    "lounge"
  ],
  "capturedSequence": 2
}
```

#### Status values

| `status` | Meaning | Charged |
|---|---|---|
| `SUCCESS` | Full metadata delivered. | yes |
| `PARTIAL_RESULT` | Full metadata, but rules or flairs couldn't be read (`dataQuality: PARTIAL`). Or, rarely, basic metadata only (`dataQuality: BASIC`), which is not charged. | PARTIAL: yes · BASIC: no |
| `SUBREDDIT_NOT_FOUND` | No such community. | no |
| `PRIVATE_SUBREDDIT` | Private or gold-only. | no |
| `BANNED_SUBREDDIT` | Banned by Reddit. | no |
| `QUARANTINED` | Quarantined. Reddit hides its content from logged-out visitors. | no |
| `INVALID_SUBREDDIT` | The name was rejected as invalid. | no |
| `RATE_LIMITED`, `BLOCKED`, `TEMPORARY_REDDIT_ERROR` | Transient. Listed in `RETRY_INPUT`, ready to re-run. | no |

`postsExcludedReason: "NSFW_EXCLUDED"` marks an NSFW community whose posts were skipped because
`includeNsfw` was off.

#### Run reports (key-value store)

- `RUN_SUMMARY`: totals (inputs, unique communities, successes, failures by status, duplicates,
  posts saved and filtered), charges per event, and request counts.
- `SUBREDDIT_SUMMARY`: one record per community, with its status, which parts were read, how many
  posts were collected and why the post listing stopped.
- `RETRY_INPUT`: communities that hit blocking or transient errors, as a ready-to-run input. Private,
  banned and nonexistent communities are never included.

### Pricing

Pay-per-event, with no start fee:

- **Subreddit result**: charged once per unique community whose full metadata is delivered.
  Equivalent inputs for the same community count once.
- **Post result**: charged once per unique post delivered, only when post collection is on.

**Never charged:** invalid inputs, duplicates, private, banned, quarantined or nonexistent
communities, rows with basic metadata only, posts older than your date filter, NSFW posts skipped by
your NSFW setting, retries, and the run summaries.

Live rates are on the Actor's **Pricing** tab, and they can differ by Apify plan; the tab shows the
rate for yours. This README deliberately doesn't quote figures. Runs
respect your per-run spending limit: when it's reached, the run stops fetching and finishes with
everything paid for so far.

### 🚦 Proxy policy

Use **Apify Datacenter** proxy (the default) or **no proxy**. Subreddit metadata, rules and flairs
don't depend on the proxy. For posts, Reddit currently blocks its own listing for Apify's datacenter
addresses. The Actor retries on fresh IPs, then reads posts from a backup source with fewer fields
(see the FAQ). Your own proxy under **Custom proxy URLs** can reach Reddit's listing directly.

**Apify Residential proxy is not supported.** The Actor fails at startup if `apifyProxyGroups`
includes `RESIDENTIAL`. On pay-per-event Actors, residential bandwidth is billed per GB to the
developer, not to your run. Post listing pages are large, so one bandwidth-heavy run could cost more
than it earns.

If you really need residential routing, put your own provider in the proxy editor's **Custom proxy
URLs** field. That traffic goes through your provider, not Apify, and is unaffected:

```
http://user:pass@proxy.iproyal.com:12321
http://user:pass@proxy.brightdata.com:22225
http://user:pass@proxy.oxylabs.io:7777
```

### Limitations

- Public communities only. No private, moderator-only or logged-in data.
- Each unavailable community still costs a lookup. If a run has met 100 private, banned,
  quarantined or nonexistent communities **and** they outnumber the available ones, the rest of
  that run is checked with basic data only: status, icon, description and weekly stats, with no
  subscriber count or rules, and not charged. This applies to every user. A list that is mostly
  real communities never meets it.
- `activeUsers` is usually `null`; see the FAQ.
- Post flair colours are not available.
- Post listings are bounded by Reddit (commonly ~1,000 per listing), and RISING may come back in the
  same order as HOT on smaller communities.
- Reddit currently blocks its post listing for Apify's datacenter proxy, so with default settings
  posts usually come from a backup source. NEW, HOT and RISING carry on through it. Those rows have
  `provider: "tikhub"` and `dataQuality: "PARTIAL"`: the text is a truncated preview
  (`textIsPreview: true`), and upvote ratio, author ID, language and the spoiler/NSFW/archived flags
  are `null`. Stickied, locked and crosspost flags, and a crosspost's original post, are filled.
  With `includeNsfw` off, NSFW communities are still excluded (their flag comes from the subreddit
  row), but NSFW-tagged posts inside other communities can't be recognised on these rows. TOP and
  CONTROVERSIAL listings have no backup with a time window. If they're blocked, the community is
  listed in `RETRY_INPUT`.
- A crosspost read from Reddit's own listing names its original post but has an empty `media` list.
- Subscriber counts, activity, scores and comment counts change constantly, and posts can be edited
  or deleted after a run.

### Other Coregent Reddit Actors

- **[Reddit Comments Scraper](https://apify.com/coregent/reddit-comments-scraper)**: every comment of
  a thread as flat rows with parent, depth and path.

### Responsible use

This is an unofficial tool, not affiliated with or endorsed by Reddit. It reads only public
community data. Don't use it to deanonymise users or to infer sensitive attributes about them. You
are responsible for processing the data lawfully, including under GDPR and Reddit's terms where they
apply.

### Changelog

- **1.0**: first release. Community metadata, rules, post flair templates, optional posts with five
  sorts, time ranges and date filtering, crossposts linked to their original post, status rows for
  unavailable communities, and spending-limit compliance.

# Actor input Schema

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

Communities to scrape, one per line. Every common form works: startups, r/startups, https://www.reddit.com/r/startups/, https://old.reddit.com/r/startups/. Equivalent spellings of one community are merged before anything is fetched or charged. Post, user, search and multireddit URLs are rejected. Up to 1,000 per run. If a run meets 100 unavailable communities and they outnumber the available ones, the rest of that run gets basic, uncharged data only (see the README).

## `includeRules` (type: `boolean`):

Add the community's public rules (short name, description, violation reason) to each subreddit row. A rules failure never fails the row.

## `includePostFlairs` (type: `boolean`):

Add the community's public post flair templates (ID, text, moderator-only flag). Reddit does not publish flair colours on this route, so the colour fields are null.

## `includePosts` (type: `boolean`):

Collect public posts from each community as separate rows (rowType = post). Off by default — the Actor is subreddit-first, and posts are charged per post.

## `postSort` (type: `string`):

Reddit's listing order. NEW is chronological and stops early at the 'Only posts newer than' date. TOP and CONTROVERSIAL use the time range below.

## `topTimeRange` (type: `string`):

Window for TOP and CONTROVERSIAL listings. Ignored for NEW, HOT and RISING.

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

Cap per community. Reddit's live listings expose a bounded history — commonly around the most recent or top ~1,000 posts per listing — so higher values can return fewer.

## `postsNewerThan` (type: `string`):

Optional. A span such as '24 hours', '7 days', '2 weeks', or a date such as '2026-09-01'. Older posts are skipped and never charged; a NEW listing stops as soon as it reaches them.

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

When off, NSFW communities still get their subreddit row (with isNsfw = true), but no posts are collected from them, and NSFW-tagged posts elsewhere are skipped.

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

How many communities to process at once (1–20). Posts within one community are always fetched in order.

## `requestDelayMs` (type: `integer`):

Extra pacing on top of the built-in rate control for Reddit's post listings. Raise it if runs report rate limiting.

## `debugMode` (type: `boolean`):

Verbose logging of requests, pages and skips.

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

Apify Datacenter proxy (the default) or no proxy both work. Apify RESIDENTIAL proxy is refused and fails the run at startup: post listings are large and residential bandwidth is billed to the Actor, while Reddit serves the same data to datacenter addresses. To route through your own residential provider, use Custom proxy URLs — that traffic goes through your account and is honoured.

## Actor input object example

```json
{
  "subreddits": [
    "r/startups",
    "dataengineering",
    "https://www.reddit.com/r/python/"
  ],
  "includeRules": true,
  "includePostFlairs": false,
  "includePosts": false,
  "postSort": "NEW",
  "topTimeRange": "WEEK",
  "maxPostsPerSubreddit": 25,
  "postsNewerThan": "",
  "includeNsfw": false,
  "maxConcurrency": 5,
  "requestDelayMs": 0,
  "debugMode": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Subreddits and posts together, in their shared columns.

## `subreddits` (type: `string`):

One row per community: subscribers, weekly activity, creation date, type, flags, icon and banner.

## `rules` (type: `string`):

Each community's public rules and post flair templates.

## `posts` (type: `string`):

Optional post rows, when post collection is on.

## `status` (type: `string`):

The outcome for every community, including private, banned, quarantined and nonexistent ones.

# 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": [
        "r/startups",
        "dataengineering",
        "https://www.reddit.com/r/python/"
    ],
    "maxPostsPerSubreddit": 25,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/reddit-subreddit-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": [
        "r/startups",
        "dataengineering",
        "https://www.reddit.com/r/python/",
    ],
    "maxPostsPerSubreddit": 25,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/reddit-subreddit-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": [
    "r/startups",
    "dataengineering",
    "https://www.reddit.com/r/python/"
  ],
  "maxPostsPerSubreddit": 25,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call coregent/reddit-subreddit-scraper --silent --output-dataset

```

## MCP server setup

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