# Wayback Machine URLs Scraper (`nanodata/wayback-machine-urls-scraper`) Actor

List the captures the Internet Archive Wayback Machine holds for a domain or URL: capture time, original URL, status code, file type, size and a ready archive link. Pay per capture.

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

## Pricing

from $2.00 / 1,000 wayback capture listeds

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 Scraper

List the captures that the Internet Archive Wayback Machine holds for a domain or a URL. Each row is one capture with its time, original address, status code, file type, size and a link that opens the archived copy. You pay per capture delivered.

The data comes from the public capture index of the Internet Archive. No account and no API key are needed.

### What you get

For each capture the actor returns one row with:

- `urlkey`: the archive's normalized key for the URL
- `timestamp`: capture time as the archive writes it (`YYYYMMDDhhmmss`, UTC)
- `capturedAt`: the same time in ISO 8601
- `original`: the URL that was captured
- `mimetype`: the file type recorded for the capture
- `statuscode`: the HTTP status the site returned (a number)
- `digest`: a content hash. Equal hashes mean equal content.
- `length`: stored size in bytes (a number)
- `archiveUrl`: link that opens the capture in the Wayback Machine
- `query`: the entry from your input that the capture was found for

A value the archive does not record is null.

### Typical uses

- Find old pages of a site, for example before a redesign or a migration
- Build a list of URLs that used to exist, to set up redirects or check broken links
- Collect all PDF or image files the archive holds for a domain
- Track when a page changed, using one row per changed version
- Research how a site looked in a given year

### Pricing

You pay per capture delivered, plus a small fee for each run.

| Event | Name | Price |
|---|---|---|
| Run start (charged once, together with the first delivered row) | `actor-start` | $0.001 per run |
| One capture row | `capture-result` | $0.002 per capture ($2.00 per 1,000 captures) |

A run that finds nothing is not charged. If you set a maximum cost for the run, the actor stops cleanly once the next row would go over it.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | list | `apify.com` sample | Domains (`apify.com`) or full URLs (`https://apify.com/blog`) |
| `matchType` | text | `domain` | `domain` (the domain and its subdomains), `host` (this host only), `prefix` (URLs starting with the given URL) or `exact` (only the given URL) |
| `from` | text | empty | Earliest capture date, a year (`2020`) or a date (`20200131`) |
| `to` | text | empty | Latest capture date, a year or a date |
| `statusFilter` | text | `200` | A status code (`200`), a pattern (`2..`, `30[12]`), `!404` to leave a code out, or `any` for all |
| `mimeTypeFilter` | text | empty | A file type such as `text/html`, `application/pdf` or `image/.*`. Start with `!` to leave a type out. |
| `collapse` | text | `urlkey` | `urlkey`: one row per URL. `digest`: a new row only when the content changed. `none`: every capture. |
| `maxResults` | number | 1000 | Maximum captures in total, up to 1,000,000 |
| `maxResultsPerUrl` | number | 0 | Optional limit per entry so later entries also get rows. 0 means no limit. |
| `pageSize` | number | 1000 | Captures requested per page, 10 to 1000 |

How it works:

- Entries in `urls` are worked through in order. `maxResults` counts all entries together, so with a small `maxResults` the first entry can use the whole budget. Set `maxResultsPerUrl` to share it.
- With `domain` or `host`, a full URL is cut down to its host name.
- With `collapse` set to `none`, a busy page such as a home page can have thousands of captures. Use `from`, `to` or `maxResults` to keep the result small.
- Number fields also accept numbers written as text, for example `"7"`.
- Started with no input, the actor returns a sample of 100 captures for `apify.com`.

#### Example: all pages of a domain

```json
{
  "urls": ["apify.com"],
  "matchType": "domain",
  "maxResults": 5000
}
```

#### Example: PDF files of two sites, shared budget

```json
{
  "urls": ["example.org", "example.com"],
  "mimeTypeFilter": "application/pdf",
  "maxResults": 2000,
  "maxResultsPerUrl": 1000
}
```

#### Example: every version of one page in 2023

```json
{
  "urls": ["https://apify.com/pricing"],
  "matchType": "exact",
  "from": "2023",
  "to": "2023",
  "collapse": "digest"
}
```

### Output sample

