# Wayback Machine Snapshots: Archive History, URLs & Summaries (`globose_talent_mn9/wayback-machine-snapshots`) Actor

Internet Archive Wayback Machine history for any URL or domain via the official CDX API: every snapshot or only content changes, all archived URLs of a domain, the capture closest to a date, or a first/last-seen summary. $0.50 per 1,000 rows.

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

## Pricing

from $0.50 / 1,000 snapshot or url rows

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

## Wayback Machine Snapshots: archive history, archived URLs and summaries

Look up the **Internet Archive Wayback Machine** history of any web page or domain and get it as clean JSON, CSV or Excel. The Actor uses the Archive's official public **CDX API**: no login, no browser, no proxies. Four modes:

| Mode | You get | Typical use |
|---|---|---|
| **Snapshots** | One row per capture: date, archive link, raw-content link, HTTP status, MIME type, size and content digest | Page history, change tracking, evidence, research |
| **Archived URLs** | Every unique URL archived for a domain, host or path prefix, with its first capture | SEO (old URLs, lost pages, redirect planning), OSINT, recovering deleted content |
| **Closest** | The single capture nearest to a date you choose | "What did this page say on 1 June 2015?" |
| **Summary** | One row per input: first and last capture, years archived, months with captures per year, number of distinct versions | Domain age and history checks, due diligence, expired-domain research |

**Price:** **$0.50 per 1,000 snapshot/URL rows** ($0.0005 each) and **$0.003 per summary row**, plus a tiny start fee. Inputs that fail are free error rows.

### Features

- 🔁 **Only real changes:** set `collapse` to *Only when the content changed* to get one row per distinct page version (by content digest) instead of thousands of identical captures. You can also collapse to one capture per hour, day, month or year.
- 🌐 **Domain-wide:** match an exact URL, a path prefix (`example.com/blog/*`), a host, or a whole domain with all its subdomains (`*.example.com`).
- 📅 **Date ranges** (`from` / `to`), **only HTTP 200** and **only HTML** filters.
- 🔗 Every row has a ready **archive link** (`https://web.archive.org/web/<timestamp>/<url>`) and a **raw link** (`…id_/…`) that returns the original archived bytes without the Wayback toolbar, ideal for downloading old content.
- 📄 Automatic pagination with resume keys, so large histories come back complete (up to your limits).
- 🤝 Polite by design: about one request per second with backoff, so runs are reliable and fair to the Internet Archive.

### Input examples

Capture history of a page, one row per content change since 2018:

```json
{ "urls": ["https://www.apple.com/iphone/"], "mode": "snapshots", "collapse": "changes", "from": "2018" }
```

All archived HTML URLs of a domain:

```json
{ "urls": ["example.com"], "mode": "urls", "onlyHtml": true, "onlyStatus200": true, "maxResultsPerUrl": 5000 }
```

What a page looked like on a date:

```json
{ "urls": ["nytimes.com"], "mode": "closest", "closestTo": "2008-11-05" }
```

Domain history summary for a list of domains:

```json
{ "urls": ["apify.com", "example.com", "some-expired-domain.com"], "mode": "summary" }
```

### Output

**Snapshots / Closest** rows:

| Field | Description |
|---|---|
| `url` | The original URL as captured |
| `timestamp`, `capturedAt` | Wayback timestamp (YYYYMMDDhhmmss) and ISO date (UTC) |
| `archiveUrl`, `rawArchiveUrl` | Wayback page and raw original content |
| `statusCode`, `isRedirect` | HTTP status at capture time |
| `mimeType`, `lengthBytes`, `digest` | Content type, compressed size, SHA-1 content digest (same digest = same content) |
| `urlKey` | The Archive's canonical (SURT) key |
| `requestedDate`, `offsetDays` | Closest mode only: your date and how many days away the capture is |

**Archived URLs** rows: `url`, `urlKey`, `firstCapturedAt`, `firstArchiveUrl`, `latestArchiveUrl` (always redirects to the newest capture), `mimeType`, `statusCode`.

