# Wayback Machine Snapshot Finder (`plainpipe/wayback-snapshots`) Actor

List Wayback Machine captures of a URL or domain via the official CDX API: date, status, MIME type, snapshot link. Use when you need archive history.

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

## Pricing

$1.00 / 1,000 results

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 Snapshot Finder

List Wayback Machine captures of a URL or domain via the official CDX API. One row per capture: timestamp, HTTP status, MIME type, digest, size, snapshot link.

### What it does

This Actor asks the Internet Archive's official [Wayback CDX Server API](https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server) which captures the Wayback Machine holds for the pages or domains you give it, and returns one dataset row per capture. Optionally it returns just the closest capture per URL through the Wayback Availability API.

It returns capture metadata only. It never fetches or republishes the archived pages themselves; every row carries a `snapshotUrl` so you can open the capture in the Wayback Machine yourself. Data source: the Internet Archive's Wayback Machine, used under the [Internet Archive terms of use](https://archive.org/about/terms.php).

### Use cases

- SEO and site migrations: list every URL a domain used to have (match type `domain`, collapse `digest`) to plan redirects.
- See when a page was first and last archived, and how often its content changed.
- Find when a page started returning redirects or errors (filter by status `3xx` or `404`).
- Get one snapshot link per year for a quick visual history of a homepage.
- Find the capture closest to a given date for evidence or research notes (closest capture only).

### How to use it

1. Add one or more **URLs or domains** (for example `apify.com`).
2. Pick a **Match type**: the exact URL, a URL prefix, the whole host, or the domain with subdomains.
3. Optionally set a date range, an HTTP status filter and a **Collapse** level to thin out frequent captures.
4. Set **Max results** (start with 10 to try it) and click **Start**.
5. Export the dataset as JSON, CSV or Excel, or read it through the Apify API.

### Input

| Field | What it is | Default | Example |
|---|---|---|---|
| `urls` (required) | Pages or domains to look up, up to 100 per run. Duplicates are dropped; a scheme such as `https://` is optional. | none | `["apify.com", "https://docs.apify.com/platform"]` |
| `matchType` | `exact` (only this URL), `prefix` (every URL starting with it), `host` (every URL on that host) or `domain` (host and all subdomains). | `exact` | `domain` |
| `dateFrom` | Captures on or after this date, `YYYYMMDD`. | empty | `20200101` |
| `dateTo` | Captures on or before this date, `YYYYMMDD`. | empty | `20241231` |
| `filterStatus` | HTTP status the capture returned, or a class. | empty (all) | `200`, `3xx` |
| `collapse` | `none` (every capture), `digest` (drop consecutive identical content), `day`, `month` or `year` (first capture per period). | `none` | `year` |
| `availabilityOnly` | Return only the closest capture per URL through the Availability API (closest to `dateTo`, else `dateFrom`, else the newest). Ignores match type, status filter and collapse. | `false` | `true` |
| `maxItems` | Stop after this many captures in total across all URLs (at most 100,000). | `100` | `1000` |

Example input:

```json
{ "urls": ["docs.apify.com"], "matchType": "host", "dateFrom": "20230101", "dateTo": "20231231", "filterStatus": "200", "collapse": "month", "maxItems": 50 }
```

Invalid dates, a reversed date range, a malformed status filter or an entry that is not a URL or domain fail the run before any request is made, so nothing is charged. The error message names the entry or field to fix.

### Output

One row per capture. Example row for `apify.com`:

```json
{
  "query": "apify.com",
  "url": "http://www.apify.com:80/",
  "timestamp": "20070531101538",
  "capturedAt": "2007-05-31T10:15:38Z",
  "statusCode": 200,
  "mimeType": "text/html",
  "digest": "EE6FCHP3MKBC3EV5D5Q4WQJNZNVUTNU6",
  "length": 1013,
  "snapshotUrl": "https://web.archive.org/web/20070531101538/http://www.apify.com:80/"
}
```

| Field | Meaning |
|---|---|
| `query` | The URL or domain you entered (normalised) |
| `url` | The original address the archive captured |
| `timestamp`, `capturedAt` | Capture time as the 14-digit Wayback timestamp and as ISO 8601 UTC |
| `statusCode` | HTTP status at capture time; `null` for revisits or captures stored without a status |
| `mimeType`, `digest`, `length` | Content type, content hash and stored size in bytes; `null` in `availabilityOnly` mode |
| `snapshotUrl` | Link to open the capture in the Wayback Machine |

### Pricing

