# Fast Reddit Scraper (`timgreen/fast-reddit-scraper`) Actor

Extract Reddit posts and comments from any subreddit or search query. Fast, reliable Reddit scraping with detailed metadata including upvotes, timestamps, and nested comment threads.

- **URL**: https://apify.com/timgreen/fast-reddit-scraper.md
- **Developed by:** [Tim Green](https://apify.com/timgreen) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 231 total users, 7 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

Pay per event

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

### Fast Reddit Scraper - Extract Reddit Posts and Comments Data

Extract Reddit posts and comments from any subreddit or search query. Fast, reliable Reddit scraping with detailed metadata including upvotes, timestamps, and nested comment threads.

#### What does Fast Reddit Scraper do?

Fast Reddit Scraper is a powerful Apify actor that extracts comprehensive data from [Reddit](https://reddit.com), the world's largest social discussion platform. This Reddit API scraper can collect posts, comments, and engagement metrics from any subreddit or search query without requiring Reddit authentication.

The scraper handles Reddit's complex structure including nested comment threads, pagination, and dynamic content loading. Extract up to 1,000 posts with full metadata including titles, content, author information, vote counts, timestamps, and optionally a list of top comments per post including nested comments.

#### Why scrape Reddit data?

Reddit contains authentic user-generated content across millions of communities, making it invaluable for various business and research applications:

- **Market Research** - Analyze customer opinions, product feedback, and emerging trends in specific niches
- **Sentiment Analysis** - Monitor brand mentions and public opinion about products, services, or topics
- **Content Strategy** - Identify viral content patterns and trending topics for content creation
- **Competitive Intelligence** - Track competitor mentions and customer complaints or praise
- **Lead Generation** - Find potential customers expressing interest in relevant products or services
- **Academic Research** - Collect data for social science studies, linguistics research, and behavioral analysis
- **Crisis Management** - Early detection of negative sentiment or emerging issues
- **Product Development** - Discover unmet customer needs and feature requests
- **SEO and Content Marketing** - Identify popular questions and topics for content optimization
- **Social Listening** - Real-time monitoring of brand reputation and industry discussions

#### How to scrape Reddit posts and comments

1. **Choose your data source**: Enter either a specific subreddit name (e.g., "technology") or a search query to find posts across all Reddit
2. **Set extraction limits**: Specify the maximum number of posts to extract (1-1000). This is a soft limit -- the actual number of posts output may be slightly higher.
3. **Configure sorting**: Choose from new, hot, top, best, rising, relevance, or comment count.
4. **Include comments** (optional): Enable comment extraction to get a list of top-rated comments with nested replies per post
5. **Run the scraper**: The actor will extract structured data in JSON format ready for analysis

#### Reddit scraper input parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| **Max Posts** | Integer | Approximate Maximum number of posts to extract (1-1000) | 1000 |
| **Subreddit** | String | Target subreddit name (ignored if search query is set) | "LifeProTips" |
| **Search Query** | String | Search term to find posts across all Reddit | - |
| **Sort** | Select | Sort order: new, best, hot, top, rising, relevance, comments | "new" |
| **Include Comments** | Boolean | Extract a list of top comments with nested replies (may not include all comments) | false |

**Note**: Relevance and Comment Count sorting only work with search queries, while Best and Rising only work with subreddits.

**Note**: The number of posts extracted may be less than the maximum set and depends on the subreddit or search query.

#### Reddit data output format

The scraper returns structured JSON data for each post with comprehensive metadata:

```json
{
  "subreddit": "OpenAI",
  "url": "https://reddit.com/r/OpenAI/comments/1n6pncz/weekly_limit_in_codex_ouch/",
  "title": "Weekly limit in Codex.. ouch",
  "content": "So.. I, as many, switched to Codex two days ago...",
  "link_flair": "Discussion",
  "created_at": "2025-09-02T11:22:06.000-06:00",
  "over_18": false,
  "author": "yo_mono",
  "upvotes": 5,
  "downvotes": 0,
  "num_comments": 4,
  "comments": [
    {
      "url": "https://reddit.com/r/OpenAI/comments/1n6pncz/weekly_limit_in_codex_ouch/nc1sixy/",
      "content": "Avoid using GPT 5 high at all costs. Stick to low and minimal...",
      "created_at": "2025-09-02T11:38:29.000-06:00",
      "author": "bananasareforfun",
      "upvotes": 2,
      "downvotes": 0,
      "comments": [...]
    }
  ]
}
```

**Extracted data fields include:**

- Post title, content, and URL
- Author username
- Upvote and downvote counts
- Creation timestamps
- Subreddit and flair information
- NSFW content flags
- Comment count and nested comment threads
- Comment metadata with vote ratios

#### Reddit scraping API integration

Use this Reddit scraper in your applications via the Apify API:

```javascript
const { ApifyClient } = require('apify-client');

const client = new ApifyClient({
    token: 'MY-APIFY-TOKEN',
});

// Starts an actor and waits for it to finish.
const { defaultDatasetId } = await client.actor('timgreen/fast-reddit-scraper').call();

// Fetches results from the actor's dataset.
const { items } = await client.dataset(defaultDatasetId).listItems();
```

#### Reddit scraping best practices

**Ethical data collection**: Only scrape publicly available Reddit content and respect community guidelines. This tool accesses the same data visible to any Reddit visitor.

**Rate limiting**: The scraper automatically handles Reddit's rate limits and uses residential proxies to avoid being blocked.

**Data freshness**: Reddit content changes rapidly. For time-sensitive analysis, run extractions frequently to capture the latest posts and comments.

**Comment extraction**: Enable comments only when necessary, as it significantly increases extraction time. Comments are sorted by upvote ratio for quality.

#### Frequently asked questions

**Is it legal to scrape Reddit data?**
Yes, this scraper only accesses publicly available Reddit content that any user can view. Always comply with Reddit's Terms of Service and your local data regulations.

**How fast is the Reddit data extraction?**
Without comments: Approximately 800 posts per minute. With comments enabled: Approximately 100 posts per minute depending on comment volume.

**Can I scrape private subreddits?**
No, this scraper only accesses public Reddit content. Private or restricted subreddits require special permissions.

**What's the difference between subreddit and search scraping?**
Subreddit scraping extracts posts from a specific community. Search scraping finds posts matching keywords across all Reddit communities.

Start extracting valuable Reddit data today with Fast Reddit Scraper - your gateway to authentic social media insights and community intelligence.

# Actor input Schema

## `max_posts` (type: `integer`):

The approximate maximium number of posts to output. The actual number can be slightly more.

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

The subreddit to scrape. If the search query is set, the subreddit is ignored.

## `query` (type: `string`):

The query used to search Reddit. If this is set, subreddit is ignored.

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

Determines the sort order. NOTE: Relevance and Comment Count are only valid when a search query is used, while Best and Rising are only valid when a subreddit is used.

## `include_comments` (type: `boolean`):

If true, each post will include an array of the best comments ranked by upvote to downvote ratio, including nested comments. For posts with a large number of comments, not all comments will be included. Setting this to true will make the scrape take significantly longer.

## Actor input object example

```json
{
  "max_posts": 1000,
  "subreddit": "LifeProTips",
  "sort": "new",
  "include_comments": 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 = {};

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

# Run the Actor and wait for it to finish
run = client.actor("timgreen/fast-reddit-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call timgreen/fast-reddit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=timgreen/fast-reddit-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/w5Lhlvd8mqPK2UGsR/builds/upYEVrnK9SItVwfq3/openapi.json
