# Reddit Community Posts Scraper Pro (`getdataforme/reddit-community-posts-actor`) Actor

Reddit community Posts Scraper Pro is developed and well tested scraper that extracts community posts detail information posted in reddit.com. Feel free to use and make best use of this scraper to meet your need and be on top of your competitors.

- **URL**: https://apify.com/getdataforme/reddit-community-posts-actor.md
- **Developed by:** [GetDataForMe](https://apify.com/getdataforme) (community)
- **Categories:** News, Social media
- **Features:** Limited permissions
- **Stats:** 118 total users, 0 monthly users, 0.0% runs succeeded, 4 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $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

## Reddit Community Posts Scraper Pro

Extract structured Reddit community posts, community metadata, engagement metrics, and post comments from a Reddit subreddit.

### Introduction

**Reddit Community Posts Scraper Pro** extracts structured post data from a specified Reddit community (subreddit). For each collected post, the Actor captures information such as the post title, description, author, upvotes, comment count, post URL, and community-level information.

The Actor also extracts individual comments associated with each post, including the comment author, comment text, and score. The resulting data is stored in an Apify Dataset, making it suitable for research, content analysis, community analysis, and other data-processing workflows.

### What Can You Scrape?

The Actor returns one dataset item for each scraped Reddit post.

| Field                  | Description                                                       |
| ---------------------- | ----------------------------------------------------------------- |
| `title`                | Title of the Reddit post.                                         |
| `description`          | Text content or description of the Reddit post.                   |
| `weekly_active_users`  | Number of weekly active users shown for the Reddit community.     |
| `weekly_contributions` | Number of weekly contributions shown for the Reddit community.    |
| `created_date`         | Date information associated with the Reddit community's creation. |
| `author`               | Username of the Reddit user who created the post.                 |
| `upvotes`              | Number of upvotes recorded for the post.                          |
| `comment_count`        | Number of comments associated with the post.                      |
| `post_url`             | URL of the Reddit post.                                           |
| `comments`             | Array containing the comments collected for the post.             |
| `comments[].author`    | Reddit username of the comment author.                            |
| `comments[].comment`   | Text content of the comment.                                      |
| `comments[].score`     | Score of the individual comment.                                  |
| `total_comments`       | Total number of comments returned for the post.                   |

#### Comment Structure

Each item in the `comments` array contains:

```text
comments
├── author
├── comment
└── score
```

This allows post-level information and individual comment-level information to be kept together in the same dataset record.

### Key Features

- Structured Reddit post extraction
- Reddit community metadata extraction
- Post engagement metrics
- Post author extraction
- Comment extraction
- Individual comment scores
- Configurable item limit
- Apify Proxy configuration support
- Structured output in an Apify Dataset

### Quick Start

#### 1. Configure the input

Provide the Reddit community URL you want to scrape and specify how many items to collect using `itemLimit`.

#### 2. Configure proxy settings

If required, configure the Apify Proxy through `proxyConfiguration`.

#### 3. Start the Actor

Run the Actor with your configured input.

#### 4. Access the results

After the Actor finishes, open the **Dataset** associated with the run to view and export the collected Reddit post data.

### Input

The Actor accepts the following input parameters:

| Parameter                             | Type    | Required | Description                                                                         |
| ------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------------- |
| `url`                                 | String  | Yes      | Reddit community URL to scrape, such as `https://www.reddit.com/r/pokhara/`.        |
| `itemLimit`                           | Integer | Yes      | Maximum number of items to collect.                                                 |
| `proxyConfiguration`                  | Object  | No       | Apify Proxy configuration used during the run.                                      |
| `proxyConfiguration.useApifyProxy`    | Boolean | No       | Enables the Apify Proxy.                                                            |
| `proxyConfiguration.apifyProxyGroups` | Array   | No       | Apify Proxy groups to use. The provided configuration uses the `RESIDENTIAL` group. |

#### Input Example

```json
{
  "itemLimit": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "url": "https://www.reddit.com/r/pokhara/"
}
```

### Output

The Actor stores scraped results in an **Apify Dataset**.

Each dataset item represents a Reddit post and includes post information, community metadata, engagement information, and an array of comments.

#### Output Structure

```text
Result
├── title
├── description
├── weekly_active_users
├── weekly_contributions
├── created_date
├── author
├── upvotes
├── comment_count
├── post_url
├── comments
│   ├── author
│   ├── comment
│   └── score
└── total_comments
```

#### Output Example

```json
{
  "title": "View 10 mins apart",
  "description": "Found this hidden spot and there were fireflies too!!!!",
  "weekly_active_users": "10K",
  "weekly_contributions": "599",
  "created_date": " Created May 1, 2012\n  ",
  "author": "Substantial-Skill-62",
  "upvotes": "85",
  "comment_count": "12",
  "post_url": "https://www.reddit.com/r/pokhara/comments/1vzuzxq/view_10_mins_apart/",
  "comments": [
    {
      "author": "ZookeepergameKey6853",
      "comment": "the moon is hella bright today",
      "score": "3"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Ah k, bholi jhan khatra dekhcha hola.",
      "score": "2"
    },
    {
      "author": "silentrocker",
      "comment": "Super fantastic broji!!!",
      "score": "2"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Thankyou!",
      "score": "2"
    },
    {
      "author": "Mnkey-D-Luffy",
      "comment": "Babal 🔥 ma pani janxu eha .",
      "score": "1"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Haii, jhukkera gayeko thau tara amazing !",
      "score": "1"
    },
    {
      "author": "Mnkey-D-Luffy",
      "comment": "Ma pani ek choti gako ! Tespaxi kaha bata jharni ni yad xaina .",
      "score": "1"
    },
    {
      "author": "princess_sparkle999",
      "comment": "Which phone",
      "score": "1"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "S23",
      "score": "1"
    },
    {
      "author": "Impressive_Drop_6835",
      "comment": "OP kun phone ho yo? Dami cha ta photo. Samsung s series jasto cha",
      "score": "1"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Ahh s23 ho. Tara moon nai khatra dekhiraathyo",
      "score": "1"
    },
    {
      "author": "lustfullbabe",
      "comment": "Anyone up?",
      "score": "1"
    }
  ],
  "total_comments": 12
}
```

### Use Cases

The extracted Reddit community data can be useful for:

#### Community Research

Analyze posts and discussions within a specific Reddit community.

#### Content Analysis

Study post titles, descriptions, authors, engagement, and comment content.

#### Engagement Analysis

Use upvotes, comment counts, weekly community metrics, and comment scores to analyze engagement patterns.

#### Discussion Analysis

Examine individual comments together with their authors and scores.

#### Data Analysis

Export the structured dataset for further processing, reporting, or analysis.

### Using the Output

Once a run is complete, the results are available in the Apify Dataset. You can work with the collected data through Apify's available dataset export and API options or pass the data into other processing workflows.

A typical workflow looks like this:

```text
Reddit Community
      ↓
Reddit Community Posts Scraper Pro
      ↓
Apify Dataset
      ↓
JSON / CSV / API
      ↓
Analysis / Automation / Application
```

The structured dataset can be incorporated into external data-processing workflows or used as input for other Actors and applications where appropriate.

### Proxy Configuration

The Actor supports an optional `proxyConfiguration` input.

The provided configuration enables the **Apify Proxy** and specifies the `RESIDENTIAL` proxy group:

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

Proxy configuration can be used as part of the Actor's request configuration when collecting data from Reddit.

Proxy availability and scraping behavior can depend on the source website and the configuration used for the Actor run. Proxy usage does not guarantee successful access in every situation.

### Complete Input Example

```json
{
  "itemLimit": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "url": "https://www.reddit.com/r/pokhara/"
}
```

### Complete Output Example

```json
{
  "title": "View 10 mins apart",
  "description": "Found this hidden spot and there were fireflies too!!!!",
  "weekly_active_users": "10K",
  "weekly_contributions": "599",
  "created_date": " Created May 1, 2012\n  ",
  "author": "Substantial-Skill-62",
  "upvotes": "85",
  "comment_count": "12",
  "post_url": "https://www.reddit.com/r/pokhara/comments/1vzuzxq/view_10_mins_apart/",
  "comments": [
    {
      "author": "ZookeepergameKey6853",
      "comment": "the moon is hella bright today",
      "score": "3"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Ah k, bholi jhan khatra dekhcha hola.",
      "score": "2"
    },
    {
      "author": "silentrocker",
      "comment": "Super fantastic broji!!!",
      "score": "2"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Thankyou!",
      "score": "2"
    },
    {
      "author": "Mnkey-D-Luffy",
      "comment": "Babal 🔥 ma pani janxu eha .",
      "score": "1"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Haii, jhukkera gayeko thau tara amazing !",
      "score": "1"
    },
    {
      "author": "Mnkey-D-Luffy",
      "comment": "Ma pani ek choti gako ! Tespaxi kaha bata jharni ni yad xaina .",
      "score": "1"
    },
    {
      "author": "princess_sparkle999",
      "comment": "Which phone",
      "score": "1"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "S23",
      "score": "1"
    },
    {
      "author": "Impressive_Drop_6835",
      "comment": "OP kun phone ho yo? Dami cha ta photo. Samsung s series jasto cha",
      "score": "1"
    },
    {
      "author": "Substantial-Skill-62",
      "comment": "Ahh s23 ho. Tara moon nai khatra dekhiraathyo",
      "score": "1"
    },
    {
      "author": "lustfullbabe",
      "comment": "Anyone up?",
      "score": "1"
    }
  ],
  "total_comments": 12
}
```

### Important Notes

- The `url` input should contain the Reddit community URL you want to scrape.
- `itemLimit` controls the number of items collected by the Actor.
- The available data depends on the information exposed by the Reddit community and its posts at the time of the run.
- Post and comment information can vary between Reddit communities and individual posts.
- Community metrics such as `weekly_active_users` and `weekly_contributions` may vary over time.
- The number of returned comments may vary depending on the available comments for each post.
- The source website may change its structure or content, which can affect data availability.
- Proxy configuration is optional and should be configured according to your requirements.
- Use collected Reddit data responsibly and in accordance with Reddit's applicable terms, policies, and any relevant laws or regulations.

### Support

If you encounter an issue with the Actor, contact the support team:

**Email:** <support@getdataforme.com>

**Website:** https://getdataforme.com/contact/

When contacting support, include as much relevant information as possible:

- **Actor name**
- **Input configuration**
- **Error message**
- **Relevant logs**
- **Expected result**
- **Actual result**

Providing these details helps the support team understand and reproduce the issue more efficiently.

### Start Scraping

Configure your Reddit community URL, set the desired `itemLimit`, optionally configure the Apify Proxy, and start the Actor.

Your results will be available in the Apify Dataset as structured Reddit post and comment data, ready for further analysis or integration into your workflow.

# Actor input Schema

## `url` (type: `string`):

Search url is required

## `itemLimit` (type: `integer`):

Specifies the maximum number of items to process.

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

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "url": "https://www.reddit.com/r/django",
  "itemLimit": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "url": "https://www.reddit.com/r/django",
    "itemLimit": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforme/reddit-community-posts-actor").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 = {
    "url": "https://www.reddit.com/r/django",
    "itemLimit": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("getdataforme/reddit-community-posts-actor").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 '{
  "url": "https://www.reddit.com/r/django",
  "itemLimit": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call getdataforme/reddit-community-posts-actor --silent --output-dataset

```

## MCP server setup

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

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/ysqiIxJNqMQeq9LE2/builds/BAZqzoEzibsB4Qqxe/openapi.json
