# Reddit Scraper (`scrapesmith/reddit-scraper`) Actor

Scrape Reddit posts, comments, and user profiles without API keys or login. Extract from any subreddit, keyword search, or post URL. No rate limits.

- **URL**: https://apify.com/scrapesmith/reddit-scraper.md
- **Developed by:** [Scrape Smith](https://apify.com/scrapesmith) (community)
- **Categories:** Automation, Social media, Lead generation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 231 total users, 46 monthly users, 100.0% runs succeeded, 8 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.80 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Scraper — Posts, Comments, Profiles and Search API

Collect public Reddit posts, discussion comments, user profiles and keyword search results in one dataset. Use Reddit URLs or search terms for community research, social listening and AI-assisted analysis.

### Quick start

1. Open an example below or enter your own public Reddit targets.
2. Choose a per-target result limit and `maxItems` for the whole run.
3. Run the Actor and export the dataset as JSON, CSV or Excel.

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/Python/"
    }
  ],
  "sort": "new",
  "maxPostCount": 20,
  "maxItems": 20
}
```

### Example tasks

Copy a ready-to-use configuration and customize its targets or limits:

- [Monitor new Python community discussions](https://apify.com/scrapesmith/reddit-scraper/examples/reddit-monitor-python-community)
- [Research startup discussions on Reddit](https://apify.com/scrapesmith/reddit-scraper/examples/reddit-research-startup-discussions)
- [Compare Python and JavaScript discussions](https://apify.com/scrapesmith/reddit-scraper/examples/reddit-compare-technology-communities)
- [Export public Reddit profile summaries](https://apify.com/scrapesmith/reddit-scraper/examples/reddit-export-public-reddit-profiles)
- [Collect an AskReddit discussion for analysis](https://apify.com/scrapesmith/reddit-scraper/examples/reddit-analyze-askreddit-thread)
- [Find business advice in entrepreneur discussions](https://apify.com/scrapesmith/reddit-scraper/examples/reddit-find-entrepreneur-advice)

### Inputs

| Input | Type | Purpose |
|---|---|---|
| `startUrls` | array | Paste any Reddit URL — subreddit, post, user profile, or search page. The scraper auto-detects the type. |
| `searches` | array | Search Reddit by keyword without needing a URL. Each keyword runs as a separate search. Leave empty if using Start URLs. |
| `searchCommunityName` | string | Optional. If set, keyword searches will be scoped to this subreddit only (e.g. 'entrepreneur'). Only used when Searches is filled. |
| `sort` | string | Sort order for subreddit posts. Hot = trending now. New = most recent. Top = highest voted. Rising = gaining traction. |
| `time` | string | Filter results by time range. Most useful when Sort is set to Top. |
| `maxItems` | integer | Maximum total dataset rows across all inputs, including any profile, community or original-post rows. |
| `maxPostCount` | integer | Maximum number of posts to scrape from each subreddit, search query, or user. |
| `maxComments` | integer | Maximum number of comments to scrape when visiting a post URL. Set to 0 to skip comments entirely. |
| `postDateLimit` | string | Only scrape posts published after this date (YYYY-MM-DD). Automatically sets sort to New. |
| `commentDateLimit` | string | Only scrape comments published after this date (YYYY-MM-DD). |
| `skipComments` | boolean | For a post URL, return the post without collecting its comments. |
| `skipUserPosts` | boolean | When enabled, only the user profile object is returned — their post history is not fetched. |
| `includeNSFW` | boolean | When enabled, over-18 and NSFW posts are included in results. |

### Output fields

Records are identified by `dataType`: post, comment, user or community, depending on the input.

| Record | Available fields |
|---|---|
| Posts | `id`, `url`, `title`, `body`, `username`, `communityName`, `upVotes`, `numberOfComments`, media and flair fields |
| Comments | `id`, `url`, `body`, `username`, `parentId`, `postUrl`, `upVotes`, `depth` |
| Profiles | `username`, `url`, `bio`, `postKarma`, `commentKarma`, `totalKarma`, available account flags |
| Timestamps | `createdAt` and `scrapedAt`, where applicable |

Optional fields depend on the record type and what Reddit makes public. Deleted authors, unavailable media and absent profile details can have empty values. Scores and comment counts are snapshots, not permanent totals.

### API, MCP and AI workflows

Use the Actor through the [Apify API](https://docs.apify.com/api/v2) or select it in the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). An AI agent can supply the same JSON inputs shown above, then use the returned dataset for summarization, classification or research. Sentiment analysis and summaries are downstream tasks; this Actor returns source data.

Connect datasets to n8n, Make, Zapier or your own Python and JavaScript workflows. Use Apify schedules for recurring runs and webhooks to trigger processing after completion. ChatGPT, Claude and LangChain workflows can consume the exported data through their configured integrations.

### Limits and frequently asked questions

**Do I need a Reddit account?** No Reddit login or personal Reddit API key is required. Apify API calls require your own Apify token.

**How many results can I collect?** The free allowance is 100 dataset rows. Paid runs honor your input and platform result limits, with a 100,000-row dataset ceiling. Per-target limits do not override the total cap. Set your Apify run timeout and budget to suit the job.

**Does a requested maximum guarantee that many rows?** No. Public availability, source pagination, filtering, duplicate removal and deleted content can reduce the count. This is not a complete historical archive.

**Are results unique?** IDs are deduplicated across the inputs in a run. Separate new runs can return the same records; use their IDs when maintaining a historical database.

**Can bulk runs continue while producing results?** Yes. There is no fixed internal runtime, request-count or page-count cutoff. Requested result limits still apply. Repeated failures, unavailable data or pagination without progress stop collection while preserving confirmed results.

**What does resume mean?** Saved checkpoints support continuation of the same run. Starting a fresh run creates a new dataset and does not automatically resume an older run.

**What is the price?** Check the current Pricing tab on this Actor. Your plan, result allowance and run budget determine which limits apply.

# Actor input Schema

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

Paste any Reddit URL — subreddit, post, user profile, or search page. The scraper auto-detects the type.

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

Search Reddit by keyword without needing a URL. Each keyword runs as a separate search. Leave empty if using Start URLs.

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

Optional. If set, keyword searches will be scoped to this subreddit only (e.g. 'entrepreneur'). Only used when Searches is filled.

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

Sort order for subreddit posts. Hot = trending now. New = most recent. Top = highest voted. Rising = gaining traction.

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

Filter results by time range. Most useful when Sort is set to Top.

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

Hard cap on the total number of items saved across all URLs and searches combined. Leave empty for no global limit.

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

Maximum number of posts to scrape from each subreddit, search query, or user.

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

Maximum number of comments to scrape when visiting a post URL. Set to 0 to skip comments entirely.

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

Only scrape posts published after this date (YYYY-MM-DD). Automatically sets sort to New.

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

Only scrape comments published after this date (YYYY-MM-DD).

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

When enabled, only posts are scraped — comments are not fetched. Speeds up subreddit scraping significantly.

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

When enabled, only the user profile object is returned — their post history is not fetched.

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

When enabled, over-18 and NSFW posts are included in results.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/entrepreneur/"
    }
  ],
  "searches": [],
  "searchCommunityName": "",
  "sort": "hot",
  "time": "",
  "maxPostCount": 100,
  "maxComments": 100,
  "skipComments": false,
  "skipUserPosts": false,
  "includeNSFW": 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 = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/entrepreneur/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesmith/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/entrepreneur/" }] }

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

```

## MCP server setup

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