```json
{
  "urlkey": "com,apify)/.well-known/agents.md",
  "timestamp": "20260508051948",
  "capturedAt": "2026-05-08T05:19:48Z",
  "original": "https://apify.com/.well-known/agents.md",
  "mimetype": "text/markdown",
  "statuscode": 200,
  "digest": "6ZQES6QBXK4TU6TBASZ23HGUCQ4CRYIR",
  "length": 7750,
  "archiveUrl": "https://web.archive.org/web/20260508051948/https://apify.com/.well-known/agents.md",
  "query": "apify.com"
}
```

### Limitations

- The actor lists what the Internet Archive capture index holds. Pages the archive never captured do not appear.
- The archive is often busy. The actor waits and retries, so runs are slower than the row count suggests. If the archive keeps refusing, the run stops cleanly with a status that says so, and only delivered rows are charged.
- The archive may hold several captures of the same page. With `collapse` set to `none` you pay for each one.
- The actor does not download or check archived content. Open `archiveUrl` to view a capture.
- Very large domains can hold millions of captures. Use `maxResults` and the filters to keep a run small.

### FAQ

**Do I need an Internet Archive account or key?**
No. The actor reads the public capture index.

**Does the actor download the archived pages?**
No. It lists captures and gives a link for each. Open `archiveUrl` to see the archived copy.

**Why do I get one row per URL by default?**
`collapse` is `urlkey` by default, which keeps one capture per URL (the earliest). Use `digest` to get one row per changed version, or `none` for every capture.

**Why is `statuscode` sometimes empty?**
For repeat captures the archive records no status code. These rows have a null `statuscode`. They are left out by the default filter `200`. Use `statusFilter` set to `any` to keep them.

**What does `length` mean?**
The size of the stored capture in bytes, as the archive holds it. It is usually smaller than the page you see in a browser.

**Why did I get fewer rows than `maxResults`?**
The archive holds fewer captures for your filters, or the maximum cost you set for the run was reached. The run status message says which.

**How fast is it?**
The actor sends one request at a time with at least one second between requests, to respect the archive's limits. A page of 1,000 captures usually takes a few seconds, but the archive often answers slowly or asks to wait, so a run of a few hundred rows can take a few minutes. If the archive asks to slow down, the actor waits and tries again, then stops cleanly if the archive keeps refusing.

**Can a run be restarted safely?**
Yes. Progress is saved after every page. A restarted run continues where it stopped and does not deliver or charge the same rows twice.

**Is this affiliated with the Internet Archive?**
No. This is an independent tool that reads public data. Please keep your use modest and in line with the Internet Archive terms of use.

# Actor input Schema

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

One or more domains (apify.com) or full URLs (https://apify.com/blog). Results are collected for each entry in order. Leave empty for a small sample (apify.com, 100 captures).

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

domain: the domain and all its subdomains. host: exactly this host. prefix: URLs that start with the given URL. exact: only the given URL. For domain and host, a full URL is cut down to its host name.

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

Optional. Earliest capture date: a year (2020) or a date (20200131). Leave empty for no limit.

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

Optional. Latest capture date: a year (2024) or a date (20241231). Leave empty for no limit.

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

Keep captures with this HTTP status. A code (200), a pattern (2.. or 30\[12]) or !404 to leave one out. Use any to keep all. Default 200.

## `mimeTypeFilter` (type: `string`):

Optional. Keep captures of this file type, for example text/html, application/pdf or image/.\*. Start with ! to leave a type out.

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

urlkey: one capture per URL (the earliest). digest: a new row only when the content changed. none: every capture, so a busy page can have thousands of rows.

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

Maximum number of captures in total, all entries together. Entries are worked through in order. Default 1000.

## `maxResultsPerUrl` (type: `integer`):

Optional. Stop an entry after this many captures so that later entries also get rows. 0 means no limit.

## `pageSize` (type: `integer`):

Captures requested per page (10 to 1000). Default 1000.

## `proxyConfiguration` (type: `object`):

Keep the default.

## Actor input object example

```json
{
  "matchType": "domain",
  "statusFilter": "200",
  "collapse": "urlkey",
  "maxResults": 1000,
  "maxResultsPerUrl": 0,
  "pageSize": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

One row per capture in the Internet Archive

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nanodata/wayback-machine-urls-scraper").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 = { "proxyConfiguration": { "useApifyProxy": True } }

# Run the Actor and wait for it to finish
run = client.actor("nanodata/wayback-machine-urls-scraper").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 '{
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call nanodata/wayback-machine-urls-scraper --silent --output-dataset

```

## MCP server setup

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

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/4rURNarlH5buSNP0Y/builds/yiZ2OyCnjUNuzbbTJ/openapi.json
