# Reddit Subreddit Members Scraper (`louisdeconinck/reddit-subreddit-users`) Actor

Scrape all members of a subreddit. Find the most active and influential users within Reddit communities. Perfect for market research, community analysis, and finding key players in your target niche.

- **URL**: https://apify.com/louisdeconinck/reddit-subreddit-users.md
- **Developed by:** [Louis Deconinck](https://apify.com/louisdeconinck) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 202 total users, 3 monthly users, 100.0% runs succeeded, 9 bookmarks
- **User rating**: 1.42 out of 5 stars

## Pricing

$9.00 / 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.

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

Discover active users and influencers in your target reddit communities. This scraper / API will return a list of users within a given subreddit including how many times they have posted and commented.

### ✨ Features

- **Comprehensive User Data**: Collect detailed metrics including:
  - User names
  - Total post counts from users
  - Total comment counts from users
  - User profile URLs
  - Unique Reddit IDs
- **Configurable Depth**: Control how many posts & commentsto analyze per subreddit
- **Clean JSON Output**: Results in easily parseable JSON format

### 💡 Use Cases

- **Market Research**: Identify active users and influencers in your target communities
- **Community Analysis**: Understand user engagement patterns and activity levels
- **Influencer Discovery**: Find power users and active contributors in specific niches
- **Content Strategy**: Analyze successful content creators in your field
- **Academic Research**: Gather data for social media studies and user behavior analysis

### 📊 Output Format

- `username` - The username of the user
- `userId` - The Reddit ID of the user
- `userUrl` - The URL of the user's profile
- `postCount` - The number of posts the user has made (max 1,000)
- `commentCount` - The number of comments the user has made (max 1,000)
- `firstActivity` - The timestamp of the user's first activity in the subreddit (epoch unix UTC timestamp = number of seconds since 1970-01-01)
- `lastActivity` - The timestamp of the user's last activity in the subreddit (epoch unix UTC timestamp = number of seconds since 1970-01-01)

```json
{
    "username": "username",
    "userId": "t2_12345abcd",
    "userUrl": "https://reddit.com/user/username",
    "postCount": 5,
    "commentCount": 17,
    "firstActivity": 1715769600,
    "lastActivity": 1715769600
}
```

### 🛠️ Configuration Options

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| subreddit | String | The subreddit to scrape |  |
| maxPosts | Number | (optional) Number of posts to analyze per subreddit | 99999999 |
| maxComments | Number | (optional) Number of comments to analyze per subreddit | 99999999 |
| fetchDetails | Boolean | (optional) Whether to fetch additional details for each user | false |

### 🚦 Getting Started

1. Enter your target subreddit in the input configuration
2. Set an optional limit for the number of posts & comments to analyze per subreddit
3. Run the actor and get your data in clean JSON format

### 📈 Benefits

- Save hours of manual data collection
- Get structured, ready-to-analyze data
- Identify key community members effortlessly
- Make data-driven decisions for your Reddit strategy

### ⚙️ Workings

All most recent posts & comments of a subreddit are scraped. If you only want to scrape posts or comments, set the maxPosts or maxComments to 0. Only unique users are collected. If you set fetchDetails to true, the actor will also fetch additional details for each user: number of posts, comments, first and last activity within the subreddit. This requires two additional scrape requests for each individual user, which will slow down the scraping process significantly. It is recommended to set fetchDetails to false unless you really need the additional details.

Tip: Set the posts & comments per subreddit limit high. This will ensure that you get a larger list of users and that the results are more accurate. You are only billed for the number of unique users, so no additional cost is incurred when scraping the same user multiple times.

### 🔒 Privacy & Compliance

This scraper only collects publicly available data.

### 💪 Why Choose This Scraper?

- **Reliable**: Built on Apify's robust infrastructure
- **Scalable**: Handle multiple subreddits efficiently
- **Up-to-date**: Maintained and updated regularly
- **Support**: Backed by Apify's excellent customer service

Ready to unlock valuable Reddit user insights? Start scraping now! 🚀

# Actor input Schema

## `subreddit` (type: `string`):

Subreddit to scrape, e.g. webscraping, r/webscraping or https://www.reddit.com/r/webscraping/. Large subreddits can have hundreds of thousands of users, so set Max Posts / Max Comments to control run time and cost.

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

Number of posts to scrape per subreddit (optional). Leave empty to scrape all posts.

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

Number of comments to scrape per subreddit (optional). Leave empty to scrape all comments.

## `fetchDetails` (type: `boolean`):

Whether to fetch additional details for each user (optional). This will slow down the scraping process significantly. So set to false unless you really need the additional details.

## Actor input object example

```json
{
  "subreddit": "webscraping",
  "maxPosts": 10000,
  "maxComments": 10000,
  "fetchDetails": false
}
```

# 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 = {
    "subreddit": "webscraping",
    "maxPosts": 10000,
    "maxComments": 10000,
    "fetchDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("louisdeconinck/reddit-subreddit-users").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 = {
    "subreddit": "webscraping",
    "maxPosts": 10000,
    "maxComments": 10000,
    "fetchDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("louisdeconinck/reddit-subreddit-users").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 '{
  "subreddit": "webscraping",
  "maxPosts": 10000,
  "maxComments": 10000,
  "fetchDetails": false
}' |
apify call louisdeconinck/reddit-subreddit-users --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,louisdeconinck/reddit-subreddit-users"
        }
    }
}
```

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/SGLneRqgypBTUnc0h/builds/omCb6oanm1GKbKLyE/openapi.json
