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

Extract subreddit metadata — about info, rules, similar communities, and optional comments — for community due diligence and maps. $0.50 per 1,000 rows.

- **URL**: https://apify.com/scrapingdino/reddit-subreddit-scraper.md
- **Developed by:** [Scraping Dino](https://apify.com/scrapingdino) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 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 - Community Info, Rules, Similar Subs & Comments

### Overview

The **Reddit Subreddit Scraper** extracts rich community metadata for one or more subreddits: about/info, moderation rules, similar communities, and optionally recent comments. Use it to understand community size, positioning, guidelines, and adjacency before you engage or scrape posts at scale.

Built for community strategists, brand safety teams, researchers, and growth operators evaluating where to participate. Returns **clean, structured JSON** with type-tagged rows (`info`, `rule`, `similar`, `comment`, `error`) so you can filter datasets easily.

Pair it with the Subreddit Posts Scraper when you need both community context and feed content.

### Features

- Batch multiple subreddits per run
- Core community info: title, description, subscribers, active users, NSFW, icons, banners
- Optional rules export (`includeRules`)
- Optional similar/related communities (`includeSimilar`)
- Optional comments listing (`includeComments`) with `maxResults` cap
- Absolute Reddit URLs for community pages
- Concurrent processing with per-subreddit error isolation
- Premium structured JSON for BI and research workflows

### Use Cases

- **Market research** — Profile communities before launching campaigns
- **Brand monitoring** — Document rules and norms for brand-safe engagement
- **Competitor analysis** — Map similar communities around rival hubs
- **Lead generation** — Qualify high-subscriber niches for outreach
- **Content research** — Align content with community guidelines
- **Business intelligence** — Maintain a catalog of strategic subreddits
- **Academic research** — Study community structure and rule taxonomies
- **Recruitment** — Evaluate professional communities for talent branding

### Input

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `subreddits` | array of strings | **Yes** | — | Subreddit names (`askreddit` or `r/askreddit`). |
| `includeRules` | boolean | No | `true` | Fetch community rules. |
| `includeSimilar` | boolean | No | `true` | Fetch similar/recommended subreddits. |
| `includeComments` | boolean | No | `false` | Fetch comments from the community. |
| `maxResults` | integer | No | `50` | Max comments when `includeComments` is true (1–500). |

**How parameters affect the run:** Disabling rules/similar reduces API calls. Enabling comments adds listing pagination up to `maxResults`. Info is always collected for each valid subreddit.

#### Example input

```json
{
  "subreddits": ["marketing", "r/PPC"],
  "includeRules": true,
  "includeSimilar": true,
  "includeComments": false
}
```

### Output

Rows are typed. **Info** rows include:

| Field | Type | Description |
|---|---|---|
| `type` | string | `"info"` |
| `subreddit` | string | Display name |
| `id` | string | null | Community ID |
| `title` | string | null | Title |
| `description` | string | null | Public description |
| `subscribers` | number | null | Subscriber count |
| `activeUsers` | number | null | Active user count |
| `createdUtc` | number | string | null | Created |
| `nsfw` | boolean | null | Over-18 flag |
| `quarantined` | boolean | null | Quarantine flag |
| `icon` | string | null | Icon URL |
| `banner` | string | null | Banner URL |
| `url` | string | null | Absolute community URL |
| `raw` | object | Optional raw payload |

**Rule** rows (`type: "rule"`): `shortName`, `description`, `kind`, `violationReason`, `createdUtc`, `priority`, plus `subreddit`.

**Similar** rows (`type: "similar"`): listing summary fields plus `sourceSubreddit`, `subscribers`, `url`.

**Comment** rows (`type: "comment"`): standard listing summary fields.

### Example Output

```json
[
  {
    "type": "info",
    "subreddit": "marketing",
    "id": "2qh1i",
    "title": "Internet Marketing",
    "description": "A community for professional marketers.",
    "subscribers": 1200450,
    "activeUsers": 842,
    "createdUtc": 1201234567,
    "nsfw": false,
    "quarantined": false,
    "icon": "https://styles.redditmedia.com/.../icon.png",
    "banner": "https://styles.redditmedia.com/.../banner.png",
    "url": "https://www.reddit.com/r/marketing/"
  },
  {
    "type": "rule",
    "subreddit": "marketing",
    "shortName": "No blog spam",
    "description": "Do not drop links without meaningful discussion.",
    "kind": "link",
    "violationReason": "Spam",
    "createdUtc": 1500000000,
    "priority": 0
  },
  {
    "type": "similar",
    "sourceSubreddit": "marketing",
    "subreddit": "digital_marketing",
    "title": "Digital Marketing",
    "subscribers": 310000,
    "url": "https://www.reddit.com/r/digital_marketing/"
  }
]
```

### Related Scrapers

- **Reddit Subreddit Posts Scraper** — Hot/new/top posts from the same communities
- **Reddit Popular Subreddits Scraper** — Discover communities to feed into this scraper
- **Reddit Search Scraper** — Find subreddits by keyword
- **Reddit Comment Tree Scraper** — Deep threads for specific posts

# Actor input Schema

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

List of subreddit names to scrape. Enter one per line — plain names or r/name are accepted.

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

Fetch the subreddit's rules.

## `includeSimilar` (type: `boolean`):

Fetch related or recommended subreddits.

## `includeComments` (type: `boolean`):

Fetch comments for posts in the subreddit.

## `maxResults` (type: `integer`):

Maximum number of comments to fetch per subreddit. Only used when Comments is enabled.

## Actor input object example

```json
{
  "subreddits": [
    "askreddit",
    "python"
  ],
  "includeRules": true,
  "includeSimilar": true,
  "includeComments": false,
  "maxResults": 50
}
```

# Actor output Schema

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

One summary row per scraped subreddit.

## `info` (type: `string`):

Flattened subreddit metadata.

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

One row per subreddit rule.

## `similar` (type: `string`):

One row per related or recommended subreddit.

## `comments` (type: `string`):

One row per comment. Empty when Comments is disabled.

## `all` (type: `string`):

Combined dataset with every record from Results, Info, Rules, Similar, and Comments.

# 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": [
        "askreddit",
        "python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingdino/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": [
        "askreddit",
        "python",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingdino/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": [
    "askreddit",
    "python"
  ]
}' |
apify call scrapingdino/reddit-subreddit-scraper --silent --output-dataset

```

## MCP server setup

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