# Wayback Machine Scraper — Snapshots, First Capture & Old URLs (`northbell/wayback-machine-scraper`) Actor

Search the Internet Archive Wayback Machine for any URL or domain: first and last capture and domain age, the list of snapshots (one per day, month or year, or only when the page changed), and every archived URL under a domain for SEO and lost-page recovery. Official API, no login.

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

## Pricing

from $0.40 / 1,000 snapshot or urls

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 Scraper — Snapshots, First Capture & Old URLs

Look up any website in the **Internet Archive's Wayback Machine** and get clean rows instead of clicking through the calendar. Three modes:

- **Summary** — for each URL or domain: **first capture, last capture, domain age**, and links to both archived pages. Optionally, which years and months it was captured.
- **Snapshots** — the list of captures, **one per day, month or year**, or **only when the page content changed**, with a direct link to each archived copy.
- **URLs** — **every page ever archived under a domain or path**, with its first capture. Find old pages, lost content, past URL structures and redirect targets.

Schedule it with *Only new since the last run* to get just the new captures or newly archived pages.

### What you get

| Mode | Fields |
|---|---|
| Summary | `url`, `archived`, `firstCapture`, `firstCaptureUrl`, `lastCapture`, `lastCaptureUrl`, `ageYears` (+ `yearsWithCaptures`, `monthsWithCaptures`, `monthsWithCapturesByYear` with *add years and months*) |
| Snapshots | `url`, `capturedAt`, `timestamp`, `original`, `statusCode`, `mimeType`, `length`, `digest`, `waybackUrl`, `isNewSinceLastRun` |
| URLs | `domain`, `original`, `firstCapture`, `statusCode`, `mimeType`, `waybackUrl`, `isNewSinceLastRun` |

### Use it for

- **SEO and site migrations** — every URL a domain ever had, to map redirects and recover lost pages
- **Expired-domain and due-diligence checks** — how old a site really is and when it was last alive
- **Competitor history** — how a pricing or landing page changed, one capture per month or only when it changed
- **Research and evidence** — direct links to archived copies for a list of pages

### Input

```json
{ "urls": ["example.com/pricing"], "mode": "snapshots", "collapse": "content", "from": "2020" }
```

Data comes from the Wayback Machine's official CDX API — no login, no API key. The archive is a non-profit service and is sometimes slow or briefly offline (on October 7, 2026 it answered some requests with "Temporarily Offline"); the Actor waits and retries, and anything it still cannot read becomes a free error row. Measured that day: summaries of 2 domains in 99 seconds, and 435 content-change snapshots of one domain since 2024 in 45 seconds. *Add years and months* reads every capture and adds up to a minute for big sites.

### Pricing

**$0.50 per 1,000 snapshots or URLs**, **$2 per 1,000 summaries** (each summary needs two or three archive lookups), plus $0.01 per run. Error rows are free. The $0.01 run-start fee is the one charge every run pays, even one that returns nothing.

### For AI agents

`{"urls": ["example.com"]}` returns when the site was first and last archived. Rows have `type`: `summary`, `snapshot`, `url` or `error`.

# Actor input Schema

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

Pages ("example.com/pricing") or whole domains ("example.com"). Wayback links (web.archive.org/web/…) are turned back into the original URL.

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

Summary: one row per URL with its first and last capture. Snapshots: one row per capture. URLs: every archived page under a domain or path.

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

For snapshots: keep one capture per day, month or year, or one per content change. "Every capture" keeps all of them.

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

A year or date, e.g. "2018" or "2018-06-01".

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

A year or date, e.g. "2022" or "2022-12-31".

## `onlyOk` (type: `boolean`):

Skip captures where the page answered with an error or a redirect.

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

Leave out images, scripts and files — useful in URLs mode.

## `includeSubdomains` (type: `boolean`):

For the URLs mode: also list pages on subdomains (blog.example.com when you enter example.com).

## `includeHistory` (type: `boolean`):

Reads every capture of the URL — can take a minute for big sites.

## `maxRowsPerUrl` (type: `integer`):

Caps what you pay for. Default 1,000 snapshots or 5,000 URLs.

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

Snapshots: only captures made after the last one returned. URLs: only pages not returned before.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "mode": "snapshots",
  "collapse": "month",
  "onlyOk": true,
  "onlyHtml": false,
  "includeSubdomains": false,
  "includeHistory": false,
  "maxRowsPerUrl": 200,
  "onlyNew": false
}
```

# Actor output Schema

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

First and last capture per URL.

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

Captures with links to the archived page.

## `urls` (type: `string`):

Archived pages under a domain.

# 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"
    ],
    "mode": "snapshots",
    "collapse": "month",
    "maxRowsPerUrl": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("northbell/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": ["apify.com"],
    "mode": "snapshots",
    "collapse": "month",
    "maxRowsPerUrl": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("northbell/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": [
    "apify.com"
  ],
  "mode": "snapshots",
  "collapse": "month",
  "maxRowsPerUrl": 200
}' |
apify call northbell/wayback-machine-scraper --silent --output-dataset

```

## MCP server setup

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