# Reddit Post Scraper (`toolzerhub/reddit-post-scraper`) Actor

Extract a complete Reddit post record by post ID or permalink URL, or batch multiple posts at once. Get post ID, subreddit, title, author, creation date, score, upvotes, comment count, and full post detail. No Reddit account or API key required.

- **URL**: https://apify.com/toolzerhub/reddit-post-scraper.md
- **Developed by:** [ToolzerHub](https://apify.com/toolzerhub) (community)
- **Categories:** Social media, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 87.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.25 / 1,000 results

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 Post Scraper

Fetch Reddit posts by ID or permalink. One post, or a whole list in a single run.

Permalinks work as-is -- paste `https://www.reddit.com/r/dataisbeautiful/comments/1uw2gep/some_slug/` and the ID is pulled out for you. Bare IDs work too, with or without the `t3_` prefix.

### Input

Use either field.

| Field | Use it for |
|---|---|
| **`post_id`** | One post ID or permalink. |
| **`post_ids`** | Several, comma-separated. Takes priority when both are set. |

```json
{
  "post_ids": "t3_1uw2gep, https://www.reddit.com/r/AskReddit/comments/1v03k9x/, 1v11abc"
}
```

Duplicates are collapsed before anything is requested, so the same post listed twice in two different forms costs one lookup.

### Batch, don't loop

This is the reason `post_ids` exists.

Reddit posts are fetched through three upstream endpoints of different sizes and prices, and the Actor picks between them per chunk:

| IDs remaining | Endpoint used | Posts per request |
|---|---|---|
| 25 or more | large batch | 30 |
| 5 to 24 | standard batch | 5 |
| fewer than 5 | single | 1 |

The practical consequence: **fetching 30 posts in one run is far cheaper than 30 runs of one post each.** If you have a list, pass the list. Chunking is handled for you, and there is no limit on how many IDs you can supply.

### Output

One row per post.

| Field | Contents |
|---|---|
| **`post_id`**, **`id`** | Reddit post fullname |
| **`subreddit_id`** | The subreddit's ID |
| **`title`** | Post title |
| **`author`** | Username |
| **`subreddit`** | Subreddit name |
| **`created_at`** | Creation timestamp |
| **`score`** | Net score |
| **`upvotes`** | Upvote count, where reported separately |
| **`num_comments`** | Comment count |

```json
{
  "post_id": "t3_1uw2gep",
  "subreddit_id": "t5_2tk95",
  "title": "[OC] Every subway system in the world, to scale",
  "author": "transit_nerd",
  "subreddit": "dataisbeautiful",
  "created_at": "2026-07-14T09:12:44.000Z",
  "score": 41203,
  "num_comments": 887
}
```

### Questions

**Some of my IDs returned no rows. Which ones?**
Deleted, removed and private posts come back empty. The run log reports how many posts each request returned, so compare that against how many IDs you sent. The run does not fail over a missing post.

**Do I need the `t3_` prefix?**
No. `t3_1uw2gep` and `1uw2gep` both work, as does the full permalink. Mix all three in one `post_ids` list if you like.

**Is there a maximum number of IDs?**
Not one you set. The list is split into chunks automatically and every chunk is fetched. A very long list means more requests, which is the cost you would pay anyway -- just batched more efficiently.

**How do I get post IDs in the first place?**
From [Subreddit Posts](https://apify.com/toolzerhub/reddit-subreddit-posts-scraper), [User Posts](https://apify.com/toolzerhub/reddit-user-posts-scraper) or [Search](https://apify.com/toolzerhub/reddit-search-scraper) -- each returns `post_id` on every row. Feed that column straight into `post_ids`.

### Related Actors

| Actor | Purpose |
|---|---|
| [Reddit Post Comments Scraper](https://apify.com/toolzerhub/reddit-post-comments-scraper) | The discussion under these posts |
| [Reddit Subreddit Posts Scraper](https://apify.com/toolzerhub/reddit-subreddit-posts-scraper) | Discover post IDs from a subreddit |
| [Reddit Search Scraper](https://apify.com/toolzerhub/reddit-search-scraper) | Discover post IDs by keyword |

### Support

Questions, bugs, or feature requests: **contact@toolzerhub.com**

Browse the rest: [apify.com/toolzerhub](https://apify.com/toolzerhub)

# Actor input Schema

## `post_id` (type: `string`):

Reddit post ID (e.g. t3\_1uw2gep), or a full post permalink URL.

## `post_ids` (type: `string`):

Comma-separated list of Reddit post IDs to batch-fetch instead of a single post\_id. Runs use posts/batch for up to 5 IDs and posts/batch-large above that.

## Actor input object example

```json
{
  "post_id": "t3_1uw2gep",
  "post_ids": "t3_1uw2gep,t3_1uw2geq"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Every record collected during this run

# 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 = {
    "post_id": "t3_1uw2gep",
    "post_ids": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/reddit-post-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 = {
    "post_id": "t3_1uw2gep",
    "post_ids": "",
}

# Run the Actor and wait for it to finish
run = client.actor("toolzerhub/reddit-post-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 '{
  "post_id": "t3_1uw2gep",
  "post_ids": ""
}' |
apify call toolzerhub/reddit-post-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,toolzerhub/reddit-post-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/NawewY5gU8Czaxcld/builds/SP4moTQP1HoriZWkq/openapi.json
