# Wayback Snapshots — Archive History and Content Changes (`xtracto/wayback-snapshots`) Actor

Every Wayback Machine snapshot of a URL, with a content hash per capture so you can see exactly when the page changed — without downloading a single archived copy. Keyless, HTTP-only.

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

## Pricing

from $0.67 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Scraper

List every Internet Archive (Wayback Machine) capture of a URL, with a content fingerprint per snapshot, so you can see exactly when a page changed without downloading a single archived copy.

### Why use this actor

- **No account, no login, no API key.** The Internet Archive is a free public service.
- **Real version history, not just a capture list.** Each snapshot carries the archive's content fingerprint, so identical captures are spotted instantly. Turn on **Only content changes** and you get one row per distinct version of the page.
- **Know the gaps.** Every row says whether the content changed since the previous capture and how many days passed between them.
- **Two links per snapshot:** the normal Wayback view, and a clean copy of the original page without the archive toolbar, ready to feed into a text extractor.
- **Whole-site sweeps.** Look up one page, everything under a path, a whole host, or a whole domain including subdomains.
- **Stable JSON output** for spreadsheets, databases and pipelines; export to JSON, CSV or Excel; schedule it on Apify.

### How it works

1. You list one or more URLs (the `https://` part is optional).
2. The actor asks the Internet Archive for every capture it holds, filtered by your date range and status code.
3. It compares each capture's fingerprint with the one before and marks whether the content changed.
4. Each capture becomes one row in your dataset, oldest first.

If the Archive is busy it retries automatically. Nothing to babysit: no scrapers, browsers or blocks to manage.

### Input

```json
{
  "urls": ["apify.com"],
  "matchType": "exact",
  "onlyContentChanges": true,
  "dateFrom": "2024",
  "dateTo": "",
  "statusCodeFilter": "200",
  "maxSnapshotsPerUrl": 5
}
```

| Field | Type | Description |
|---|---|---|
| `urls` | array of strings | Pages to look up, one per line. Leaving out `https://` brings the http and https captures of the same page together. |
| `matchType` | string | `exact` (one page), `prefix` (everything under a path), `host` (the same host), or `domain` (whole domain including subdomains). Default `exact`. |
| `onlyContentChanges` | boolean | Keep only snapshots whose content differs from the one before. Default `false`. |
| `dateFrom` | string | Earliest capture date as `YYYY`, `YYYYMM` or `YYYYMMDD`. Empty means from the very first capture. |
| `dateTo` | string | Latest capture date in the same format. Empty means up to the most recent. |
| `statusCodeFilter` | string | Only captures with this status code, e.g. `200` to skip error pages and redirects. |
| `maxSnapshotsPerUrl` | integer | Cap per URL. A long-lived page can have thousands of captures. Default `200`. |
| `proxyConfiguration` | object | Not needed. |

### Output

Real output from the input above (2 of the 5 rows):

```json
[
  {
    "_input": "apify.com",
    "_source": "S1-wayback-cdx",
    "_scrapedAt": "2026-11-11T13:13:48Z",
    "rank": 1,
    "url": "https://apify.com/",
    "timestamp": "20240106234848",
    "archivedAt": "2024-01-06T23:48:48Z",
    "archiveUrl": "https://web.archive.org/web/20240106234848/https://apify.com/",
    "rawArchiveUrl": "https://web.archive.org/web/20240106234848id_/https://apify.com/",
    "digest": "CI23EQLBQNE7EWSZRZT6HLVWOEIDTFE3",
    "contentChanged": null,
    "daysSincePrevious": null,
    "statusCode": "200",
    "mimeType": "text/html",
    "lengthBytes": 52534,
    "snapshotsReturned": 5
  },
  {
    "_input": "apify.com",
    "_source": "S1-wayback-cdx",
    "_scrapedAt": "2026-11-11T13:13:48Z",
    "rank": 3,
    "url": "https://apify.com/",
    "timestamp": "20240114223331",
    "archivedAt": "2024-01-14T22:33:31Z",
    "archiveUrl": "https://web.archive.org/web/20240114223331/https://apify.com/",
    "rawArchiveUrl": "https://web.archive.org/web/20240114223331id_/https://apify.com/",
    "digest": "3FEFSIQA3LGUY4OHJ3BD7GKT3YG3C5KN",
    "contentChanged": true,
    "daysSincePrevious": 7,
    "statusCode": "200",
    "mimeType": "text/html",
    "lengthBytes": 52509,
    "snapshotsReturned": 5
  }
]
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The URL you entered |
| `_source` | string | Data source tag |
| `_scrapedAt` | string | When this row was produced (UTC) |
| `rank` | integer | Position in the capture list, oldest first |
| `url` | string | The page URL as the archive recorded it |
| `timestamp` | string | Capture time in the archive's own `YYYYMMDDhhmmss` format |
| `archivedAt` | string | Capture time as ISO 8601 (UTC) |
| `archiveUrl` | string | The capture as the Wayback Machine shows it |
| `rawArchiveUrl` | string | The original page bytes, without the archive toolbar |
| `digest` | string | The archive's content fingerprint; equal fingerprints mean identical content |
| `contentChanged` | boolean or null | Whether content differs from the previous capture; `null` on the first one |
| `daysSincePrevious` | integer or null | Days since the previous capture |
| `statusCode` | string | HTTP status the page returned when captured |
| `mimeType` | string | Content type of the capture |
| `lengthBytes` | integer | Size of the stored capture |
| `snapshotsReturned` | integer | Total snapshots returned for this input |

### Notes and limits

- **"Only content changes" is a real version history.** On apify.com, the first 25 captures collapse to 15 distinct versions; 10 were identical to the capture before.
- **A URL that was never archived is not a failure of the run.** It comes back as a row with `_error: "never_archived"`.
- **The Archive is sometimes busy.** The actor retries up to five times. A row with `_error: "archive_unavailable"` simply means: run it again later.
- **Combine with other actors:** feed `rawArchiveUrl` into **Website Content Extractor** to read what a page said on a given date, or compare with **Sitemap Crawler** to see what a site publishes now versus what the archive remembers.

# Actor input Schema

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

One per line. The scheme is optional — dropping it brings http and https captures of the same page together.

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

'exact' is one page. 'prefix' covers everything under a path. 'domain' sweeps the whole site.

## `onlyContentChanges` (type: `boolean`):

Collapse runs of identical captures, keeping only snapshots whose content differs from the one before. Uses the archive's own content hash, so nothing is downloaded to compare.

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

YYYY, YYYYMM or YYYYMMDD. Leave empty for the earliest capture.

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

YYYY, YYYYMM or YYYYMMDD. Leave empty for the most recent.

## `statusCodeFilter` (type: `string`):

Optional, e.g. 200 to skip captures of error pages and redirects.

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

A long-lived page can have thousands of captures.

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

Not needed. The Internet Archive is a public, keyless service and this actor identifies itself by name.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "matchType": "exact",
  "onlyContentChanges": false,
  "maxSnapshotsPerUrl": 200
}
```

# Actor output Schema

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

One row per scraped record, stored in the run's default dataset.

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

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

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

```

## MCP server setup

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