# Wayback Machine Scraper: Archived Snapshots & Page History (`data_factory_nerd/wayback-machine-scraper`) Actor

Get every archived snapshot of any URL or whole domain from the Internet Archive's Wayback Machine: timestamps, status, MIME type, content-change flag and links. Optionally extract each old page's title and text. Filter by date, collapse to daily/monthly or changes only. $1 per 1,000.

- **URL**: https://apify.com/data_factory_nerd/wayback-machine-scraper.md
- **Developed by:** [Joe Pena](https://apify.com/data_factory_nerd) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 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?

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

### What is Wayback Machine Scraper?

**Wayback Machine Scraper** pulls archived snapshots of **any web page or entire website** from the Internet Archive's [Wayback Machine](https://web.archive.org) and returns them as clean JSON, CSV or Excel. For each capture you get the date, original URL, HTTP status, MIME type, content hash, a **"content changed" flag** and direct snapshot links. Turn on **Extract page title and text** and you also get the archived page's title and plain text, ready for AI, research or change tracking.

It uses the Wayback Machine's official CDX index API, so there's **no login, no API key, no proxies and no browser**.

### What can you do with Wayback Machine data?

- 📈 **Track how a page changed**: pricing pages, terms of service, landing pages, product pages (collapse to "Only when content changed")
- 🔍 **SEO and site migrations**: list every URL a domain ever had (`matchType: domain` + collapse `urlkey`) to find lost pages and build redirects
- 🕵️ **Competitive research**: see what a competitor's site said last year, month by month
- 🤖 **AI and research datasets**: extract historical page text at scale
- ⚖️ **Evidence and compliance**: timestamped proof of what a page showed and when

### What data does it return?

| Field | Example |
|---|---|
| `archivedAt` | 2026-11-13T08:33:32+00:00 |
| `url` | https://news.ycombinator.com/ |
| `statusCode` / `mimeType` | 200 / text/html |
| `contentChanged` | true |
| `snapshotUrl` | https://web.archive.org/web/20261113083332/https://news.ycombinator.com/ |
| `rawSnapshotUrl` | Original archived bytes without the Wayback toolbar |
| `digest` / `lengthBytes` | XNB5SYHZ... / 6528 |
| `pageTitle` / `text` | Archived page title and plain text (optional) |

Also included: `urlKey`, `timestamp`, `query`, `matchType`, `scrapedAt`.

### How to use Wayback Machine Scraper

1. Add one or more **URLs or domains** (e.g. `stripe.com/pricing`).
2. Pick a **Match type**: one exact page, everything under a path, a whole host, or a whole domain with subdomains.
3. Optionally set **From / To dates** and **Collapse snapshots** (one per day/month/year, only content changes, or one per unique URL).
4. Click **Start** and download the results from the **Output** tab.

#### Input example: monthly history of a pricing page with text

```json
{
  "urls": ["stripe.com/pricing"],
  "from": "2023",
  "collapse": "month",
  "includeText": true,
  "maxTextChars": 5000,
  "maxItems": 100
}
```

#### Input example: every archived HTML URL of a site

```json
{
  "urls": ["paulgraham.com"],
  "matchType": "host",
  "collapse": "urlkey",
  "mimeTypes": ["text/html"],
  "maxItems": 5000
}
```

#### Output example

```json
{
  "url": "https://news.ycombinator.com/",
  "timestamp": "20261113083332",
  "archivedAt": "2026-11-13T08:33:32+00:00",
  "snapshotUrl": "https://web.archive.org/web/20261113083332/https://news.ycombinator.com/",
  "rawSnapshotUrl": "https://web.archive.org/web/20261113083332id_/https://news.ycombinator.com/",
  "statusCode": 200,
  "mimeType": "text/html",
  "digest": "XNB5SYHZCZMFRLHILPKUJH6VW4WFVCUD",
  "lengthBytes": 6528,
  "contentChanged": true,
  "pageTitle": "Hacker News",
  "text": "Hacker News new | past | comments | ask | show | jobs ..."
}
```

`contentChanged` compares each capture with the previous capture of the same URL in the same run (`null` for the first one).

### Monitor mode: only new snapshots

Turn on **Only new snapshots since last run** and schedule the Actor (e.g. weekly). Each run returns only captures you haven't received before, so you get alerted when the Wayback Machine archives a new version of a page.

### How much does it cost?

**Pay per result: $1.00 per 1,000 snapshots** ($0.001 each). Page text extraction is included at the same price.

- 1,000 snapshots = $1
- A full 10-year monthly history of one page (~120 rows) = about $0.12
- Apify's free plan includes $5 of monthly usage, enough for about 5,000 snapshots.

Use **Max snapshots in total** to cap the cost of any run.

### API example

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("data_factory_nerd/wayback-machine-scraper").call(run_input={
    "urls": ["example.com/pricing"], "collapse": "digest", "includeText": True, "maxItems": 200,
})
for snap in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(snap["archivedAt"], snap["contentChanged"], snap.get("pageTitle"))
```

### FAQ

#### Is it legal to use Wayback Machine data?

The Actor reads the Internet Archive's public CDX index and public archived pages, the same way the web.archive.org site does. Archived content belongs to its original owners; use it in line with copyright and the laws that apply to you.

#### Why are some runs slow?

Whole-domain queries on very large sites can take the Internet Archive a while to answer. The Actor retries politely. Narrow the date range or use `prefix` on a path for faster results.

#### Why did a URL return 0 snapshots?

The Wayback Machine has no capture for it in that date range, or all captures were redirects/errors (turn off **Only successful captures** to see them). The `SUMMARY` record lists every input.

#### Found a bug or need a field?

Open an issue on the **Issues** tab. We reply quickly.

### Related Actors by data_factory_nerd

| Actor | What it does |
|---|---|
| [Workday Jobs Scraper](https://apify.com/data_factory_nerd/workday-jobs-scraper) | Every job from any myworkdayjobs.com careers site |
| [Multi-ATS Jobs Scraper](https://apify.com/data_factory_nerd/ats-jobs-scraper) | Greenhouse, Lever, Ashby, Workable, Recruitee and SmartRecruiters jobs |
| [SAM.gov Contract Opportunities](https://apify.com/data_factory_nerd/sam-gov-contract-opportunities) | Federal bids with NAICS, set-aside, deadline and contacts |

# Actor input Schema

## `urls` (type: `array`):

Pages or sites to look up, e.g. stripe.com/pricing, https://example.com/about or example.com (with match type 'domain').

## `matchType` (type: `string`):

'exact' = snapshots of that one page. 'prefix' / 'host' / 'domain' list archived URLs across a section or the whole site (combine with collapse 'urlkey' to get each unique URL once).

## `from` (type: `string`):

Earliest snapshot date: YYYY, YYYYMM or YYYYMMDD (e.g. 2020 or 20230115).

## `to` (type: `string`):

Latest snapshot date: YYYY, YYYYMM or YYYYMMDD.

## `collapse` (type: `string`):

Reduce duplicates. 'Only when content changed' skips consecutive captures with identical content.

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

Newest first is handy with Max snapshots to get the latest captures.

## `onlySuccessful` (type: `boolean`):

Skip redirects, 404s and errors that the Wayback Machine also records.

## `mimeTypes` (type: `array`):

Optional, e.g. text/html, application/pdf, image/jpeg. Empty = all types.

## `includeText` (type: `boolean`):

Download each archived page and add its title and plain text (great for AI, research and change tracking). Slower: one request per snapshot.

## `maxTextChars` (type: `integer`):

Truncate extracted text to this many characters. 0 = no limit.

## `maxItemsPerUrl` (type: `integer`):

0 = no limit.

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

Stop after this many results (controls cost). 0 = no limit.

## `onlyNew` (type: `boolean`):

Return only snapshots not returned by a previous run of this same search (state kept in key-value store data-factory-wayback-monitor in your account).

## `monitorKey` (type: `string`):

Optional name for this monitor's memory. By default it is derived from your input.

## `maxConcurrency` (type: `integer`):

The Internet Archive is a non-profit; keep this polite.

## Actor input object example

```json
{
  "urls": [
    "stripe.com/pricing"
  ],
  "matchType": "exact",
  "from": "2024",
  "collapse": "month",
  "sort": "oldest",
  "onlySuccessful": true,
  "includeText": false,
  "maxTextChars": 0,
  "maxItemsPerUrl": 0,
  "maxItems": 50,
  "onlyNew": false,
  "maxConcurrency": 4
}
```

# Actor output Schema

## `snapshots` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "urls": [
        "stripe.com/pricing"
    ],
    "from": "2024",
    "collapse": "month",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("data_factory_nerd/wayback-machine-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 = {
    "urls": ["stripe.com/pricing"],
    "from": "2024",
    "collapse": "month",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("data_factory_nerd/wayback-machine-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 '{
  "urls": [
    "stripe.com/pricing"
  ],
  "from": "2024",
  "collapse": "month",
  "maxItems": 50
}' |
apify call data_factory_nerd/wayback-machine-scraper --silent --output-dataset

```

## MCP server setup

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