**Summary** rows: `archived`, `firstCapturedAt`, `firstArchiveUrl`, `lastCapturedAt`, `lastArchiveUrl`, `lastStatusCode`, `daysSinceLastCapture`, `yearsArchived`, `monthsWithCaptures`, `monthsWithCapturesByYear` (e.g. `{"2019": 12, "2020": 11}`), `distinctVersions` (capped at 10,000; `distinctVersionsCapped` tells you if it was).

Every row also has `input`, `scrapedAt` and `error`. A SUMMARY record in the default key-value store lists the result count per input.

Example snapshot row:

```json
{
  "input": "example.com", "url": "http://example.com/", "timestamp": "20200101000000",
  "capturedAt": "2020-01-01T00:00:00.000Z",
  "archiveUrl": "https://web.archive.org/web/20200101000000/http://example.com/",
  "rawArchiveUrl": "https://web.archive.org/web/20200101000000id_/http://example.com/",
  "statusCode": 200, "isRedirect": false, "mimeType": "text/html", "lengthBytes": 1234,
  "digest": "…", "urlKey": "com,example)/"
}
```

### Cost examples

- Content-change history of 20 pages, about 50 versions each: 1,000 rows ≈ **$0.50**
- 10,000 archived URLs of a domain ≈ **$5.00**
- Summaries for 100 domains ≈ **$0.30**

Use `maxResultsPerUrl` (default 1,000) and `maxResultsTotal` to cap a run. Popular sites can have millions of captures.

### FAQ

**Does it download page content?** No. It returns capture metadata and direct links. Use `rawArchiveUrl` to fetch the original content of any capture.

**Why is a site missing?** The site may never have been archived, or its owner asked the Internet Archive to exclude it. Excluded sites return a free error row.

**Is it allowed?** Yes. It uses the Internet Archive's public CDX API, made for this purpose, at a polite request rate. Please respect the Internet Archive's [terms of use](https://archive.org/about/terms.php).

**Is it affiliated with the Internet Archive?** No. This is an independent tool. If you find the Wayback Machine useful, consider [donating to the Internet Archive](https://archive.org/donate).

# Actor input Schema

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

One per line: a page URL (https://example.com/pricing), a domain (example.com), or a wildcard (example.com/blog/\*, \*.example.com).

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

What to return for each input.

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

How to match each input. Default: exact for Snapshots/Closest/Summary, domain for Archived URLs. Ignored for wildcard inputs.

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

Only captures on or after this date: YYYY, YYYY-MM or YYYY-MM-DD.

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

Only captures on or before this date: YYYY, YYYY-MM or YYYY-MM-DD.

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

Thin out the history. 'Only when the content changed' is the best way to see real page versions.

## `onlyStatus200` (type: `boolean`):

Skip redirects, 404s and errors.

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

Skip images, scripts, PDFs and other files (useful with Archived URLs).

## `closestTo` (type: `string`):

For Closest mode: the date you want, e.g. 2015-06-01.

## `maxResultsPerUrl` (type: `integer`):

0 = no limit (popular sites can have millions of captures).

## `maxResultsTotal` (type: `integer`):

0 = no limit.

## Actor input object example

```json
{
  "urls": [
    "apify.com",
    "https://www.example.com/"
  ],
  "mode": "snapshots",
  "collapse": "none",
  "onlyStatus200": false,
  "onlyHtml": false,
  "maxResultsPerUrl": 25,
  "maxResultsTotal": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

All results.

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

Per-input counts.

# 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",
        "https://www.example.com/"
    ],
    "maxResultsPerUrl": 25,
    "maxResultsTotal": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("globose_talent_mn9/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",
        "https://www.example.com/",
    ],
    "maxResultsPerUrl": 25,
    "maxResultsTotal": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("globose_talent_mn9/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",
    "https://www.example.com/"
  ],
  "maxResultsPerUrl": 25,
  "maxResultsTotal": 50
}' |
apify call globose_talent_mn9/wayback-machine-snapshots --silent --output-dataset

```

## MCP server setup

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