# Wayback Machine Scraper: snapshot history and page text (`bepolabs/wayback-snapshots`) Actor

Audit sites, recover lost material and build evidence trails for lawyers, SEOs and journalists, or feed AI agents with archive copies that no longer exist online.

- **URL**: https://apify.com/bepolabs/wayback-snapshots.md
- **Developed by:** [BEPO Labs](https://apify.com/bepolabs) (community)
- **Categories:** SEO tools, Developer tools, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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?

Rewind the web: this Actor turns the Internet Archive's Wayback Machine into a tidy table. Name a single address, a folder or a whole host and receive each stored snapshot with timestamp, status, mime type, size and direct link, plus the earliest and latest sighting. Thin the results to one per hour or week, or to real edits only, and fetch readable body copy for analysis.

- **SEO and due diligence**: see how long a domain has existed and what it showed before you buy it or link to it
- **Competitor history**: track how a pricing screen, homepage or terms document changed over the years
- **Legal and compliance evidence**: find dated archive links of what a page said at a given time
- **Research and journalism**: collect old versions of news sites and pages as text
- **Content recovery and AI**: pull the text of pages that no longer exist for RAG, summaries or migration

![Wayback Machine Scraper: The archive history of any URL or domain: first and last seen, every capture, and the page text of old versions.](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wayback-snapshots-hero.png)

#### ✨ Why use this Actor?

- ✅ **Earliest and latest sighting, always true**: even when the list is cut, the newest comes from an extra query
- ✅ **Collapse the noise**: one capture per hour, day, month or year, or only the captures whose content changed
- ✅ **Pages, paths or whole domains**: an exact address, everything under a folder, a host, or a domain with its subdomains
- ✅ **Old page text on request**: readable body copy of the first, last or every capture, without the Wayback banner
- ✅ **Gentle on the Archive**: one request a second for the whole run, retries with backoff
- ✅ **Fair pricing**: URLs without captures and failed inputs cost nothing

### 📦 What data can you get with Wayback Machine Scraper?

| | | |
|---|---|---|
| 🔗 Archived URL | 📅 Capture date and time | 🚦 HTTP status code |
| 📄 MIME type | 📏 Size in bytes | 🧬 Content digest |
| 🗄️ Direct archive link | 🐣 First seen | 🕓 Last seen |
| 🔢 Number of captures | 📝 Page text (optional) | 🎯 Your input |

### 🚀 How to use Wayback Machine Scraper

Wayback Machine Scraper works in a few clicks, no coding needed:

1. [Create a free Apify account](https://console.apify.com/sign-up) (the free plan includes 5 USD of monthly credit).
2. Open [Wayback Machine Scraper](https://apify.com/bepolabs/wayback-snapshots) and click **Try for free**.
3. Paste URLs or domains, pick how to match and collapse captures, and set a date range if you like. Switch on page text if you need the old content.
4. Click **Start** and wait for the run to finish (most runs take seconds).
5. Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

![How Wayback Machine Scraper works](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wayback-snapshots-workflow.png)

### ⬇️ Input

Add pages or domains, up to 200 per run. Everything else is optional; by default you get every successful capture of the exact URL.

##### Exact URL, path, host or domain?

`matchType` `exact` reads only this address, `prefix` everything under the path, `host` every page of one machine, and `domain` that machine with all its subdomains.

##### One capture per year, or per change

`collapse` keeps the first capture of each `hour`, `day`, `month` or `year`, or with `change` only captures whose content differs from the one before.

##### Page text

Set `pageText` to `first`, `last` or `all` to add the readable text of those captures (charged per page). `maxTextChars` caps the length.

| Field | Type | What it does | Default |
|---|---|---|---|
| **URLs or domains** (`urls`) | array | Pages (https://example.com/pricing) or domains (example.com). | `["example.com"]` |
| **Match** (`matchType`) | string | exact: only this URL; prefix: every URL under this path; host: every page of this host; domain: the host and all its subdomains. | `"exact"` |
| **One capture per** (`collapse`) | string | none: every capture; hour, day, month or year: the first of each; change: only captures whose content changed. | `"none"` |
| **From** (`from`) | string | Year or date, e.g. |  |
| **To** (`to`) | string | Year or date, e.g. |  |
| **Only successful captures** (`onlyOk`) | boolean | Keep only captures the site answered with HTTP 200 (no redirects, errors). | `true` |
| **Maximum captures per URL** (`maxCaptures`) | integer | Oldest first. | `100` |
| **Page text** (`pageText`) | string | Extract the readable text of the archived page: none, the first capture, the last capture, or all captures (charged per page). | `"none"` |
| **Maximum text characters** (`maxTextChars`) | integer | Longer page texts are cut and end with an ellipsis. | `20000` |
| **Maximum retries** (`maxRetries`) | integer | Retries per request with exponential backoff on network errors, 429 and 5xx. | `3` |

![Wayback Machine Scraper input form](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wayback-snapshots-input.png)

#### Input example

```json
{
    "urls": [
        "example.com"
    ],
    "collapse": "year"
}
```

### ⬆️ Output

Every capture becomes one row, oldest first, carrying the earliest and latest sighting plus total count of its address. The run summary in the key-value store (`OUTPUT`) lists every input with its tally, both extremes, and any note or error.

![Wayback Machine Scraper output table](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/wayback-snapshots-output.png)

#### Output example

One row of the dataset (example.com, one capture per year):

```json
{
    "input": "example.com",
    "capturedAt": "2002-01-20T14:25:10Z",
    "statusCode": 200,
    "firstSeen": "2002-01-20T14:25:10Z",
    "lastSeen": "2026-01-01T00:09:36Z",
    "captures": 24,
    "mimeType": "text/html",
    "url": "http://example.com:80/",
    "timestamp": "20020120142510",
    "digest": "HT2DYGA5UKZCPBSFVCV3JOBXGW2G5UUA",
    "length": 1792,
    "archiveUrl": "https://web.archive.org/web/20020120142510/http://example.com:80/",
    "truncated": false
}
```

#### Row with page text

With `pageText: "first"` the first capture also carries the page's readable text (python.org in January 2010, shortened):

```json
{
    "input": "https://www.python.org/",
    "url": "http://www.python.org:80/",
    "capturedAt": "2010-01-02T21:51:15Z",
    "statusCode": 200,
    "archiveUrl": "https://web.archive.org/web/20100102215115/http://www.python.org:80/",
    "firstSeen": "2010-01-02T21:51:15Z",
    "lastSeen": "2012-12-28T09:37:46Z",
    "text": "Python Programming Language -- Official Website\nAdvanced Search\nAbout\nNews\nDocumentation\nDownload\nCommunity\nFoundation\nCore Development\nLinks\nHelp\nQuick Links (2.6.4)\nDocumentation\nWindows Installer\nSource Distribution\nPackage Index\nQuick Links (3.1.1)\nDocumentation\nWindows Installer\nSource Distribu...",
    "textError": null
}
```

#### ⚠️ URLs without captures and failed inputs

A URL the Wayback Machine never archived gives no row and costs nothing; `OUTPUT` notes it (`no captures in the Wayback Machine for this filter`). An input that breaks after all retries, for example while the Wayback Machine is offline, is named in the log and `OUTPUT` with the reason and is not charged. The run fails only when no input answered.

| Case | What you see |
|---|---|
| No captures | A note in `OUTPUT`, no row, no charge |
| `HTTP 503` | The Wayback Machine is temporarily offline; try again later |
| `not a text page` | Page text was asked for a capture that is not HTML or text (`textError`) |

View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS, all fields or only those you pick.

### 💰 How much does Wayback Machine Scraper cost?

Wayback Machine Scraper is priced **per event**: **1 USD per 1,000 captures** (0.001 USD each), with no monthly rental. Addresses without hits and failed inputs cost nothing; body copy is billed only for pages where extraction worked.

| You get | You pay |
|---|---|
| 100 captures | 0.1 USD |
| 1,000 captures | 1 USD |
| 10,000 captures | 10 USD |
| 100,000 captures | 100 USD |

Optional extras are charged only when you switch them on:

- **Page text**: 3 USD per 1,000

💡 Apify's free plan gives you 5 USD of credit every month, enough for about **5,000 captures** at no cost. Set a spending limit per run and the Actor stops there.

### ⚖️ Wayback Machine Scraper vs. the alternatives

| | Wayback Machine Scraper | Browsing the Wayback Machine | Typical archive scrapers |
|---|---|---|---|
| **Every capture as a table with archive links** | ✅ | calendar view only | ✅ |
| **First and last seen per URL** | ✅ | by hand | often missing |
| **One per year, month, day or per change** | ✅ | ❌ | varies |
| **Readable text of old versions** | ✅ optional | read page by page | often raw HTML |
| **Export, schedule, API and MCP** | ✅ | ❌ | ✅ |

### 🔌 Integrations, API and MCP

#### Connect Wayback Machine Scraper to your AI agent (MCP)

Give Claude, ChatGPT, Cursor or any MCP client direct access to Wayback Machine Scraper through the [Apify MCP server](https://mcp.apify.com). Add this URL to its settings:

```text
https://mcp.apify.com/?actors=bepolabs/wayback-snapshots
```

For Claude Desktop, add it under `mcpServers` in `claude_desktop_config.json`:

```json
{
    "mcpServers": {
        "wayback-snapshots": {
            "command": "npx",
            "args": [
                "-y",
                "@apify/actors-mcp-server",
                "--actors",
                "bepolabs/wayback-snapshots"
            ],
            "env": {
                "APIFY_TOKEN": "<your Apify API token>"
            }
        }
    }
}
```

Then ask: *"When did apify.com/store first appear, and how has the wording changed between its earliest and newest capture?"*

#### Run it from your code

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bepolabs/wayback-snapshots").call(run_input={"urls":["example.com"],"collapse":"year"})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

JavaScript (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('bepolabs/wayback-snapshots').call({"urls":["example.com"],"collapse":"year"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### No-code integrations

Send results to **Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n** and more from the Integrations tab, start runs on a **schedule**, or trigger your own endpoint with a **webhook** when a run finishes. The [Apify API](https://docs.apify.com/api/v2) gives you full control over runs and datasets.

### ❓ FAQ

##### Why does the newest sighting come after my final row?

Rows are the oldest captures up to `maxCaptures`. The newest sighting comes from an extra query, so it is always true for your filter.

##### Why does a capture show another URL than mine?

The Archive stores the URL as it was crawled: with or without `www`, `http` or `https`, a port or a trailing `?`. All of them are your page.

##### How do I see only real changes?

Use `collapse: "change"`: only captures whose content digest differs from the previous one are kept.

##### Can I get screenshots of old versions?

Not in this Actor; it returns archive links and text. Open the `archiveUrl` or pass it to a screenshot Actor.

##### How many captures can I get?

Up to 10,000 per URL (`maxCaptures`, default 100), up to 200 URLs per run.

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

The Actor uses the documented CDX API of the Archive, at no more than one request a second, and reads stored copies it serves openly. The Archive grants access for scholarship and research; please use the data accordingly. Archived pages belong to their sites' owners: you are responsible for any reuse of their text. Not affiliated with or endorsed by the Internet Archive.

##### What if something is missing or does not work?

Open an issue on the **Issues** tab; we read each one and reply. Feature requests are welcome too.

### 💬 Your feedback

Tell us what Wayback Machine Scraper should add on the **Issues** tab or leave a review; your notes decide what we work on next.

### 🔗 Related Actors

| Actor | What it does |
|---|---|
| 🔗 [Broken Link Checker](https://apify.com/bepolabs/link-checker) | Every link and image on your pages checked: HTTP status, each redirect hop, final URL and response time. |
| 🩺 [SEO Audit](https://apify.com/bepolabs/seo-audit) | Any page to a 0 to 100 SEO score and grade, with the fixes that matter most first: on-page, links and Core Web Vitals. |
| 🗺️ [Sitemap URL Extractor](https://apify.com/bepolabs/sitemap-urls) | Every URL of a website from its sitemaps, in one deduplicated list with lastmod, changefreq and priority. |
| 📝 [Website to Markdown](https://apify.com/bepolabs/web-to-markdown) | Any web page or docs site to clean Markdown for LLMs, RAG and AI agents, with headings, links and ready-made chunks. |
| ⚡ [Bulk PageSpeed Insights](https://apify.com/bepolabs/pagespeed) | Lighthouse scores, lab metrics and real-user Core Web Vitals for any list of URLs, on mobile, desktop or both. |
| 📸 [Website Screenshot](https://apify.com/bepolabs/website-screenshot) | Full-page PNG, JPEG or PDF of any URL, on desktop, tablet and phone, with cookie banners closed. |
| 🌐 [Domain RDAP and DNS](https://apify.com/bepolabs/domain-rdap) | Domains to registrar, creation and expiry dates, age, status, nameservers, DNSSEC and DNS records from official RDAP, in bulk. |
| 📈 [Google Trends Scraper](https://apify.com/bepolabs/google-trends) | Interest over time for up to five keywords on one 0 to 100 scale, any country or worldwide, plus top and rising related queries. |

# Changelog

This Actor's version history is a separate document: https://apify.com/bepolabs/wayback-snapshots/changelog.md

# Actor input Schema

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

Pages (https://example.com/pricing) or domains (example.com). Up to 200.

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

exact: only this URL; prefix: every URL under this path; host: every page of this host; domain: the host and all its subdomains.

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

none: every capture; hour, day, month or year: the first of each; change: only captures whose content changed.

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

Year or date, e.g. 2015 or 2020-06-01. Default: the first capture.

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

Year or date, e.g. 2024-12-31. Default: today.

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

Keep only captures the site answered with HTTP 200 (no redirects, errors).

## `maxCaptures` (type: `integer`):

Oldest first. When the list is cut, last seen still comes from the newest capture.

## `pageText` (type: `string`):

Extract the readable text of the archived page: none, the first capture, the last capture, or all captures (charged per page).

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

Longer page texts are cut and end with an ellipsis.

## `maxRetries` (type: `integer`):

Retries per request with exponential backoff on network errors, 429 and 5xx.

## Actor input object example

```json
{
  "urls": [
    "example.com"
  ],
  "matchType": "exact",
  "collapse": "none",
  "onlyOk": true,
  "maxCaptures": 100,
  "pageText": "none",
  "maxTextChars": 20000,
  "maxRetries": 3
}
```

# Actor output Schema

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

Dataset items, one row per result, in the overview table view.

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

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

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

```

## MCP server setup

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