# Wayback Machine Scraper: Archived Snapshots & URLs (CDX API) (`tomstudio/wayback-machine-snapshots`) Actor

Wayback Machine scraper: list Internet Archive snapshots for any URL or domain: dates, status codes, MIME types, archive links. Find all archived URLs of a site, lost pages and content changes. Official CDX API, no login.

- **URL**: https://apify.com/tomstudio/wayback-machine-snapshots.md
- **Developed by:** [Tom Studio](https://apify.com/tomstudio) (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

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 - Archived Snapshots & URL Finder

List **every Internet Archive (archive.org) Wayback Machine capture** of a page, a folder or a whole domain: **capture date, HTTP status, MIME type, content hash and a direct link** to the archived page. Uses the **official Wayback CDX API** - no login, no proxy, no browser.

### Use cases

- **SEO and site migrations**: find old URLs that had traffic and need a redirect (`matchType: host`, `collapse: urlkey`).
- **Content history**: see when a page changed (`collapse: digest` keeps only captures with new content).
- **Link reclamation and expired domains**: check what a domain used to host.
- **Legal and research evidence**: dated proof of what a page showed.
- **Competitor research**: how pricing or landing pages evolved.

### Input example

```json
{
  "urls": ["apify.com", "https://example.com/pricing"],
  "matchType": "exact",
  "collapse": "year",
  "from": "2018",
  "statusCodes": [200],
  "maxSnapshotsPerUrl": 50
}
```

- `matchType`: `exact` URL, `prefix` (everything under a path), `host`, or `domain` (with subdomains).
- `collapse`: `year`, `month`, `day`, `hour`, `urlkey` (unique URLs) or `digest` (only when content changed).

### Output sample

```json
{
  "input": "apify.com",
  "timestamp": "20230115120000",
  "capturedAt": "2023-01-15T12:00:00Z",
  "originalUrl": "https://apify.com/",
  "mimeType": "text/html",
  "statusCode": "200",
  "digest": "ABC123...",
  "length": 15234,
  "archiveUrl": "https://web.archive.org/web/20230115120000/https://apify.com/"
}
```

(values are illustrative; field names are exact)

### Limits

- It lists captures; it does **not** download the archived page content.
- Default cap is 1,000 rows per input (`maxSnapshotsPerUrl`); raise it for big domains.
- archive.org rate-limits heavy use; the Actor waits and retries politely. Very large domains can take a while.

### More free tools by tomstudio

- [ATS Jobs Scraper (Workday, Greenhouse, Lever, Ashby...)](https://apify.com/tomstudio/ats-jobs-scraper)
- [TED Tenders Monitor (EU & Swiss public procurement)](https://apify.com/tomstudio/ted-tenders-monitor)
- [SEC EDGAR Filings Monitor](https://apify.com/tomstudio/sec-edgar-filings-monitor)
- [Domain Availability & RDAP Bulk Checker](https://apify.com/tomstudio/domain-rdap-bulk-checker)
- [App Store Reviews Scraper](https://apify.com/tomstudio/app-store-reviews-scraper)
- [Hacker News Search & Comments](https://apify.com/tomstudio/hacker-news-search)
- [Wayback Machine Snapshots](https://apify.com/tomstudio/wayback-machine-snapshots)
- [RSS & Atom Feed Reader](https://apify.com/tomstudio/rss-feed-reader)
- [YouTube Transcript Scraper](https://apify.com/tomstudio/youtube-transcript-scraper)

# Actor input Schema

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

e.g. apify.com or https://example.com/pricing

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

'Whole host' + 'Unique URLs only' = list every archived page of a site.

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

Reduce duplicates. 'Only when content changed' shows real page changes.

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

Optional, format YYYY, YYYYMM or YYYYMMDD (e.g. 2020).

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

Optional, format YYYY, YYYYMM or YYYYMMDD.

## `statusCodes` (type: `array`):

e.g. 200 (only successful captures). Empty = all.

## `mimeTypes` (type: `array`):

e.g. text/html or application/pdf. Empty = all.

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

Stop after this many rows per input URL/domain.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "matchType": "exact",
  "collapse": "none",
  "statusCodes": [],
  "mimeTypes": [],
  "maxSnapshotsPerUrl": 1000
}
```

# Actor output Schema

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

All results (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": [
        "apify.com"
    ],
    "statusCodes": [],
    "mimeTypes": []
};

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

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

```

## MCP server setup

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