# Reddit Scraper - Posts, Comments & Upvotes (`aolmo/reddit-scraper`) Actor

Posts from any subreddit, user or Reddit search, with upvotes, upvote ratio, comment count, flair, text and links, plus the comments of each post with their scores and depth. No login, no API key, no browser. $0.001 per post or comment; new posts flagged on scheduled runs.

- **URL**: https://apify.com/aolmo/reddit-scraper.md
- **Developed by:** [Antonio del Olmo Tena](https://apify.com/aolmo) (community)
- **Categories:** Social media, Marketing
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 item scrapeds

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

Scrape Reddit posts and comments as clean, structured rows, without a Reddit account or API key. Pick subreddits, run Reddit searches, or paste subreddit, user and post URLs, and the Actor returns one row per post with its upvotes, upvote ratio, number of comments, awards, flair, language, text and links. Switch on comments to also get the discussion under each post, with the upvotes, depth and parent of every comment. Schedule it to catch new posts as they appear.

No login, no Reddit API key, no browser: the Actor reads the same pages Reddit serves to logged-out visitors. You pay $0.001 per post or comment returned.

### What you get

One Dataset row per post:

- `title`, `text`, `url`, `id`, `subreddit`, `author`, `createdAt`, `flair`, `language`.
- `score` (upvotes), `upvoteRatio`, `commentCount`, `awards`.
- `postType` (`text`, `link`, `image`, `video`, `gallery`...), `link` and `domain` for link posts, `thumbnail`.
- `isNew`: `true` when the post was not in the previous run of that source.

With **Include comments**, one row per comment right after its post: `type: comment`, `text`, `author`, `score`, `depth` (0 for direct replies), `parentId`, `postId`, `url`, `createdAt`.

Every row has `source` (where it comes from) and `type` (`post` or `comment`).

### How to use it

1. Open the **Input** tab.
2. In **Subreddits** type one per line: `python`, `webdev`, `r/AskReddit`.
3. Optionally add **Searches** (for example `best web scraping tool`), restricted to one subreddit with **Search inside subreddit**, or paste **Reddit URLs**: `https://www.reddit.com/r/webdev/top/?t=week`, `https://www.reddit.com/user/spez/`, or a post URL to get that post and its comments.
4. Choose **Sort** (hot, new, top, rising) and, for top, the **Time range**.
5. Set **Max posts** per source (default 50) and switch on **Include comments** if you need them.
6. Click **Start** and export the rows as JSON, CSV or Excel.
7. To monitor a community or a keyword, schedule the Actor with sort **New**; new posts come with `isNew: true`.

### Input

```json
{
  "subreddits": ["python", "webdev"],
  "searches": ["web scraping"],
  "sort": "top",
  "time": "week",
  "maxItems": 50,
  "includeComments": true,
  "maxCommentsPerPost": 25
}
```

| Field | Description |
|-------|-------------|
| `subreddits` | Subreddit names. |
| `searches`, `searchSubreddit` | Reddit searches, optionally inside one subreddit. |
| `startUrls` | Subreddit, user, search or post URLs. |
| `sort`, `time` | `hot`, `new`, `top`, `rising`; time range for top and searches. |
| `maxItems` | Posts per source, 1 to 1,000. Default 50. |
| `includeComments`, `maxCommentsPerPost` | Comments of each post, up to 100 per post. |

Up to 50 sources per run.

### Output example

```json
{
  "source": "https://www.reddit.com/r/webdev/top/?t=week",
  "type": "post",
  "id": "t3_1wwyawv",
  "subreddit": "webdev",
  "title": "TIL that you can connect to IPv4 addresses written as a single number",
  "author": "EliasWick",
  "url": "https://www.reddit.com/r/webdev/comments/1wwyawv/til_that_you_can_connect_to_ipv4_addresses/",
  "link": null,
  "domain": "self.webdev",
  "postType": "text",
  "text": "You can apparently use the decimal form of an IP address...",
  "flair": "Showoff Saturday",
  "score": 2935,
  "upvoteRatio": 0.99,
  "commentCount": 186,
  "awards": 0,
  "language": "en",
  "createdAt": "2026-10-03T21:18:51.000Z",
  "isNew": false,
  "timestamp": "2026-10-07T20:00:00.000Z"
}
```

### Pricing

Pay per event, no subscription:

- **Item scraped**: $0.001 per post or comment row. 1,000 rows cost $1.
- **New post**: $0.002 per post flagged as new in a scheduled run.

Sources that cannot be read or return nothing are free. Compare with Reddit scrapers at $1.50 to $3.40 per 1,000 results.

### Use it as an API

```bash
curl -X POST "https://api.apify.com/v2/acts/aolmo~reddit-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subreddits": ["python"], "sort": "new", "maxItems": 100}'
```

You can also call it from AI agents through the Apify MCP server.

### FAQ

**Do I need a Reddit account or API key?** No. The Actor only reads what Reddit shows to logged-out visitors.

**Do search results include upvotes?** Not always: searches come from Reddit's public feeds, which do not carry scores, so `score` and `commentCount` can be empty for search rows. Subreddit and user listings always include them.

**How many comments per post?** Up to 100, the top of the discussion as Reddit shows it, with each comment's depth and parent.

**Can it read private or quarantined subreddits?** No, only public content.

**Where is the data stored between runs?** In a Key-Value Store of your account named `micro-saas-state-reddit-scraper`, one key per source. Delete it to start fresh.

# Actor input Schema

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

One per line, with or without r/: python, r/webdev, AskReddit.

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

Optional. Reddit searches, one per line, e.g. web scraping tool.

## `searchSubreddit` (type: `string`):

Optional. Restrict the searches above to this subreddit.

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

Optional. Subreddit, user, search or post URLs copied from your browser, e.g. https://www.reddit.com/r/webdev/top/?t=week or https://www.reddit.com/user/spez/. A post URL returns the post and its comments.

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

Order of subreddit posts (and of searches: hot and rising use relevance).

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

Used with Top and with searches.

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

Also caps what you pay per source.

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

Also returns the comments of each post, with their upvotes and depth (one extra request per post).

## `maxCommentsPerPost` (type: `integer`):

Comments are charged like posts.

## `product` (type: `string`):

Internal. Leave as is.

## Actor input object example

```json
{
  "subreddits": [
    "python"
  ],
  "sort": "hot",
  "time": "week",
  "maxItems": 50,
  "includeComments": false,
  "maxCommentsPerPost": 25,
  "product": "reddit-scraper"
}
```

# Actor output Schema

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

Dataset items: url, changed, events, data, timestamp and error (when the target failed).

# 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": [
        "python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aolmo/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 = { "subreddits": ["python"] }

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

```

## MCP server setup

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