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

Resolve Reddit post URLs into clean metadata — title, author, score, media links, and optional duplicate posts. Built for enrichment queues. $0.50 per 1,000 posts.

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

## Pricing

from $0.50 / 1,000 posts

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?

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 Post Details & Duplicate Links

### Overview

The **Reddit Post Scraper** fetches structured metadata for one or more Reddit posts from their full URLs. Use it when you already know the post links and need title, author, subreddit, score, comment count, permalink, and body/selftext in clean JSON.

Built for content researchers, brand analysts, journalists, and data engineers who track specific threads. Optionally resolve **duplicate posts** for each URL so you can map crossposts and reposts across communities.

Returns **clean, structured JSON** per post (and per duplicate when enabled), ready for analytics warehouses, monitoring dashboards, or enrichment pipelines.

### Features

- Scrape multiple Reddit post URLs in one run
- Accepts full `https://www.reddit.com/r/.../comments/...` URLs and `/r/...` paths
- Structured fields: id, title, author, subreddit, score, comment count, timestamps, URLs, body excerpt
- Optional duplicate-post discovery (`includeDuplicates`)
- Concurrent fetching for batch URL lists
- Type-tagged rows (`post` / `duplicate` / `error`) for easy filtering
- Reliable JSON output without browser automation

### Use Cases

- **Brand monitoring** — Track specific complaint or praise threads
- **Content research** — Archive source posts before they edit or delete
- **Competitor analysis** — Follow competitor announcements and AMAs
- **Market research** — Capture product launch discussion posts
- **Data analytics** — Feed known URLs into scoring / NLP pipelines
- **AI training datasets** — Build labeled corpora from curated threads
- **Academic research** — Collect canonical post records for studies

### Input

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `postUrls` | array of strings | **Yes** | — | Full Reddit post URLs (one per line). |
| `includeDuplicates` | boolean | No | `false` | When `true`, also fetch duplicate/crosspost listings for each URL. |

**How parameters affect the run:** `postUrls` defines the fetch queue. Enabling `includeDuplicates` adds an extra API call per post and emits additional rows with `type: "duplicate"`.

#### Example input

```json
{
  "postUrls": [
    "https://www.reddit.com/r/technology/comments/1abc234/openai_releases_new_model/"
  ],
  "includeDuplicates": true
}
```

### Output

Dataset rows are flat objects. Common listing fields come from the shared post summary mapper:

| Field | Type | Description |
|---|---|---|
| `type` | string | `"post"`, `"duplicate"`, or `"error"` |
| `sourceUrl` | string | Original input URL |
| `id` | string | null | Reddit thing ID |
| `name` | string | null | Fullname (e.g. `t3_...`) |
| `kind` | string | null | Reddit kind (`t3` for posts) |
| `title` | string | null | Post title |
| `author` | string | null | Author username |
| `subreddit` | string | null | Subreddit name |
| `score` | number | null | Score / upvotes |
| `numComments` | number | null | Comment count |
| `createdUtc` | number | string | null | Creation time (Unix or API value) |
| `permalink` | string | null | Relative or absolute permalink |
| `url` | string | null | Linked URL or post URL |
| `body` | string | null | Selftext / body (may be truncated) |

Error rows include `error` with a human-readable message. Duplicate rows reuse the same summary fields for each matching duplicate post.

### Example Output

```json
[
  {
    "type": "post",
    "sourceUrl": "https://www.reddit.com/r/technology/comments/1abc234/openai_releases_new_model/",
    "id": "1abc234",
    "name": "t3_1abc234",
    "kind": "t3",
    "title": "OpenAI releases new model with major reasoning upgrades",
    "author": "techreporter42",
    "subreddit": "technology",
    "score": 18420,
    "numComments": 2143,
    "createdUtc": 1718208000,
    "permalink": "https://www.reddit.com/r/technology/comments/1abc234/openai_releases_new_model/",
    "url": "https://www.theverge.com/openai-new-model",
    "body": null
  },
  {
    "type": "duplicate",
    "sourceUrl": "https://www.reddit.com/r/technology/comments/1abc234/openai_releases_new_model/",
    "id": "1def567",
    "title": "OpenAI's latest model is here",
    "author": "crossposter99",
    "subreddit": "MachineLearning",
    "score": 3201,
    "numComments": 412,
    "createdUtc": 1718211600,
    "permalink": "https://www.reddit.com/r/MachineLearning/comments/1def567/openais_latest_model_is_here/",
    "url": "https://www.theverge.com/openai-new-model",
    "body": null
  }
]
```

### Related Scrapers

- **Reddit Comment Tree Scraper** — Full comment threads for the same post URLs
- **Reddit Search Scraper** — Discover posts by keyword before scraping details
- **Reddit Subreddit Posts Scraper** — Bulk posts from a community feed
- **Reddit Popular Posts Scraper** — Trending posts across Reddit

# Actor input Schema

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

Full Reddit post URLs.

## `includeDuplicates` (type: `boolean`):

Also fetch duplicate posts for each URL.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.reddit.com/r/oddlysatisfying/comments/1tg4gv5/a_turtle_giving_itself_a_scrub/"
  ],
  "includeDuplicates": false
}
```

# Actor output Schema

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

Default dataset items produced by this Actor.

# 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 = {
    "postUrls": [
        "https://www.reddit.com/r/oddlysatisfying/comments/1tg4gv5/a_turtle_giving_itself_a_scrub/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingdino/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 = { "postUrls": ["https://www.reddit.com/r/oddlysatisfying/comments/1tg4gv5/a_turtle_giving_itself_a_scrub/"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingdino/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 '{
  "postUrls": [
    "https://www.reddit.com/r/oddlysatisfying/comments/1tg4gv5/a_turtle_giving_itself_a_scrub/"
  ]
}' |
apify call scrapingdino/reddit-post-scraper --silent --output-dataset

```

## MCP server setup

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