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

List the snapshots the Internet Archive holds for a URL, domain or path prefix. One row per capture with timestamp, direct archive link, HTTP status, MIME type and size. Export JSON or CSV.

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

## Pricing

from $1.49 / 1,000 snapshots

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

## Wayback Machine Snapshot Scraper

List the **snapshots the Internet Archive holds for a page or a whole domain**. One row per capture, with the capture date, a direct link to the archived copy, HTTP status, MIME type and size.

No API key and no login. It reads the public Wayback CDX index that archive.org publishes.

### What can this Wayback scraper do?

- Look up a single URL, a path prefix, or an entire domain.
- Narrow by year or exact date with `from` and `to`.
- Drop repeated captures of identical content, or keep every capture.
- Keep only one HTTP status, or everything including redirects and errors.
- Follow any number of targets in one run.
- Export JSON, CSV or Excel, and schedule a repeat through Apify.

### What data can you extract?

| Field | Meaning |
| --- | --- |
| originalUrl | URL as it was captured |
| timestamp | 14 digit CDX timestamp |
| capturedAt | Same instant as an ISO date |
| waybackUrl | Playback link to the archived copy |
| mimetype | Content type recorded by the Archive |
| statusCode | HTTP status of the capture, for example 200 or 301 |
| digest | Content digest, useful for spotting unchanged pages |
| lengthBytes | Size of the archived response |
| sourceUrl | CDX request that produced this row |
| scrapedAt | When this row was collected |

### How to use it

1. Put targets in **URLs or domains**. The default input is `stripe.com/pricing`, a page the Internet Archive captures daily; a domain the archive has never crawled returns zero rows.
2. Pick a **Match type**: prefix covers the target and everything under it, exact is that one URL, domain covers every host under the domain.
3. Optionally set **From year or date**, **To year or date**, **Only this HTTP status**.
4. Set **Maximum captures per target** and **Maximum rows for the run** so a first run stays small.
5. Run it and download the dataset. Per target counts, oldest and newest capture land in `SUMMARY`.

### Notes

- `collapse` defaults to `digest`, which returns one capture per distinct content version. Switch it to `none` to get every capture, including identical re-captures.
- A target that was never archived returns no rows and is listed in `SUMMARY` with a snapshot count of zero. The Archive answers those lookups with an empty list rather than an error.
- The CDX index is a search index, not the archived page content. This Actor lists captures; it does not download the page bodies.

# Actor input Schema

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

Targets to look up, for example stripe.com/pricing, https://example.com/pricing, or example.com/blog/\*. Pick a site that is actively archived: a domain the Internet Archive has never crawled returns zero rows.

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

Optional. A year such as 2020, or a full date such as 20200131.

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

Optional. A year such as 2026, or a full date such as 20261118.

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

prefix covers the target and everything under it. exact is that single URL. domain covers every host under the domain.

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

digest keeps one capture per content version, which removes identical re-captures. none keeps every capture.

## `statusCode` (type: `string`):

Optional, for example 200. Leave empty for every status, including redirects and errors.

## `limitPerUrl` (type: `integer`):

Captures kept for each URL or domain.

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

Hard cap on dataset rows across all targets.

## Actor input object example

```json
{
  "urls": [
    "stripe.com/pricing"
  ],
  "matchType": "prefix",
  "collapse": "digest",
  "limitPerUrl": 100,
  "maxItems": 500
}
```

# Actor output Schema

## `overview` (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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/wayback-machine-snapshot-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"] }

# Run the Actor and wait for it to finish
run = client.actor("rainminer/wayback-machine-snapshot-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"
  ]
}' |
apify call rainminer/wayback-machine-snapshot-scraper --silent --output-dataset

```

## MCP server setup

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