# Wayback Machine Scraper (Snapshots & Archived URLs) (`pagecraft/wayback-machine-snapshots`) Actor

Get Wayback Machine snapshots for any page, or every archived URL of a whole website: capture dates, status, type and direct archive links. Filters by date and status.

- **URL**: https://apify.com/pagecraft/wayback-machine-snapshots.md
- **Developed by:** [Pagecraft Tools](https://apify.com/pagecraft) (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.35 / 1,000 snapshot scrapeds

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 Snapshots and Archived URLs

Get **Wayback Machine** history for any page, or the list of **every archived URL** on a website. Each result has the capture date, HTTP status, content type, size and direct links to the archived copy.

### What it does

- **Page history**: every capture of one page over time, or one per day, month or year, or only when the content changed.
- **Site inventory**: every archived URL across a domain (with subdomains), a host or a path.
- Filters by date range, successful captures only (HTTP 200) and web pages only.
- Direct links to the archived page, plus a raw link without the Wayback toolbar for scraping.
- Pages through very large sites automatically.

### Who it's for

- **SEO teams** recovering lost pages, old URLs and redirects after a migration.
- **Researchers, journalists and legal teams** proving what a page said on a date.
- **Competitive intelligence**: how often a competitor changed pricing or messaging.
- **Domain buyers** checking a domain's history before buying.

### Input

| Field | What to enter |
| --- | --- |
| URLs or domains | `https://example.com/pricing` or `example.com`, one per line |
| What to get | Snapshots of the exact page, or archived URLs on the domain, host or path |
| Keep | Every capture, one per URL, day, month or year, or only content changes |
| From / to date | Optional |
| Only successful captures | HTTP 200 only (on by default) |
| Only web pages | Skip images, scripts and files |
| Maximum results per URL | Caps the run |

```json
{ "urls": ["https://example.com/pricing"], "mode": "page", "collapse": "content_changes", "dateFrom": "2022-01-01" }
```

### Output

```json
{
  "input": "https://example.com/pricing", "url": "https://example.com/pricing",
  "timestamp": "20240312093011", "capturedAt": "2024-03-12T09:30:11Z",
  "snapshotUrl": "https://web.archive.org/web/20240312093011/https://example.com/pricing",
  "rawUrl": "https://web.archive.org/web/20240312093011id_/https://example.com/pricing",
  "statusCode": 200, "mimeType": "text/html", "sizeBytes": 18234, "digest": "Q3K..."
}
```

### Pricing

| Event | When it is charged | Price per 1,000 (Free / Bronze / Silver / Gold plan) |
| --- | --- | --- |
| URL queried | Each request to the archive for a URL or domain (up to 5,000 captures each; most URLs need one), once per started 1.5 MB, including ones with no captures. | $2.50 on every plan |
| Snapshot scraped | Each capture or archived URL returned in the dataset. | $0.50 / $0.45 / $0.40 / $0.35 |

Example: the monthly history of 100 pages over 5 years (about 60 captures each) on the Free plan costs 100 × $0.0025 + 6,000 × $0.0005 = $3.25.

### Notes and limits

- Data comes from the Internet Archive's public index. It can be slow at busy times; the tool waits politely and reports any URL it could not query.
- The archive only has what it captured, so small or new sites may have few or no captures.
- This tool lists captures; it does not download the archived pages' content.

### Use with AI agents (MCP)

Connect this tool to Claude, Cursor, VS Code or any other MCP client through the [Apify MCP server](https://mcp.apify.com/). To load only this tool, use this server URL:

```
https://mcp.apify.com?tools=pagecraft/wayback-machine-snapshots
```

Then ask, for example: "Show me how this competitor's pricing page has changed over the last two years". The agent gets back each snapshot with its capture date, status and direct archive link. Each call is charged per event at the prices in Pricing above. Agents without an Apify account can also pay per run through [Apify's agentic payments](https://docs.apify.com/agents/payments).

# Actor input Schema

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

Pages (https://example.com/pricing) or domains (example.com), one per line.

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

Snapshots of one page over time, or the list of archived URLs on a site.

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

Thin out captures. Defaults to every capture for a page, and one per URL for a site.

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

Only captures on or after this date.

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

Only captures on or before this date.

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

Skip captures of redirects and error pages.

## `onlyHtml` (type: `boolean`):

Skip images, scripts, PDFs and other files.

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

Stop after this many captures or URLs for each input.

## `proxyConfiguration` (type: `object`):

Optional. Apify datacenter proxies or your own proxies. Residential proxies are not supported.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "mode": "page",
  "onlySuccessful": true,
  "onlyHtml": false,
  "maxSnapshotsPerUrl": 50
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pagecraft/wayback-machine-snapshots"
        }
    }
}
```

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/8ene176dxS8FusDBf/builds/StWDtlRqegcrhTT8p/openapi.json
