# Reddit Archive Scraper — Full History | $5/1K (`datawell/reddit-archive-scraper`) Actor

Scrape Reddit posts and comments back to 2005, past the 100-per-request limit. Works where Reddit's own API returns 403 for datacentre traffic. Filter by subreddit, user and date range. No login. For market research and sentiment analysis.

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

## Pricing

$5.00 / 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.

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

Extract Reddit posts and comments — including the full history back to 2005.
No login, no API key, no OAuth dance.

***

### Why this scraper

**It works where Reddit's own API does not.** Reddit answers requests from
datacentre IP addresses with HTTP 403, which is exactly where a scraper runs.
This Actor reads a public archive instead, so runs do not fail on Reddit's
blocking.

**Past the 100-per-request limit.** The archive caps every request at 100
records. Ask for 10,000 posts and a naive scraper returns 100. This one walks a
moving time window and keeps going — verified duplicate-free.

**Historical data, not just what is on the front page today.** Search any date
range back to 2005: what a subreddit discussed during a launch, an outage or a
controversy, long after the thread scrolled away.

***

### What you can extract

| Mode | What you get |
|---|---|
| **Posts** | Every post from a subreddit or user, with title, text, score, upvote ratio, comment count and linked domain |
| **Comments** | Comments from a subreddit or user, with text, score and thread position |
| **Comments on specific posts** | The full comment set of a given thread |

***

### Quick start

1. Pick **Posts**.
2. Enter a subreddit — `programming` or `r/programming`, both work.
3. Set **Maximum results**, click **Start**, download as CSV or JSON.

***

### Example inputs

**Recent posts from a subreddit**

```json
{
  "mode": "posts",
  "subreddits": ["programming"],
  "maxItems": 5000
}
```

**What a subreddit discussed in a specific month**

```json
{
  "mode": "posts",
  "subreddits": ["technology"],
  "since": "2024-01-01",
  "until": "2024-02-01",
  "maxItems": 3000
}
```

**Track brand mentions across communities**

```json
{
  "mode": "comments",
  "subreddits": ["programming", "webdev", "javascript"],
  "maxItems": 5000
}
```

**A user's complete history**

```json
{
  "mode": "posts",
  "authors": ["spez"],
  "maxItems": 1000
}
```

**Every comment on one thread**

```json
{
  "mode": "postComments",
  "postIds": ["https://www.reddit.com/r/programming/comments/1vf6msi/"],
  "maxItems": 2000
}
```

***

### Output fields

#### Posts

| Field | Description |
|---|---|
| `title`, `text` | Headline and body |
| `url`, `linkUrl`, `domain` | Reddit link, external link and its domain |
| `subreddit`, `author` | Where and by whom |
| `score`, `upvoteRatio`, `numComments` | Reception — the ratio shows how contested a post was |
| `createdAt`, `createdAtTimestamp` | When, as ISO date and Unix timestamp |
| `flair` | Category tag the subreddit assigned |
| `isSelfPost`, `isVideo`, `isNsfw`, `isSpoiler`, `isStickied`, `isLocked` | Status flags |
| `awards`, `gilded`, `thumbnail` | Extras |

#### Comments

| Field | Description |
|---|---|
| `text` | Comment content, HTML entities decoded |
| `author`, `subreddit`, `score` | Who, where, how received |
| `postId`, `parentId` | Which post and which item it replies to |
| `isTopLevel` | Whether it replies to the post rather than another comment |
| `isSubmitter` | Whether the post's author wrote it |
| `createdAt`, `url` | When and where to find it |

***

### Input notes

- **Subreddits** accept `programming` or `r/programming`.
- **Usernames** accept `spez` or `u/spez`.
- **Post IDs** accept the ID or a full Reddit URL.
- **Several subreddits** split the `maxItems` budget evenly between them.
- **Dates** use `2026-01-31` format, or a Unix timestamp.

***

### Limits

- **Scores are archive snapshots**, not live counts — they reflect the moment the
  archive captured the item.
- **Deleted content** stays in the archive where it was captured before deletion,
  and is missing where it was not.
- **Rate limits apply.** The archive asks callers to slow down; large runs pace
  themselves and therefore take longer.
- **Search by keyword is not supported** by the archive — filter by subreddit,
  user and date, then search the exported text yourself.

***

### FAQ

**Do I need a Reddit account or API key?**
No.

**Why not use Reddit's own API?**
It returns HTTP 403 for requests from datacentres, which is where scrapers run.
This Actor sidesteps that entirely.

**How far back does the data go?**
To 2005, when Reddit launched.

**Can I get more than 100 items?**
Yes — that limit is exactly what this Actor is built to walk past.

**What formats can I export?**
CSV, Excel, JSON, XML, or straight from the Apify API.

***

### Source and responsible use

Data comes from the public [Arctic Shift](https://arctic-shift.photon-reddit.com/)
Reddit archive.

Usernames and comment text are personal data under GDPR. You remain responsible
for how you store, analyse and republish the output — and deleted content should
be treated as deleted, whatever the archive still holds.

# Actor input Schema

## `mode` (type: `string`):

Posts, comments, or all comments on specific posts. Each option below says which extra field it needs — fill that one in, the rest are ignored.

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

Subreddit names, with or without the r/ prefix — e.g. programming, r/technology.

## `authors` (type: `array`):

Reddit usernames to pull the full history of, with or without u/.

## `postIds` (type: `array`):

Post IDs, e.g. 1vg555b, or full Reddit links. Run the 'Posts' mode first to look one up — the 'id' column is what goes here.

## `since` (type: `string`):

Only items posted after this date. Format: 2026-01-31. The archive goes back to 2005.

## `until` (type: `string`):

Only items posted before this date. Format: 2026-01-31

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

Total number of records to collect. With several subreddits, the budget is split evenly between them.

## Actor input object example

```json
{
  "mode": "posts",
  "subreddits": [
    "programming"
  ],
  "authors": [
    "spez"
  ],
  "postIds": [
    "1vg555b"
  ],
  "since": "2024-06-01",
  "until": "2024-12-31",
  "maxItems": 200
}
```

# Actor output Schema

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

Posts with title, text, score, comment count and linked domain; comments with text, score and thread position.

## `resultsCsv` (type: `string`):

The same rows as a CSV download, ready for Excel or Google Sheets.

# 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": [
        "programming"
    ],
    "authors": [
        "spez"
    ],
    "postIds": [
        "1vg555b"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datawell/reddit-archive-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": ["programming"],
    "authors": ["spez"],
    "postIds": ["1vg555b"],
}

# Run the Actor and wait for it to finish
run = client.actor("datawell/reddit-archive-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": [
    "programming"
  ],
  "authors": [
    "spez"
  ],
  "postIds": [
    "1vg555b"
  ]
}' |
apify call datawell/reddit-archive-scraper --silent --output-dataset

```

## MCP server setup

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