# Reddit Fast Scraper (posts, comments, search) (`danielmichalek/reddit-fast`) Actor

Find public Reddit posts in subreddits and searches. Set a result limit and include comments if needed. Ready to try a subreddit?

- **URL**: https://apify.com/danielmichalek/reddit-fast.md
- **Developed by:** [Daniel Michałek](https://apify.com/danielmichalek) (community)
- **Security:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.10 / 1,000 reddit items

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 Fast Scraper (posts, comments, search)

Collect public Reddit posts and optional comments from subreddits, search queries, user pages and post URLs. The Actor returns structured items and does not require a Reddit account or a browser.

### What it does

- Collect posts from selected subreddits or public searches for research and monitoring.
- Fetch comments for posts when requested, preserving parent IDs and thread depth where available.
- Keep track of the source of each item and report incomplete sources and rate limits.

### Input

Provide at least one of `subreddits`, `searches` or `startUrls`. Choose a sort order with `sort` and, for applicable searches or rankings, a time period with `time`. `maxItems` limits the total number of posts and comments; its default is 50. Set `includeComments` to true to collect comments and use `maxComments` to limit them per post. `skipNsfw` defaults to true. `proxyConfiguration` is optional; check the proxy provider's charges before enabling a paid proxy.

### Output

Each dataset item is a post or comment. Depending on the available source it can include an ID, author, text, permalink, timestamp, score and subreddit. Comments include the post ID and parent ID where available. The `dataSource` field identifies JSON or RSS data. A Markdown report in the key-value store describes the run, sources and any warnings.

### Pricing and cost control

The prepared pricing configuration uses the platform's `apify-default-dataset-item` event, with a proposed price of $0.0021 per item. The actual Store price and charging terms must be checked on the published listing. Use `maxItems` to limit the number of items and review the platform's run and proxy costs before starting a run.

### Limitations and fair use

The Actor accesses public data only. It does not sign in, solve CAPTCHAs or access private communities. Reddit may block requests or impose rate limits; the Actor can stop early when the next allowed request falls outside the run's remaining time. When JSON access is blocked, the Actor can fall back to RSS, whose fields and coverage can differ. Availability and completeness depend on Reddit and the chosen network route.

### Example

To explore a subreddit, set `subreddits` to `["webscraping"]`, choose `sort` as `top`, `time` as `week`, and set `maxItems` to 20. Enable `includeComments` only when comments are needed. See `examples/input.json` and `examples/output.json` in the source repository.

# Actor input Schema

## `subreddits` (type: `array`):

Subreddit names with or without the r/ prefix, e.g. webscraping or r/datascience. Without search terms, the posts of each subreddit are listed with the selected sort. With search terms, every term is searched inside every subreddit.

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

Keywords or phrases to search Reddit posts for (put a phrase in quotes for an exact match). Combined with Subreddits, the search is limited to those subreddits.

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

Subreddit URLs (https://www.reddit.com/r/webscraping/top/?t=week), post URLs (.../comments/<id>/..., redd.it or /s/ share links), user URLs (https://www.reddit.com/user/<name>/) or search URLs (https://www.reddit.com/search/?q=apify\&sort=new). Sort and time given in a URL take precedence over the fields below.

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

Order of posts. Subreddits support Hot, New, Top and Rising; searches support Relevance, Hot, Top, New and Most comments; users support Hot, New and Top. An unsupported choice falls back to Hot (subreddits), Relevance (searches) or New (users).

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

Time window used by Top and by searches (Reddit ignores it for Hot, New and Rising listings).

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

Hard cap on dataset items per run, posts and comments together. Every item is one billable result, so this also caps the cost. The cap is shared fairly between all subreddits, searches and URLs.

## `includeComments` (type: `boolean`):

Also store the comments of every post as separate items (type "comment") in thread order, with depth, parent id and post id. Costs one extra request per post that has comments.

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

Upper limit of comments stored per post (0 to 500). Comments hidden behind "load more" links are not expanded.

## `skipNsfw` (type: `boolean`):

Leave out posts marked over 18 (NSFW). Turn off to include them.

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

Optional and off by default. Only needed when Reddit answers with HTTP 429 or 403 for the server's IP address (very large jobs or blocked IP ranges); requests then go through the selected Apify Proxy group or your own proxy URLs.

## Actor input object example

```json
{
  "subreddits": [
    "webscraping"
  ],
  "sort": "hot",
  "time": "all",
  "maxItems": 10,
  "includeComments": false,
  "maxComments": 50,
  "skipNsfw": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `posts` (type: `string`):

No description

## `comments` (type: `string`):

No description

## `report` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "subreddits": [
        "webscraping"
    ],
    "maxItems": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("danielmichalek/reddit-fast").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 = {
    "subreddits": ["webscraping"],
    "maxItems": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("danielmichalek/reddit-fast").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 '{
  "subreddits": [
    "webscraping"
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call danielmichalek/reddit-fast --silent --output-dataset

```

## MCP server setup

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

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/MzKOKgSGQaiJXWuCt/builds/dDh7Zno78s7LKLMmq/openapi.json
