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

Scrape specific Reddit post URLs for full post details, body text, images, videos, gallery, awards, metadata, and optional comments with nested replies.

- **URL**: https://apify.com/w3crawler/reddit-post-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 57.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 post details

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

Extract structured details from **specific public Reddit post URLs**. The Actor loads the rendered public page first and, when needed, tries a bounded set of same-post public JSON, RSS, embed, old-Reddit HTML, or short-link representations. Each saved row includes post identity, title, subreddit, author, score and comments when exposed, media metadata, a public status of `visible`, `removed`, `deleted`, or `unavailable`, and up to 20 bounded public comments with replies when requested. No login, private content, private API, or challenge bypass is used.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/reddit-post-scraper) and select **Try for free**, or open the **Input** tab.
2. Paste one to 20 public Reddit post URLs or `redd.it` short links into `postUrls`; subreddit, profile, and search URLs are not accepted.
3. Keep `includeComments` enabled if you need up to 20 public top-level comments and up to five replies per comment.
4. Start the Actor, open the dataset, and export the rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT`) to see stored, failed, and blocked counts.

### Input

`postUrls` is required. `includeComments` and `proxyConfiguration` are optional. Unsupported field names and out-of-range values are rejected before the browser starts.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `postUrls` | string array | Required | `["https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/"]` | One to 20 unique HTTPS Reddit post URLs or `redd.it` short links. HTML, JSON, RSS, embed, and comments representations are accepted. |
| `includeComments` | boolean | Optional | `true` | Include up to 20 public top-level comments and up to five nested replies per comment when available. |
| `proxyConfiguration` | object | Optional | Not supplied | Standard Apify Proxy or custom proxy settings. Direct browser access is used when omitted. |

Full default input (proxy settings are omitted when not supplied):

```json
{
  "postUrls": [
    "https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/"
  ],
  "includeComments": true
}
```

The Actor reads only the requested public post and its same-post representations. It does not crawl subreddits or profiles, follow external links, or submit votes or comments.

### Output

The dataset contains one row per public post that yielded a complete-enough record with post ID, title, permalink, subreddit, and source URL. Fields that the chosen representation does not expose are omitted, not guessed. Failed, blocked, or incomplete posts are counted in `OUTPUT` and logs and are never written as diagnostic rows.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string enum | Always | Row discriminator; always `post`. |
| `recordId` | string | Always | Stable identity derived from the Reddit post ID. |
| `position` | integer | Always | One-based position in the requested URL list. |
| `postId` | string | Always | Bare Reddit base36 post ID without the `t3_` prefix. |
| `postFullname` | string | Always | Post fullname in `t3_<postId>` form. |
| `postTitle` | string | Always | Public post title. |
| `contentUrl` | string | Always | Public content destination URL; equals the permalink for self posts. |
| `permalink` | string | Always | Public Reddit permalink. |
| `subreddit` | string | Always | Public subreddit name. |
| `postStatus` | string enum | Always | Publicly observable state: `visible`, `removed`, `deleted`, or `unavailable`. |
| `requestedPostUrl` | string | Always | Original requested post URL. |
| `sourcePostUrl` | string | Always | Public representation URL that yielded the row, such as a `.rss` or `.json` URL. |
| `includeComments` | boolean | Always | Whether comments were requested for the run. |
| `extractionMethod` | string | Always | Parser used, for example `reddit-shreddit-post-dom` or `reddit-public-rss`. |
| `sourceRepresentation` | string enum | Always | `html`, `json`, `rss`, `embed`, `old-html`, or `short`. |
| `sourceUrl` | string | Always | Public permalink provenance. |
| `scrapedAt` | string | Always | UTC extraction time. |
| `author` | string | When published | Public author name. |
| `numComments` | number | When published | Public comment count at collection time. |
| `createdAt` | string | When published | Public creation time normalized to ISO UTC. |
| `selfText` | string | When published | Public self-text body. RSS text may retain HTML entities and a `submitted by` footer. |
| `postType` | string | When published | Detected public post type, such as `link` or `self`. |
| `isVideo` | boolean | When published | Public video marker. |
| `isSelf` | boolean | When published | Public self-post marker. |
| `isGallery` | boolean | When published | Public gallery marker. |
| `comments` | object array | When `includeComments` is enabled and comments exist | Up to 20 public top-level comments, each with up to five replies. |
| `subredditId` | string | When published | Public subreddit identifier. Declared by the schema, but absent in the saved row. |
| `subredditType` | string | When published | Public subreddit type. Declared by the schema, but absent in the saved row. |
| `subredditSubscribers` | number | When published | Public subscriber count. Declared by the schema, but absent in the saved row. |
| `authorFullname` | string | When published | Public author identifier. Declared by the schema, but absent in the saved row. |
| `authorFlair` | string | When published | Public author flair. Declared by the schema, but absent in the saved row. |
| `authorPremium` | boolean | When published | Public premium marker. Declared by the schema, but absent in the saved row. |
| `score` | number | When published | Public post score. Declared by the schema, but absent in the saved row. |
| `upvoteRatio` | number | When published | Public upvote ratio. Declared by the schema, but absent in the saved row. |
| `editedAt` | string | When published | Public edit time. Declared by the schema, but absent in the saved row. |
| `isOC` | boolean | When published | Public original-content marker. Declared by the schema, but absent in the saved row. |
| `thumbnail` | string | When published | Public thumbnail URL. Declared by the schema, but absent in the saved row. |
| `flair` | string | When published | Public post flair. Declared by the schema, but absent in the saved row. |
| `domain` | string | When published | Public post domain. Declared by the schema, but absent in the saved row. |
| `nsfw` | boolean | When published | Public NSFW marker. Declared by the schema, but absent in the saved row. |
| `spoiler` | boolean | When published | Public spoiler marker. Declared by the schema, but absent in the saved row. |
| `awardsCount` | number | When published | Public award count. Declared by the schema, but absent in the saved row. |
| `awards` | object array | When published | Public award metadata. Declared by the schema, but absent in the saved row. |
| `previewImages` | object | When published | Public preview image metadata. Declared by the schema, but absent in the saved row. |
| `videoData` | object | When published | Public video metadata. Declared by the schema, but absent in the saved row. |
| `galleryImages` | object array | When published | Public gallery image metadata. Declared by the schema, but absent in the saved row. |
| `removalReason` | string | When published | Public removal reason. Declared by the schema, but absent in the saved row. |

Each `comments` entry may contain `id`, `author`, `body`, `score`, `createdAt`, `flair`, `distinguished`, `stickied`, `edited`, `postStatus`, and `replies`; empty values are omitted, and deleted comments can appear with a `[deleted]` body.

#### Full JSON output

This is a real saved row from the 2026-10-25 run, which used the post's public RSS representation. `selfText` is shortened with an ellipsis and `comments` is limited to the first two of 20 entries; the remaining fields are exact.

```json
{
  "recordId": "reddit-post:591077651ff550f2e614",
  "position": 1,
  "postId": "1t9jt9w",
  "postFullname": "t3_1t9jt9w",
  "postTitle": "BlueJS - Compile JavaScript to 1.2MB native binaries (no V8)",
  "contentUrl": "https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/",
  "permalink": "https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/",
  "subreddit": "javascript",
  "author": "DetailAdventurous315",
  "numComments": 20,
  "createdAt": "2026-05-10T21:40:49.000Z",
  "selfText": "UPDATE: The repository is now completely public. You can check out the source code here: https://github.com/bluejs-team/BlueJS/ The Problem: We’ve normalized shipping 150MB Electron apps and 50MB runtimes just to open a simple window or read a file. I got tired of the bloat, so I built BlueJS . BlueJS isn't a wrapper; it's an Ahead-Of-Time (AOT) compiler that translates a strict subset of JavaScri…",
  "postType": "link",
  "isVideo": false,
  "isSelf": false,
  "isGallery": false,
  "comments": [
    {
      "id": "t1_ol3ewvk",
      "author": "howesteve",
      "body": "Closed source? How can we know this is not a trojan horse?",
      "createdAt": "2026-05-11T00:44:11+00:00",
      "postStatus": "visible"
    },
    {
      "id": "t1_ol3fe8q",
      "author": "DetailAdventurous315",
      "body": "That is a completely valid concern, I would be skeptical of a random closed-source binary too. Its exactly why I set up the code space, you do not need to install anything on your local machine to try it. You can run it entirely in an isolated cloud environment and inspect the generated C++ code yourself to verify exactly what the compiler is doing under the hood.",
      "createdAt": "2026-05-11T00:47:00+00:00",
      "postStatus": "visible"
    }
  ],
  "postStatus": "visible",
  "requestedPostUrl": "https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/",
  "sourcePostUrl": "https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/.rss",
  "includeComments": true,
  "recordType": "post",
  "extractionMethod": "reddit-public-rss",
  "sourceRepresentation": "rss",
  "sourceUrl": "https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/",
  "scrapedAt": "2026-10-25T20:49:06.845Z"
}
```

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT`. It records request accounting and representation successes; failure details remain in the actor log.

