# Reddit Scraper — Posts, Comments, Search + Sentiment (`korado_labs/reddit-scraper`) Actor

Scrape Reddit posts, comments, subreddits, users, and keyword search results with sentiment scores — no Reddit API key needed. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

- **URL**: https://apify.com/korado\_labs/reddit-scraper.md
- **Developed by:** [Korado Labs](https://apify.com/korado_labs) (community)
- **Categories:** Social media, News, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 result storeds

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?

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 Scraper — Posts, Comments, Search + Sentiment

Scrape **Reddit posts, comments, communities, and user profiles** — from URLs or keyword searches — with **built-in sentiment analysis on every post and comment at no extra charge**. No login, no browser, no Reddit API keys: a fast JSON engine that returns clean, structured data in seconds.

### What can it do?

- **Scrape subreddits** — posts (hot / new / top / rising) plus the community's info record (members, description, created date).
- **Scrape posts** — title, text, author, upvotes, upvote ratio, comment count, flair, media links, timestamps.
- **Scrape comments** — full comment trees per post with author, score, permalink, and parent links.
- **Scrape user profiles** — karma, description, and their recent posts and comments.
- **Search Reddit** — by keyword across all of Reddit or inside one community, for posts, comments, communities, or users, sorted by relevance / top / new / comments with time filters.
- **Sentiment analysis** — every post and comment gets `sentiment: {label, score}` (positive / neutral / negative, VADER compound score). Perfect for brand monitoring and trend research. **Free** — it never adds to your bill.

### Input

Provide at least one of:

1. **Start URLs** (`startUrls`) — full Reddit URLs: subreddit, post, user, or search pages.
2. **Search terms** (`searches`) — keywords, optionally restricted to one community (`searchCommunityName`).

Migrating from another Reddit scraper? Your existing input works as-is — this actor accepts the same field names (`startUrls`, `searches`, `sort`, `time`, `maxItems`, `maxPostCount`, `maxComments`, `skipComments`, …).

```json
{
  "searches": ["your brand name"],
  "searchPosts": true,
  "searchComments": true,
  "sort": "new",
  "maxItems": 100
}
```

### Output

One dataset item per post / comment / community / user, tagged with `dataType`:

```json
{
  "id": "t3_1abc2de",
  "parsedId": "1abc2de",
  "url": "https://www.reddit.com/r/technology/comments/1abc2de/...",
  "username": "some_redditor",
  "title": "Post title here",
  "communityName": "r/technology",
  "body": "Post text…",
  "numberOfComments": 128,
  "upVotes": 2450,
  "upVoteRatio": 0.94,
  "sentiment": { "label": "positive", "score": 0.7906 },
  "createdAt": "2026-08-27T14:03:11+00:00",
  "dataType": "post"
}
```

### Pricing (pay per event)

| Event | Price |
|---|---|
| Actor start | $0.015 per run |
| Result item (post / comment / community / user) | $0.003 |

1,000 results cost ~$3. Sentiment is included free. Failed runs charge nothing.

### Cost control

`maxItems` is a hard cap on total items saved — it directly caps your spend. Fine-tune with `maxPostCount`, `maxComments`, `maxCommunitiesCount`, `maxUserCount`, and the date limits (`postDateLimit`, `commentDateLimit`).

### FAQ

**Do I need Reddit API keys or an account?** No. The scraper reads Reddit's public JSON endpoints.

**Is scraping Reddit legal?** This actor extracts only publicly available data. Make sure your use complies with applicable laws and Reddit's terms; consult a lawyer if unsure.

**Why do I see a proxy setting?** Reddit blocks datacenter IPs, so the actor uses residential proxies by default — no setup needed.

# Actor input Schema

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

Full Reddit URLs to scrape: subreddits (https://www.reddit.com/r/technology/), posts (…/comments/abc123/…), users (…/user/spez), or search result pages.

## `searches` (type: `array`):

Keywords to search across Reddit (or inside the community below). Each term returns posts by default; enable comment/community/user search below.

## `searchCommunityName` (type: `string`):

Restrict keyword searches to one community, e.g. `technology` or `r/technology`.

## `ignoreStartUrls` (type: `boolean`):

Only run keyword searches, even if start URLs are filled in.

## `searchPosts` (type: `boolean`):

Return posts matching each search term.

## `searchComments` (type: `boolean`):

Return comments matching each search term.

## `searchCommunities` (type: `boolean`):

Return communities (subreddits) matching each search term.

## `searchUsers` (type: `boolean`):

Return user profiles matching each search term.

## `sort` (type: `string`):

Sort order for listings and search results.

## `time` (type: `string`):

Time window for Top sorting and searches.

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

Overall cap on dataset items saved (posts + comments + communities + users). Directly caps your cost.

## `maxPostCount` (type: `integer`):

Posts scraped per subreddit, user, or search term.

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

Comments scraped per post (0 = no comments).

## `maxCommunitiesCount` (type: `integer`):

Community records per search term (when community search is on).

## `maxUserCount` (type: `integer`):

User records per search term (when user search is on).

## `skipComments` (type: `boolean`):

Don't fetch comments for scraped posts.

## `skipUserPosts` (type: `boolean`):

When scraping a user URL, don't fetch their recent posts.

## `skipCommunity` (type: `boolean`):

When scraping a subreddit, don't save the community info record.

## `includeNSFW` (type: `boolean`):

Include content marked over-18.

## `includeSentiment` (type: `boolean`):

Tag every post and comment with sentiment {label, score} (VADER). Free — no extra charge.

## `postDateLimit` (type: `string`):

Only keep posts created after this ISO date, e.g. `2026-01-31` or `2026-01-31T00:00:00Z`.

## `commentDateLimit` (type: `string`):

Only keep comments created after this ISO date.

## `proxy` (type: `object`):

Reddit blocks datacenter IPs, so residential proxy is required and used by default.

## `includeMediaLinks` (type: `boolean`):

Media links, upvotes and comment counts are always included — this switch exists for compatibility with other Reddit scrapers.

## `searchMedia` (type: `boolean`):

Not supported; ignored.

## `scrollTimeout` (type: `integer`):

This scraper uses Reddit's JSON API, not a browser — no scrolling needed. Ignored.

## `navigationTimeout` (type: `integer`):

Per-request timeout.

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

Ignored.

## `autoUnblock` (type: `boolean`):

When Reddit blocks the normal proxy pool, automatically retry through Apify's Web Unblocker proxy tier. Uses slightly more proxy bandwidth but keeps runs reliable. Also required for comment search.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/technology/"
    }
  ],
  "searches": [
    "artificial intelligence"
  ],
  "ignoreStartUrls": false,
  "searchPosts": true,
  "searchComments": false,
  "searchCommunities": false,
  "searchUsers": false,
  "sort": "new",
  "maxItems": 10,
  "maxPostCount": 10,
  "maxComments": 10,
  "maxCommunitiesCount": 2,
  "maxUserCount": 2,
  "skipComments": false,
  "skipUserPosts": false,
  "skipCommunity": false,
  "includeNSFW": true,
  "includeSentiment": true,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "includeMediaLinks": true,
  "searchMedia": false,
  "scrollTimeout": 40,
  "navigationTimeout": 30,
  "debugMode": false,
  "autoUnblock": true
}
```

# Actor output Schema

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

Posts, comments, communities and users, each tagged with dataType.

# 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/technology/"
        }
    ],
    "searches": [
        "artificial intelligence"
    ]
};

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

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

```

## MCP server setup

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