# Reddit Community Scraper (`scraptivo/reddit-scraper`) Actor

Scrape posts from any Reddit community (subreddit).

- **URL**: https://apify.com/scraptivo/reddit-scraper.md
- **Developed by:** [Scraptivo](https://apify.com/scraptivo) (community)
- **Categories:** Social media, MCP servers, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 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/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 Community Scraper** collects posts from public Reddit communities (subreddits) and turns them into structured data for content analysis, trend research, and community monitoring. Provide a subreddit URL or name, choose a sort order, and export titles, authors, scores, comment counts, flairs, and timestamps to JSON, CSV, Excel, or your preferred integration. Use it to track discussions, study engagement, and build text datasets. Scraping 1,000 posts costs $2.

### What can you automate with Reddit Community Scraper?

- **Monitor community discussions** — track trending topics, sentiment shifts, and emerging conversations in your niche.
- **Extract post metadata at scale** — titles, authors, scores, comment counts, flairs, and timestamps for every post.
- **Build content datasets** — collect public discussions for market research, analytics, or AI training.
- **Track competitor communities** — watch what competitors post and how their audience engages.
- **Schedule recurring collection** — capture new posts daily, weekly, or hourly without manual effort.

### Who is this scraper for?

| Team | Workflow |
|---|---|
| Market researchers | Analyze topics and engagement across communities. |
| Content and social teams | Study what resonates in a niche before publishing. |
| Competitive intelligence teams | Track competitor and brand mentions in relevant subreddits. |
| Data scientists | Build text datasets for analytics or model training. |

### What data can you collect from Reddit?

| Data group | Example fields | How it helps |
|---|---|---|
| Content | title, selftext, url, permalink, domain | Access the post and its text. |
| Author | author, distinguished | Attribute the post. |
| Engagement | score, ups, upvoteRatio, numComments, gilded | Measure traction. |
| Community | subreddit, subredditNamePrefixed, sourceQuery, linkFlairText | Identify the source community. |
| Flags | over18, spoiler, stickied, pinned, locked, archived, isSelf, isVideo, isGallery | Filter and classify posts. |
| Identifiers | id, createdAt | Deduplicate and order records. |

### How to use Reddit Community Scraper

1. Open the Actor in the Scraptivo account.
2. Enter a subreddit URL or name.
3. Choose the sort order and an optional time filter.
4. Set a post limit and run the Actor.
5. Export the dataset to JSON, CSV, Excel, or your integration.

```json
{ "searchQueries": ["AI_Agents", "python"], "sortBy": "hot", "timeFilter": "all", "maxItems": 100, "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] } }
```

### Example workflow

#### Build a weekly list of trending topics

1. Run one or two niche subreddits every Monday.
2. Keep posts above a score and comment-count threshold.
3. Send new posts to Google Sheets or a dashboard.
4. Deduplicate using the stable Reddit `id` field.

### Automate and integrate your results

- **Schedule** daily or hourly runs for active communities using Apify's Scheduler or the API.
- **Webhooks** after a successful run to feed new posts into your pipeline.
- **Export** to Google Sheets, Make, Zapier, or a database.
- **Deduplicate** using the stable `id` field.

```shell
curl "https://api.apify.com/v2/acts/scraptivo~reddit-scraper/run-sync" -H "Content-Type: application/json" -d '{"searchQueries":["AI_Agents"],"sortBy":"hot","maxItems":100}'
```

### Input reference

| Field | Type | Required | Default | What it controls |
|---|---|---:|---|---|
| startUrls | array | no | — | Reddit community URLs to scrape. |
| searchQueries | array | no | — | Subreddit names (alternative to startUrls). |
| sortBy | string | no | hot | Order: hot, new, top, rising, controversial. |
| timeFilter | string | no | all | Time window for top/controversial. |
| maxItems | integer | no | 0 | Maximum posts to scrape (0 = unlimited). |
| proxyConfiguration | object | no | RESIDENTIAL | Proxy settings; residential strongly recommended. |

### Output example

```json
{
  "id": "1vhilqp",
  "title": "Which AI agent platform is best for enterprise voice support?",
  "selftext": "We're looking at AI agent platforms for enterprise voice support...",
  "author": "elementary_constable",
  "subreddit": "AI_Agents",
  "subredditNamePrefixed": "r/AI_Agents",
  "score": 34,
  "numComments": 16,
  "upvoteRatio": 0.97,
  "linkFlairText": "Resource Request",
  "createdAt": "2026-08-06T22:20:48+00:00",
  "url": "https://www.reddit.com/r/AI_Agents/comments/1vhilqp/...",
  "over18": false,
  "isSelf": true,
  "archived": false
}
```

### How much does it cost to scrape Reddit?

Reddit Community Scraper uses pay-per-event billing on Apify:

- **$0.002 per post scraped** (the headline result event).
- **$0.00005 per run** for the actor-start event.

Examples: 1,000 posts cost about $2; 10,000 posts cost about $20. Apify platform plan discounts apply at higher volumes, and residential proxy traffic is billed separately by Apify according to your plan.

### Reliability and responsible use

- Loads Reddit listings with a sticky residential proxy to avoid the captcha walls that block datacenter IPs.
- Scrapes public communities only; private, quarantined, and login-required content is not accessible.
- Optional fields (selftext, linkFlairText, galleryUrls, etc.) can be empty depending on the post type.
- Scrape only public data and follow Reddit's terms of service.

### Frequently asked questions

#### Can I scrape specific subreddits from Reddit?

Yes. Pass full community URLs to `startUrls` or just the subreddit name to `searchQueries` (for example `AI_Agents`).

#### Can I schedule Reddit Community Scraper to run automatically?

Yes. Use Apify's Scheduler or the API to run a subreddit on a daily or hourly cadence.

#### What counts as one result?

One Reddit post. Use `maxItems` to cap the number of posts and control your cost per run.

#### What is the difference between startUrls and searchQueries?

`startUrls` accepts full URLs; `searchQueries` accepts only the subreddit name and builds the URL automatically.

#### Why am I getting zero results?

Reddit blocks datacenter traffic. Make sure residential proxies are enabled in `proxyConfiguration`.

#### How do I avoid duplicate records?

Deduplicate on the stable Reddit `id` field before writing to your pipeline.

### Related Scraptivo automations

- [Instagram Comment Scraper](https://apify.com/scraptivo/instagram-comment-scraper) — comments from Instagram posts.
- [Instagram Post Scraper](https://apify.com/scraptivo/instagram-post-scraper) — posts and engagement from Instagram.
- [YouTube Channel Scraper](https://apify.com/scraptivo/youtube-channel-scraper) — channel and video metadata from YouTube.
- [Twitter/X Profile Scraper](https://apify.com/scraptivo/twitter-x-profile-scraper) — profile and post data from X.

### Support and custom workflows

Need a different field, source, or delivery workflow? Contact Scraptivo at scraptivo@gmail.com. Include the Actor name, a sample URL, the required fields, and expected volume so we can assess the request.

# Actor input Schema

## `startUrls` (type: `array`):

Reddit community URLs to scrape, e.g. https://www.reddit.com/r/AI\_Agents/ or https://old.reddit.com/r/python/. Leave empty if using searchQueries instead.

## `searchQueries` (type: `array`):

Reddit community names to scrape (e.g. AI\_Agents, python, MachineLearning). Alternative to startUrls — URLs are built automatically.

## `sortBy` (type: `string`):

How to sort posts in the community

## `timeFilter` (type: `string`):

Time filter for top/controversial sorting

## `maxItems` (type: `integer`):

Maximum number of posts to scrape (0 = unlimited)

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

Apify proxy for the browser session. Residential proxies are strongly recommended — datacenter IPs are often blocked by Reddit.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/AI_Agents/"
    }
  ],
  "searchQueries": [
    "AI_Agents"
  ],
  "sortBy": "hot",
  "timeFilter": "all",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset containing scraped Reddit posts

## `kvsRecords` (type: `string`):

Key-value store records produced by the Actor

# 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 = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/AI_Agents/"
        }
    ],
    "searchQueries": [
        "AI_Agents"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraptivo/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 = {
    "startUrls": [{ "url": "https://www.reddit.com/r/AI_Agents/" }],
    "searchQueries": ["AI_Agents"],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scraptivo/reddit-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 '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/AI_Agents/"
    }
  ],
  "searchQueries": [
    "AI_Agents"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scraptivo/reddit-scraper --silent --output-dataset

```

## MCP server setup

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