# Wayback Machine Scraper: Archive.org Snapshot History API (`scrape-smith/wayback-snapshots`) Actor

Wayback Machine scraper for the full capture history of any URL or domain via the official Internet Archive CDX API. One row per snapshot: capture date, HTTP status, MIME type, digest, contentChanged flag and a direct web.archive.org link. Ideal for SEO audits and change tracking.

- **URL**: https://apify.com/scrape-smith/wayback-snapshots.md
- **Developed by:** [Ryan Sofranko](https://apify.com/scrape-smith) (community)
- **Categories:** SEO tools, Developer tools
- **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 does Wayback Machine Scraper do?

Wayback Machine scraper for the full capture history of any URL or domain via the official Internet Archive CDX API. One row per snapshot: capture date, HTTP status, MIME type, digest, contentChanged flag and a direct web.archive.org link. Ideal for SEO audits and change tracking.

📖 Step-by-step tutorial: <https://dev.to/scrape-smith/how-to-get-the-full-wayback-machine-history-of-any-website-no-code-or-python-p5d>

**Popular searches this actor answers:** Wayback Machine scraper, Internet Archive API, archive.org CDX API, website history, historical snapshots, page change detection.

**Try it free:** the input is prefilled, so just click **Start** and you get real results in seconds for a fraction of a cent.

### What data does it return?

Real rows from a test run with the example input (truncated):

| capturedAt | statusCode | mimeType | contentChanged | snapshotUrl |
|---|---|---|---|---|
| 2020-01-09T13:07:05Z | 200 | text/html | None | https://web.archive.org/web/20200109130705/https://apify.com… |
| 2020-02-24T14:06:03Z | 200 | text/html | True | https://web.archive.org/web/20200224140603/https://apify.com… |
| 2020-03-02T11:10:47Z | 200 | text/html | True | https://web.archive.org/web/20200302111047/https://apify.com… |
| 2020-04-05T10:34:45Z | 200 | text/html | True | https://web.archive.org/web/20200405103445/https://apify.com… |
| 2020-05-01T11:22:48Z | 200 | text/html | True | https://web.archive.org/web/20200501112248/https://apify.com… |

Full JSON for one row:

```json
[
  {
    "input": "apify.com",
    "original": "https://apify.com/",
    "capturedAt": "2020-01-09T13:07:05Z",
    "timestamp": "20200109130705",
    "statusCode": "200",
    "mimeType": "text/html",
    "digest": "D4P2GPUK3PEGEFYQFUENG7MNTQI3ZRN4",
    "contentChanged": null,
    "sizeBytes": 29306,
    "snapshotUrl": "https://web.archive.org/web/20200109130705/https://apify.com/"
  }
]
```

Download results as JSON, CSV, Excel, XML or HTML, call it via the Apify API, or connect it to Zapier, Make, n8n, Google Sheets and AI agents (Apify MCP server).

### Use cases

- SEO audits: see when titles, pages or redirects changed
- Competitor monitoring: track pricing-page and landing-page history
- Content recovery: find old versions of deleted pages
- Domain due diligence before buying an expired domain
- Academic and journalistic research on how sites evolved

### How to use Wayback Machine Scraper

1. Open the actor and keep the prefilled example, or replace it with your own input.
2. Click **Start** and wait for the run to finish.
3. Export the dataset or fetch it via API.

#### Input

| Field | Description |
|---|---|
| `urls` | URLs or domains to look up in the Wayback Machine, one per line. Bare domains (`example.com`) or full URLs (`https://example.com/pricing`). With `matchType=domain` a domain also covers its subdomains. |
| `from` | Earliest capture date to include, as `YYYY` or `YYYYMMDD` (e.g. `2020` or `20230115`). Leave empty for the very first capture. |
| `to` | Latest capture date to include, as `YYYY` or `YYYYMMDD`. Leave empty for up to today. |
| `collapse` | How to thin out captures: `month` = at most one snapshot per month (good overview), `day` = one per day, `digest` = only when page content changed, `none` = every capture. |
| `matchType` | `exact` = only this URL, `prefix` = every URL starting with it (e.g. a whole /blog/ folder), `domain` = the whole domain including subdomains. |
| `limit` | Maximum snapshots returned per input URL (each snapshot is one billed row). Example: 200. |

Example input:

```json
{
  "urls": [
    "apify.com"
  ],
  "from": "2020",
  "collapse": "month",
  "limit": 20
}
```

### Pricing

Pay per event: **$0.003 per run start** + **$0.0005 per snapshot** returned. 1,000 snapshots ≈ $0.50. Apify platform usage is included. Set a max charge per run to cap cost.

| Example job | Approx. cost |
|---|---|
| Monthly history of one domain since 2020 (~80 snapshots) | ≈ $0.04 + $0.003 start |
| 1,000 snapshots | $0.50 + $0.003 start |

### FAQ

#### Is this the official Wayback Machine API?

It uses the Internet Archive's public CDX server API, the same index web.archive.org uses. It is not affiliated with the Internet Archive.

#### How do I only get snapshots where the page changed?

Set `collapse` to `digest`, or check the `contentChanged` flag on each row.

#### Does it download page HTML?

No. It returns snapshot metadata and a `snapshotUrl` you can open or fetch yourself.

#### Is it legal to use this data?

The actor only reads public, official endpoints. You are responsible for using the data in line with the source's terms and applicable laws (e.g. GDPR for personal data).

### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/scrape-smith~wayback-snapshots/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' -d '{"urls": ["apify.com"], "from": "2020", "collapse": "month", "limit": 20}'
```

### More Scrape-Smith actors

- [Shopify Products Scraper](https://apify.com/scrape-smith/shopify-products-feed)
- [Apple App Store Reviews Scraper](https://apify.com/scrape-smith/apple-app-store-reviews)
- [USPTO Trademark Status Lookup](https://apify.com/scrape-smith/uspto-trademark-status)
- [ATS Jobs Scraper](https://apify.com/scrape-smith/multi-ats-jobs-feed)
- [Bluesky Scraper](https://apify.com/scrape-smith/bluesky-posts-profiles)
- [Apple Podcasts Scraper](https://apify.com/scrape-smith/apple-podcasts-scraper)
- [Steam Reviews Scraper](https://apify.com/scrape-smith/steam-reviews-scraper)

# Actor input Schema

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

URLs or domains to look up in the Wayback Machine, one per line. Bare domains (`example.com`) or full URLs (`https://example.com/pricing`). With `matchType=domain` a domain also covers its subdomains.

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

Earliest capture date to include, as `YYYY` or `YYYYMMDD` (e.g. `2020` or `20230115`). Leave empty for the very first capture.

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

Latest capture date to include, as `YYYY` or `YYYYMMDD`. Leave empty for up to today.

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

How to thin out captures: `month` = at most one snapshot per month (good overview), `day` = one per day, `digest` = only when page content changed, `none` = every capture.

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

`exact` = only this URL, `prefix` = every URL starting with it (e.g. a whole /blog/ folder), `domain` = the whole domain including subdomains.

## `limit` (type: `integer`):

Maximum snapshots returned per input URL (each snapshot is one billed row). Example: 200.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "from": "2020",
  "to": "",
  "collapse": "month",
  "matchType": "exact",
  "limit": 20
}
```

# Actor output Schema

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

Wayback snapshots stored in the 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"
    ],
    "limit": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrape-smith/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"],
    "limit": 20,
}

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

```

## MCP server setup

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