# Wayback Machine Scraper - Archived Snapshots & Page Text (`admirala/wayback-machine-snapshots`) Actor

Wayback Machine scraper via the official CDX API: every archived snapshot of a URL, path or domain with date, status, MIME type and archive link; optional page text. $0.0003 per snapshot.

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

## Pricing

from $0.20 / 1,000 per snapshot listeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Scraper - Archived Snapshots & Page Text

> ✅ **Tested daily** with its default input (Apify's automated QA plus our own smoke test before every release).

**Wayback Machine scraper**: list every Internet Archive snapshot of a URL, path prefix or whole domain via the official **CDX API**, with dates, HTTP status, MIME type and archive links, and optionally fetch the archived page title and text. **$0.0003 per snapshot**.

### Input

| Field | Description |
|---|---|
| `urls` | URLs or domains to look up, e.g. \["example.com", "https://example.com/pricing"]. |
| `matchType` | exact = this URL only; prefix = all URLs under this path; host = this host; domain = whole domain incl. subdomains. |
| `from` | Optional start, as yyyy, yyyyMM or yyyyMMdd, e.g. '2015' or '20200101'. |
| `to` | Optional end, as yyyy, yyyyMM or yyyyMMdd, e.g. '2020'. |
| `collapse` | Reduce duplicates: 'digest' = only changed versions; 'timestamp:8' = max 1 per day, 'timestamp:6' per month, 'timestamp:4' per year; 'urlkey' = one row per unique URL; empty = all. |
| `statusFilter` | Only snapshots with this HTTP status, e.g. '200'. Empty = all. |
| `limit` | Maximum snapshots per input (up to 150000). Caps cost at $0.0003 each. |
| `includeContent` | true = also fetch the title and text of each HTML snapshot ($0.002 extra per page). |

### Output

One dataset item per result with: `query`, `date`, `url`, `statusCode`, `mimeType`, `archiveUrl` and more.

### Pricing (pay per event)

- Per snapshot listed: $0.0003
- Per archived page text fetched: $0.002

You only pay for successful results.

### Use with AI agents (MCP)

This Actor can be used as a tool by AI agents (Claude, Cursor, VS Code, other MCP clients) through the official [Apify MCP server](https://docs.apify.com/platform/integrations/mcp):

- Add only this Actor as a tool: `https://mcp.apify.com?tools=admirala/wayback-machine-snapshots` (sign in with OAuth or an Apify API token).
- Or connect `https://mcp.apify.com` and let the agent find it with `search-actors` (e.g. "wayback machine"), read the input schema with `fetch-actor-details` and run it with `call-actor`.

Example input an agent can pass:

```json
{
  "urls": [
    "example.com"
  ],
  "matchType": "exact",
  "collapse": "timestamp:6",
  "limit": 100
}
```

Cost per call: $0.0003 per snapshot listed; $0.002 per archived page text fetched (`includeContent`). Results come back as dataset items (`get-dataset-items`).

### FAQ

**How do I find old versions of a website?**
Add the URL or domain to `urls`; each snapshot row has `date` and `archiveUrl`.

**Can I list all archived URLs of a domain?**
Yes, set `matchType: domain` (includes subdomains) and `collapse: urlkey` for one row per URL.

**Can I get the text of an archived page?**
Yes, set `includeContent: true` ($0.002 per page).

### Related actors

- Website Change Monitor - Page Diff Tracker (CSS selector) (coming soon to Apify Store)
- [WHOIS Lookup Bulk - Domain RDAP, DNS Records & SSL](https://apify.com/admirala/domain-whois-rdap-dns-lookup)

# Actor input Schema

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

URLs or domains to look up, e.g. \["example.com", "https://example.com/pricing"].

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

exact = this URL only; prefix = all URLs under this path; host = this host; domain = whole domain incl. subdomains.

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

Optional start, as yyyy, yyyyMM or yyyyMMdd, e.g. '2015' or '20200101'.

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

Optional end, as yyyy, yyyyMM or yyyyMMdd, e.g. '2020'.

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

Reduce duplicates: 'digest' = only changed versions; 'timestamp:8' = max 1 per day, 'timestamp:6' per month, 'timestamp:4' per year; 'urlkey' = one row per unique URL; empty = all.

## `statusFilter` (type: `string`):

Only snapshots with this HTTP status, e.g. '200'. Empty = all.

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

Maximum snapshots per input (up to 150000). Caps cost at $0.0003 each.

## `includeContent` (type: `boolean`):

true = also fetch the title and text of each HTML snapshot ($0.002 extra per page).

## Actor input object example

```json
{
  "urls": [
    "example.com"
  ],
  "matchType": "exact",
  "collapse": "digest",
  "statusFilter": "200",
  "limit": 500,
  "includeContent": false
}
```

# Actor output Schema

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

No description

# 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("admirala/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": ["example.com"] }

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

```

## MCP server setup

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