| Field | Meaning |
| --- | --- |
| `actorName` | Actor name. |
| `actorSlug` | Actor slug. |
| `actorStoreUrl` | Public Actor Store URL. |
| `generatedBy` | Build generator label recorded by the Actor. |
| `fingerprintApplied` | Whether a browser fingerprint was applied; always `false`. |
| `recordType` | Summary record type; `runSummary`. |
| `status` | Actor outcome: `SUCCEEDED` or `FAILED`. |
| `runStatus` | Canonical run status; matches `status`. |
| `dataStatus` | `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. |
| `source` | Source base URL recorded for the run. |
| `requestedPosts` | Number of normalized post URLs requested. |
| `includeComments` | Whether public comments were requested. |
| `headless` | Declared by the key-value schema; the current success summary does not emit it. |
| `proxyConfigured` | Whether a proxy configuration was created. |
| `recordsStored` | Post rows written to the dataset. |
| `outputWriteFailureCount` | Failed summary-write attempts, normally `0`. |
| `failedRequests` | Post requests that failed after retries. |
| `blockedRequests` | Failed requests whose error indicated an access block. |
| `representationSuccesses` | Records saved through a successful public representation. |
| `requested` | Fail-closed diagnostic: post URLs requested. |
| `pushed` | Fail-closed diagnostic: rows stored. |
| `failed` | Fail-closed diagnostic: failed post requests. |
| `blocked` | Fail-closed diagnostic: blocked post requests. |
| `diagnosticCount` | Fail-closed diagnostic: failed plus blocked requests. |
| `found` | Whether at least one post was stored. |
| `dataAvailable` | Whether usable public post data was saved. |
| `scrapedAt` | Time the summary was written, in ISO UTC. |

The fail-closed variant of `OUTPUT` uses `requested`, `pushed`, `failed`, `blocked`, and `diagnosticCount` instead of `requestedPosts`, `includeComments`, `proxyConfigured`, `failedRequests`, `blockedRequests`, and `representationSuccesses`.

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | At least one post was saved and no request failed or was blocked. |
| `SUCCEEDED` | `PARTIAL` | At least one post was saved, but another request failed or was blocked. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | URLs were accepted but no post was stored, with no operational failure. |
| `FAILED` | `FAILED` | No post was saved and at least one request failed or was blocked. |

Example `OUTPUT` from the saved run:

```json
{
  "actorName": "Reddit Post Scraper",
  "actorSlug": "reddit-post-scraper",
  "actorStoreUrl": "https://apify.com/w3crawler/reddit-post-scraper",
  "generatedBy": "OpenAI Codex with GPT-5.6 Luna",
  "fingerprintApplied": false,
  "recordType": "runSummary",
  "status": "SUCCEEDED",
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "source": "https://www.reddit.com",
  "requestedPosts": 1,
  "includeComments": true,
  "proxyConfigured": false,
  "recordsStored": 1,
  "outputWriteFailureCount": 0,
  "failedRequests": 0,
  "blockedRequests": 0,
  "representationSuccesses": 1,
  "found": true,
  "dataAvailable": true,
  "scrapedAt": "2026-10-25T20:49:07.212Z"
}
```

### Coverage and limitations

The Actor works only from the exact post URLs you supply. It does not discover posts, crawl subreddits, follow outbound links, open user profiles, or archive future edits. It tries a limited set of public representations of the same post; if none yields post ID, title, permalink, subreddit, and source URL, the post is skipped and counted as failed. Removed or deleted posts can still produce a row with `postStatus` when the public representation exposes enough identity fields; `removalReason` appears only when the source publishes it.

Field availability varies by representation. The saved RSS row contained no `score`, `upvoteRatio`, `subredditId`, `subredditType`, subscriber count, author identifier, author flair, premium marker, awards, preview images, video data, gallery images, `editedAt`, `isOC`, `thumbnail`, `domain`, `nsfw`, `spoiler`, or `removalReason`; `sourceRepresentation` and `extractionMethod` tell you which parser produced a row. RSS `selfText` can include HTML entities and a `submitted by ... [link] [comments]` footer, and comment bodies are stored as the source returned them, including `[deleted]` placeholders.

Comments are bounded to 20 top-level entries and five replies per entry when `includeComments` is enabled; reply nesting stops at that depth and comment scores are often absent. Counts, scores, and comment content are point-in-time. Challenges, login walls, rate limits, and blocked requests fail closed and are recorded in the run summary and logs, not as fabricated dataset rows. Optional proxy settings are supported when supplied.

### Usage and support

Cost is driven by one headless-browser session, post-page visits, alternate representations, and optional proxy traffic. Pricing is pay-per-event with one Post Result event per saved post. Start with one URL, inspect the row and `OUTPUT`, then add URLs. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/reddit-post-scraper/issues) to report a problem. Include the run ID, the input used, and the `OUTPUT` summary; do not include tokens, cookies, or private data. This Actor is not affiliated with Reddit. Use it only for public data and in accordance with Reddit's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/reddit-post-scraper/changelog.md

# Actor input Schema

## `postUrls` (type: `array`):

One to 20 public HTTPS Reddit post URLs or redd.it short links. HTML, JSON, RSS, embed, and comments representations are accepted.

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

Include up to 20 public top-level comments and up to five nested replies per comment when available.

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

Optional Apify Proxy or custom proxy settings.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.reddit.com/r/javascript/comments/1t9jt9w/bluejs_compile_javascript_to_12mb_native_binaries/"
  ],
  "includeComments": true
}
```

# Actor output Schema

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

Source-backed result records from the default dataset.

## `runSummary` (type: `string`):

Requested post count, comment/browser settings, saved records, failures, and availability.

# 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("w3crawler/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 = {}

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

```

## MCP server setup

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