# Wayback Machine URLs — all archived pages of a domain (`openregistry/wayback-urls-history`) Actor

List every URL the Internet Archive has captured for a domain, with first and last capture, status codes, MIME types and archive links, or the snapshot history of one page over time. Official Wayback CDX API, polite pacing, no proxy.

- **URL**: https://apify.com/openregistry/wayback-urls-history.md
- **Developed by:** [Mahé Perrin](https://apify.com/openregistry) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.20 / 1,000 archived url or snapshots

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 URLs — all archived pages of a domain

Get the list of **every URL the Internet Archive has ever captured for a domain**, with the date of the first capture, the HTTP status, the content type and a direct link to the archived copy. Or follow **one page through time**: one row per capture, per day, per month, per year, or only when the content changed.

The Actor uses the **official Wayback CDX API** (`web.archive.org/cdx/search/cdx`), the index the Internet Archive publishes for programmatic access. No scraping of archived pages, no proxy, no login. Requests are sent one at a time with a pause between them, and the Actor waits and retries when archive.org asks clients to slow down.

### Typical uses

- **SEO migrations and audits**: recover the full list of old URLs of a site to build 301 redirects, or find pages that once ranked and now return 404 (`statusCodes: ["200"]` on the archive, then check them live).
- **Content recovery**: find old blog posts, PDFs or product pages (`urlContains: "/blog/"`, `mimeTypes: ["application/pdf"]`).
- **Security research and bug bounty**: list forgotten endpoints, subdomains and parameters of a target domain.
- **Expired domain due diligence**: see what a domain hosted before you buy it, and when.
- **Competitive and legal research**: prove what a pricing page or terms page said on a given date (`mode: urlSnapshots`, `snapshotFrequency: "changes"`).

### Input examples

All URLs of a domain, HTML pages only, merged across tracking parameters:

```json
{
  "mode": "domainUrls",
  "targets": ["example.com"],
  "matchType": "domain",
  "mimeTypes": ["text/html"],
  "statusCodes": ["200"],
  "dropQueryStrings": true,
  "maxResultsPerTarget": 5000
}
```

History of a page, one row each time its content changed:

```json
{
  "mode": "urlSnapshots",
  "targets": ["https://example.com/"],
  "snapshotFrequency": "changes",
  "from": "2015"
}
```

### Output

All-URLs mode (`type: "url"`), one row per unique URL:

| Field | Meaning |
|---|---|
| `url`, `urlKey`, `target` | archived address, the archive's canonical key, your entry |
| `firstCapture`, `firstStatusCode`, `firstSnapshotUrl` | first time the archive saw it |
| `mimeType`, `length`, `digest` | content type, archived size, content fingerprint |
| `lastCapture`, `lastStatusCode`, `lastSnapshotUrl` | *full mode*: most recent capture |
| `captureCount`, `distinctVersions`, `statusCodes` | *full mode*: how often it was captured, how many different contents, every status seen |

Snapshot mode (`type: "snapshot"`), one row per capture kept:

| Field | Meaning |
|---|---|
| `timestamp`, `statusCode`, `mimeType`, `length`, `digest` | the capture |
| `snapshotUrl` | link to open that capture in the Wayback Machine |
| `changedFromPrevious` | `true` when the content differs from the previous row |

Sample row:

```json
{
  "type": "url", "target": "example.com", "url": "http://example.com/",
  "urlKey": "com,example)/", "firstCapture": "2002-01-20T14:25:10Z", "firstStatusCode": 200,
  "mimeType": "text/html", "length": 1792, "digest": "HT2DYGA5UKZCPBSFVCV3JOBXGW2G5UUA",
  "firstSnapshotUrl": "https://web.archive.org/web/20020120142510/http://example.com:80/"
}
```

### Fast or full?

- **Fast** (default) asks the archive for one entry per URL. It is quick even on large domains and gives the first capture.
- **Full** reads every capture and aggregates them per URL (first and last capture, count, distinct versions, statuses). Popular pages can have hundreds of thousands of captures, so use it with `from`/`to`, a `prefix` scope, or a filter. `maxCapturesScanned` stops the reading at a safe size and the log tells you when it was reached.

### Limits to know

- The Internet Archive is a non-profit service with limited capacity. The Actor deliberately runs at a modest pace (one request every few seconds, pages of a few thousand entries) and backs off when asked. Very large domains take time; that is the price of being a polite client.
- When archive.org is overloaded or offline, the Actor retries for a few minutes, then reports the error for that target and moves to the next. Nothing is charged for rows that were not delivered.
- The archive only knows pages it has crawled. Pages behind logins, excluded by the site owner, or removed at the owner's request are not listed.
- `length` is the size of the compressed archived record, not the original page size.

### Pricing

Pay per row delivered: **$0.0002 per archived URL or snapshot** ($0.20 per 1,000). Rows merged by `dropQueryStrings` and anything filtered out are never charged. Cap any run with `maxResults` or Apify's maximum charge per run.

Data comes from the Internet Archive's Wayback Machine. Please respect its [terms of use](https://archive.org/about/terms.php), and consider [supporting the Internet Archive](https://archive.org/donate) if this data is valuable to you.

# Actor input Schema

## `mode` (type: `string`):

All archived URLs: one row per unique URL ever captured. Snapshots: one row per capture of each URL you list.

## `targets` (type: `array`):

Domains (example.com) for the first mode, full page addresses (https://example.com/pricing) for the snapshot mode.

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

Domain covers blog.example.com and shop.example.com too. Prefix accepts a path, e.g. example.com/blog/.

## `captureDetail` (type: `string`):

Full mode reads every capture and is much slower on big sites; use it with dates or a prefix.

## `snapshotFrequency` (type: `string`):

Keeps the first capture of each period, or each change of content.

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

Optional. Year or date: 2015, 2015-06 or 2015-06-30.

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

Optional. Year or date, inclusive.

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

Optional. Keep only these codes, e.g. 200, or 404 to find dead pages that once existed.

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

Optional. e.g. text/html, application/pdf, image/\*.

## `urlContains` (type: `string`):

Optional. Keep URLs containing this text, e.g. /blog/ or .pdf.

## `dropQueryStrings` (type: `boolean`):

Treat /page?utm=a and /page?utm=b as one URL. Merged rows are not charged.

## `maxResultsPerTarget` (type: `integer`):

Stops reading a target once this many rows are delivered.

## `maxCapturesScanned` (type: `integer`):

Safety limit on the captures read per domain in full mode.

## `maxResults` (type: `integer`):

Optional. The run stops once this many rows are delivered.

## Actor input object example

```json
{
  "mode": "domainUrls",
  "targets": [
    "example.com"
  ],
  "matchType": "domain",
  "captureDetail": "fast",
  "snapshotFrequency": "month",
  "dropQueryStrings": false,
  "maxResultsPerTarget": 10000,
  "maxCapturesScanned": 200000
}
```

# 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 = {
    "targets": [
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("openregistry/wayback-urls-history").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 = { "targets": ["example.com"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,openregistry/wayback-urls-history"
        }
    }
}
```

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/mNYDJPmLTCe24EHjS/builds/6gNoC5YRYXyvo76qL/openapi.json