Pay per result: **$1.00 per 1,000 results** ($0.001 per result). You only pay for results the Actor returns. Set a maximum total charge on the run to cap your spend.

### Limits

- Polite by design: at most one request per second to the archive, with a clear User-Agent, pages of up to 1,000 captures and paging with the API's continuation key. A run of 100,000 captures takes a few minutes.
- Popular domains have millions of captures. Use `collapse`, a date range or `maxItems` to keep runs small and cheap; captures are returned oldest first.
- Some sites are excluded from the Wayback Machine at the owner's request. Such URLs are skipped with a warning; if nothing is left, the run fails and nothing is charged.
- The archive's API can be slow or rate-limited at busy times. The Actor retries with backoff and fails the run if the API keeps refusing.
- Only capture metadata is returned. Page bodies, screenshots and assets are not fetched, stored or redistributed.

### FAQ

**How much does a run cost?** $0.001 per capture returned; 1,000 captures cost $1.00. Failed runs and inputs with no captures push no rows and cost nothing per result. `maxItems` caps the total.

**Why do I get so many rows for one domain?** The archive may capture a popular page several times a day. Use collapse `digest` (only content changes), `month` or `year`, or a date range.

**Can I get the archived page content?** No. The Actor lists capture records and links to them; open `snapshotUrl` to view a capture.

**Which export formats are there?** JSON, CSV, Excel, XML and HTML table from the dataset tab, or any of them through the Apify API.

**Can I run it on a schedule or from my own code?** Yes. Create a schedule in Apify Console, or start runs and read results through the Apify API, webhooks or the Apify client libraries.

### Legal and data

This Actor processes only what you give it or public, non-personal technical data. It does not log in anywhere, does not collect personal data, and does not bypass paywalls, CAPTCHAs or access controls. You are responsible for having the right to process the inputs you provide.

It uses the official Wayback CDX Server API (https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server) and the Wayback Availability API under the Internet Archive's terms of use (https://archive.org/about/terms.php). Archived pages remain the property of their owners; this Actor lists capture records and links to them, and does not copy their content. It is not affiliated with or endorsed by the Internet Archive.

### Support

Open an issue on the Issues tab. Issues are answered within 14 days.

**Use this when:** you need to know when a URL or domain was archived by the Wayback Machine, with what status, and the link to each snapshot.

### Why this one

- $1.00 per 1,000 results: one result per capture; runs with no captures cost nothing per result.
- Each row has the 14-digit timestamp and an ISO 8601 `capturedAt`, the status code, MIME type, content digest, stored size and a ready `snapshotUrl`.
- Reads only the official Wayback CDX and Availability APIs: no browser, no proxy and no HTML parsing; collapse by digest, day, month or year to thin long histories.
- The prefilled input is test-run daily.

Built and maintained by Plain Pipe.

# Actor input Schema

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

Pages or domains to look up, one per line. Up to 100 per run; duplicates are dropped. Examples: apify.com, https://docs.apify.com/platform.

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

Default: Exact URL. exact = only this URL; prefix = every URL that starts with it (for example a site section); host = every URL on this host name; domain = the host and all its subdomains.

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

Optional. Only captures on or after this date, format YYYYMMDD. Example: 20200101.

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

Optional. Only captures on or before this date, format YYYYMMDD. Example: 20241231.

## `filterStatus` (type: `string`):

Optional. Only captures that returned this HTTP status. Examples: 200, 404, or a class such as 3xx. Leave empty for all.

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

Thin out the list. Default: none (every capture). digest drops consecutive captures with identical content; day / month / year keep the first capture per period. Example: year for a quick history.

## `availabilityOnly` (type: `boolean`):

Default off. On: return only the single closest capture per URL through the Wayback Availability API (closest to Captured until, else Captured from, else the newest). Ignores match type, status filter and collapse.

## `maxItems` (type: `integer`):

Stop after this many captures in total across all URLs. Default 100, maximum 100,000. Example: 1000. You are charged per result.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "matchType": "exact",
  "collapse": "year",
  "availabilityOnly": false,
  "maxItems": 10
}
```

# 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": [
        "apify.com"
    ],
    "matchType": "exact",
    "collapse": "year",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainpipe/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"],
    "matchType": "exact",
    "collapse": "year",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("plainpipe/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"
  ],
  "matchType": "exact",
  "collapse": "year",
  "maxItems": 10
}' |
apify call plainpipe/wayback-snapshots --silent --output-dataset

```

## MCP server setup

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