# Wayback Machine Snapshot Scraper (`dabooti/wayback-machine-scraper`) Actor

List every Internet Archive Wayback Machine capture of a URL, path prefix, host or whole domain: capture date, original URL, HTTP status, MIME type, size, content digest and ready-to-open snapshot links. Filter by date and status.

- **URL**: https://apify.com/dabooti/wayback-machine-scraper.md
- **Developed by:** [Danial Maqbool](https://apify.com/dabooti) (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.50 / 1,000 snapshots

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

## Wayback Machine Snapshot Scraper

List the Internet Archive **Wayback Machine** captures of a page, a path, a whole host or an entire domain with its subdomains. For each capture you get the capture date, the original URL, HTTP status, MIME type, size, content digest and ready-to-open snapshot links (with and without the Wayback toolbar). Filter by date range, status class and MIME type, and remove repeated identical captures.

It uses the Wayback Machine's public CDX API. No login, API key or proxy needed.

### What you can use it for

- **SEO and site migrations**: list every URL a site ever had, to find old pages, lost backlinks and redirect targets.
- **Recovering deleted content**: find the last good capture of a page that is gone.
- **Change history**: see how often a page changed (digest changes) and when.
- **Research and journalism**: document what a page said on a given date.
- **Finding files**: list archived PDFs or images of a domain with the MIME filter.

### What data you get

| Field | Description |
|---|---|
| `url` | Your input |
| `originalUrl` | The URL as it was captured |
| `timestamp`, `capturedAt` | Wayback timestamp (YYYYMMDDhhmmss) and ISO 8601 date |
| `snapshotUrl` | Archived page in the Wayback viewer |
| `rawSnapshotUrl` | Original archived content without the toolbar |
| `statusCode`, `mimeType` | HTTP status and content type at capture time |
| `digest`, `lengthBytes` | Content hash (same digest = same content) and compressed size |
| `urlKey`, `scrapedAt` | Canonical URL key and scrape time |

### How to use it

1. Add **URLs or domains**, for example `example.com` or `example.com/blog`.
2. Pick the **Match type**: exact URL, URL prefix, whole host, or domain with subdomains.
3. Optional: date range, **HTTP status**, **MIME type** and **Remove repeats**.
4. Click **Start** and export the results from the **Output** tab.

#### Example input

All unique archived HTML pages of a site captured since 2024:

```json
{
  "urls": ["example.com"],
  "matchType": "domain",
  "collapse": "url",
  "statusFilter": "2xx",
  "mimeFilter": "text/html",
  "dateFrom": "2024-01-01",
  "maxSnapshotsPerUrl": 5000
}
```

#### Example output

One record from a real run:

```json
{
  "url": "example.com",
  "originalUrl": "http://example.com:80/",
  "timestamp": "20020120142510",
  "capturedAt": "2002-01-20T14:25:10Z",
  "snapshotUrl": "https://web.archive.org/web/20020120142510/http://example.com:80/",
  "rawSnapshotUrl": "https://web.archive.org/web/20020120142510id_/http://example.com:80/",
  "statusCode": 200,
  "mimeType": "text/html",
  "digest": "HT2DYGA5UKZCPBSFVCV3JOBXGW2G5UUA",
  "lengthBytes": 1792,
  "urlKey": "com,example)/",
  "scrapedAt": "2026-11-12T17:59:47.915Z"
}
```

### Pricing

Pay per event: **$0.50 per 1,000 snapshots** saved, plus a tiny standard start fee and Apify platform usage (usually a fraction of a cent per run). Set **Max cost per run** to cap spending.

### Tips and limits

- Results come oldest first. Narrow with **Captured on or after** to get recent captures.
- **Remove repeats** defaults to skipping captures identical to the previous one, which keeps only real changes. Choose **Keep every capture** for the full list, or **One per unique URL** with a domain match for a list of pages.
- The CDX API can be slow or briefly unavailable under load. The Actor retries with back-off and pages 1,000 rows at a time; very large domains can take several minutes.
- Up to 10,000 snapshots per input per run. The `RUN_SUMMARY` record shows counts and errors per input.

### FAQ

**Does it download the archived pages?** No. It lists the captures with direct links. Open `rawSnapshotUrl` to fetch the original content.

**Why do I get fewer results than the Wayback calendar shows?** The default **Remove repeats** setting drops identical captures. Set it to **Keep every capture**.

### Legal note

This Actor reads public capture metadata from the Internet Archive's CDX API. Respect the Internet Archive's terms of use and the rights of the original site owners when you reuse archived content.

# Actor input Schema

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

Pages or sites to look up, for example example.com or apify.com/store.

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

Prefix, host and domain list every archived URL of the site, which is useful for finding old or deleted pages.

## `dateFrom` (type: `string`):

Optional date, YYYY-MM-DD.

## `dateTo` (type: `string`):

Optional date, YYYY-MM-DD.

## `statusFilter` (type: `string`):

Keep only captures with this status class.

## `mimeFilter` (type: `string`):

Optional exact MIME type or regex, for example text/html or application/pdf.

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

"One per unique URL" with a domain match lists each archived page once.

## `maxSnapshotsPerUrl` (type: `integer`):

Upper limit of saved captures per input.

## Actor input object example

```json
{
  "urls": [
    "example.com"
  ],
  "matchType": "exact",
  "statusFilter": "any",
  "collapse": "digest",
  "maxSnapshotsPerUrl": 50
}
```

# Actor output Schema

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

No description

## `resultsFull` (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": [
        "example.com"
    ],
    "maxSnapshotsPerUrl": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("dabooti/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": ["example.com"],
    "maxSnapshotsPerUrl": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("dabooti/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": [
    "example.com"
  ],
  "maxSnapshotsPerUrl": 50
}' |
apify call dabooti/wayback-machine-scraper --silent --output-dataset

```

## MCP server setup

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