# Wayback Machine Scraper: Captures, Pages & URLs (`kaleidoscopelabs/wayback-machine-scraper`) Actor

Every capture the Wayback Machine holds of a URL, a path, a host or a whole domain: date, HTTP status, content type, digest and archive links. Read the archived pages as text, markdown or HTML, or list a site's URLs with their first and latest capture.

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

## Pricing

from $0.70 / 1,000 captures

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

### What can Wayback Machine Scraper do?

**List every capture the Wayback Machine holds of a URL, a path, a host or a whole domain, read the archived pages as text, markdown or HTML, and list a site's URLs, as JSON, CSV or Excel.**

[![Use it from your AI agent: copy the MCP setup prompt](https://assets.kaleidoscopelabs.io/afy/mcp/mcp-setup.5ac6bded.png)](https://mcp.apify.com/?tools=kaleidoscopelabs/wayback-machine-scraper)

![The oldest captures of nasa.gov as rows, from 31 December 1996: date, status, content type, digest and size; the first five come with the page as markdown.](https://assets.kaleidoscopelabs.io/afy/wayback/hero.e8b84bee.png)

- 🗂️ **Captures:** each capture's date, the HTTP status the site answered with, its content type, a digest of its content and its stored size.
- 📄 **The archived page itself:** on request, the title and the text, markdown or HTML of the page each capture holds, read from the bytes as they were captured.
- 🧭 **A site's URLs:** every URL the Wayback Machine holds of a site, each once, with its first and latest capture, how many captures it has and how many versions of its content.
- 🔗 **Archive links:** the archived page as the Wayback Machine shows it, and the capture's original bytes without the toolbar and rewritten links.
- 📅 **Dates and thinning:** a date range, one capture per hour, day, month or year, or one each time the content changed; or the one capture closest to a date.
- 🔎 **Filters:** pages that loaded, redirects, errors or pages that were gone (404 and 410); HTML pages, PDF files or every file type.

Run it from Apify Console, through the API, on a schedule, or from an AI agent.

### What data do you get from the Wayback Machine?

| Field | What it holds | When |
|---|---|---|
| `url` | The captured address, as the Wayback Machine holds it | always |
| `timestamp`, `capturedAt` | When it was captured: the Wayback Machine's 14 digits, and the same as a UTC date | always |
| `status`, `mimeType` | The HTTP status the site answered with, and the content type of what was captured | when the Wayback Machine lists them; a revisit of unchanged content sets `isRevisit` |
| `digest`, `length` | A hash of the content (the same digest is the same content), and the stored size in bytes | when the Wayback Machine lists them; `missing` says when not |
| `archiveUrl`, `rawUrl` | The capture as the Wayback Machine shows it, and its content as it was captured | always |
| `title`, `text`, `markdown`, `html` | The page the capture holds: its title, and its text, its markdown with links written whole, or its HTML | with **Read each capture's page** |
| `captures`, `versions` | How many captures the URL has, and how many differ from the capture before | in a list of URLs |
| `firstCapturedAt`, `firstArchiveUrl` | The URL's first capture among those the dates and filters keep; the fields above are then its latest capture's | in a list of URLs |
| `target` | The line of your input the record was found for | always |
| `daysFromDate` | How many days after the date you asked for the capture was made; negative when before | with **Closest to a date** |
| `scrapedAt` | When the run read the record, as a UTC date | always |
| `missing` | What the record lacks, and why | always; empty when nothing is missing |

### What is it used for?

- **Recover a site's old pages:** list the URLs the Wayback Machine holds of a domain, before a migration, for redirects, or to see what an expired domain used to hold.
- **See how a page changed:** one capture each time the content changed, with the page as markdown, for a pricing page, terms of service or a product page.
- **Show what a page said on a date:** the captures between two dates, with links to the archived page.
- **Build text over time:** a page's text once a month or once a year, for research or as input to a language model.

### How to use Wayback Machine Scraper

1. Create a free Apify account and open Wayback Machine Scraper in Apify Console.
2. In **URLs or domains**, enter what to read, one per line, with or without https:// and www.
3. In **Read**, choose the page itself, the addresses under it, the whole host, or the whole domain (whatever path the line has).
4. Set **Captures per URL or domain**, and, if you want, the dates, **One capture per**, **Page status** and **Content**.
5. To get the archived pages too, choose text, markdown or HTML in **Read each capture's page**.
6. To get a site's URLs, each once, set **List** to URLs.
7. Click **Start**, then download the records as JSON, CSV, Excel or HTML, or read them through the API.

### How much does it cost to scrape the Wayback Machine?

Wayback Machine Scraper is priced per event, with no usage fees on top:

| Event | Price | When |
|---|---|---|
| Capture | $0.001 | One capture stored without its page |
| Capture with its page | $0.003 | One capture stored with the page it holds, in place of the capture event |
| URL | $0.001 | One URL stored, in a list of URLs |

So 1,000 captures of a page cost $1.00, 120 captures with their pages $0.36, and 5,000 URLs of a site $5.00.

Prices shown are for Apify's free plan; on paid plans they are up to 30% lower. The prefilled input (100 captures of one page, the first 5 with their page as markdown) costs at most $0.11, plus the platform's $0.00005 for the run's start. Apify's free plan gives you $5 of usage a month, which covers about 5,000 captures, or 1,650 captures with their pages.

An address without captures stores nothing and costs nothing, a capture whose page could not be given is charged as a capture, and a run stops before your maximum total charge.

### Input recipes

Every capture of a page since 2020, one a month:

```json
{
  "urls": ["https://www.nasa.gov/"],
  "from": "2020",
  "onePer": "month"
}
```

How a page changed: 50 captures, one each time its content changed, each with its page as markdown:

```json
{
  "urls": ["https://www.nasa.gov/"],
  "capturesPerUrl": 50,
  "onePer": "content",
  "content": "markdown",
  "pagesPerUrl": 50
}
```

A site's URLs captured since 2025, each once, up to 200:

![A site's URLs since 2025, each once: iana.org's home page with 2,757 captures and 1,079 versions, and its about pages, each with its first and latest capture.](https://assets.kaleidoscopelabs.io/afy/wayback/urls.0bdaa862.png)

```json
{
  "urls": ["iana.org"],
  "scope": "host",
  "list": "urls",
  "from": "2025",
  "maxUrls": 200
}
```

### Output example

![One capture record, shortened: which capture, what the site answered, the two links, and the page itself as markdown.](https://assets.kaleidoscopelabs.io/afy/wayback/record.4f05cdef.png)

A capture with its page as markdown (shortened):

```json
{
  "url": "http://www.nasa.gov:80/",
  "timestamp": "19961231235847",
  "capturedAt": "1996-12-31T23:58:47Z",
  "status": 200,
  "mimeType": "text/html",
  "digest": "MGIGF4GRGGF5GKV6VNCBAXOE3OR5BTZC",
  "length": 1811,
  "archiveUrl": "https://web.archive.org/web/19961231235847/http://www.nasa.gov:80/",
  "rawUrl": "https://web.archive.org/web/19961231235847id_/http://www.nasa.gov:80/",
  "isRevisit": false,
  "target": "https://www.nasa.gov/",
  "title": "NASA Home Page/Mars Pathfinder Sites",
  "markdown": "# Welcome to NASA and the Mars Pathfinder Mission!\n\nThis is a substitute for the usual NASA Home Page. …",
  "pageLength": 6639,
  "contentTruncated": false,
  "scrapedAt": "2026-11-16T02:16:10Z",
  "missing": []
}
```

A URL in a list of a site's URLs (shortened): its latest capture, and what the Wayback Machine holds of it:

```json
{
  "url": "https://www.iana.org/",
  "timestamp": "20261114170826",
  "capturedAt": "2026-11-14T17:08:26Z",
  "status": 200,
  "urlKey": "org,iana)/",
  "captures": 2757,
  "versions": 1079,
  "firstTimestamp": "20250101040328",
  "firstCapturedAt": "2025-01-01T04:03:28Z",
  "firstArchiveUrl": "https://web.archive.org/web/20250101040328/http://www.iana.org/",
  "target": "iana.org",
  "scrapedAt": "2026-11-16T02:18:00Z",
  "missing": []
}
```

### Integrations and API

- **Make, Zapier, n8n:** start a run with a URL and get its captures when it finishes.
- **Google Sheets, webhooks, the Apify API and clients** for JavaScript and Python.
- **AI agents:** through Apify's MCP server, an agent can call the Actor as a tool.

Run a recipe and get its records in one call (with your Apify API key in the APIFY_TOKEN variable):

```bash
curl -X POST "https://api.apify.com/v2/acts/kaleidoscopelabs~wayback-machine-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"urls": ["https://www.nasa.gov/"], "capturesPerUrl": 100}'
```

### Building on this Actor

- **Output stability:** fields are added, never renamed or removed without a new major version; every change is in the changelog, and a breaking one is announced here before the build.
- **What a run's end means:** an address that could not be read to its end is named in RUN_PROGRESS, and RUN_SUMMARY then says the run is not complete. A run that stores nothing because the Wayback Machine did not answer fails; an input the Actor cannot read ends at once, with the reason and nothing charged.
- **`missing`:** each entry names a part and a reason: notGiven, unexpectedValue, notText, tooLarge or notRead (a page that could not be read; the run is then not complete). The output schema describes each.
- **Notice:** price changes follow Apify's 14-day notice; retiring the Actor is announced here first.

### For AI agents

AI agents can call it through the Apify MCP server ([setup prompt for your agent](https://mcp.apify.com/?tools=kaleidoscopelabs/wayback-machine-scraper)). Connect an MCP client to `https://mcp.apify.com?tools=kaleidoscopelabs/wayback-machine-scraper` with your Apify API key, then ask, for example, "What did https://www.nasa.gov/ say in January 1999?"

- **Minimal input:** `{"urls": ["https://www.nasa.gov/"], "capturesPerUrl": 10}`: the page's first ten captures.
- **Fields to read:** `capturedAt`, `status` and `archiveUrl` for a capture; `markdown` or `text` for its page; `captures` and `firstCapturedAt` in a list of URLs.
- **What to know:** an empty dataset with `inputError` set in RUN_SUMMARY means the input could not be read, not that nothing was captured. A capture chosen for its page and stored without one names `content` in `missing`.

Did it save you time? A rating on this page helps others find it; an Issue tells us what to fix.

### FAQ

#### Is there an official Wayback Machine API?

Yes: the Wayback Machine has a public capture index, and this Actor reads it. The Actor adds the paging over large sites, the page's text and markdown, the list of a site's URLs, and records that say what is missing.

#### Is it legal to scrape the Wayback Machine?

The Actor reads the Wayback Machine's public capture index and public captures, the same data its website shows to any visitor, without signing in. What you do with the captures is your responsibility: archived pages belong to their publishers, and their content can be protected by copyright.

#### Does it collect personal data?

A record holds a captured address and facts about the capture, and, when you ask for pages, the page's title, text, markdown or HTML as it was published. An address can itself name a person, for example a profile page's path, and a page can hold whatever its publisher wrote, personal data included. If you process such data, laws such as the GDPR or KVKK can apply to you; make sure you have a lawful reason.

#### What happens to an address without captures?

It stores no record and costs nothing; RUN_PROGRESS names it by its input line.

#### In what order are the records?

Oldest first for each address, with the captures that have their page stored last: sort by `timestamp` for date order. A list of URLs is ordered by host, then path.

### Limits

- The Wayback Machine holds what it captured: a page it never visited, or one its publisher had excluded, has no captures, and the run says which addresses those are.
- A page is read from its captured HTML: content a page loaded with scripts after it opened is not in it.
- A page larger than 5 MB is not read; text and markdown are stored up to 1 MB and HTML up to 2 MB, and `contentTruncated` says when a part was cut.
- A whole host or domain answers slowly, and a list of URLs reads every capture of the site: a very large site can take longer than a run's hour. A run whose time ran out says so; resurrect it to continue. An hour stores about 800,000 to 1.7 million captures of a domain, as fast as the Wayback Machine answers, and the default 512 MB of memory holds about 3 million in one run with its resurrections: for more, split the dates over runs or raise the run's memory.
- With **Content** set to PDF files, a capture that repeats a PDF unchanged is not listed.
- With **Content** set to HTML pages and no **Captured from**, a list of URLs leaves out a URL the Wayback Machine lists no content type for, such as a style sheet captured unchanged; the log says how many.

### Support and feedback

Open an issue on the Actor's Issues tab: we answer within 24 hours. A run that ended short of its work gives a Ref in its last message: quote it, and we can find the cause without your data.

*Wayback Machine Scraper is an independent tool, not affiliated with, endorsed by or sponsored by the Internet Archive. Wayback Machine and Internet Archive are trademarks of the Internet Archive.*

# Changelog

This Actor's version history is a separate document: https://apify.com/kaleidoscopelabs/wayback-machine-scraper/changelog.md

# Actor input Schema

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

The addresses whose captures to list, one per line: a page (https://example.com/pricing) or a site (example.com). With or without https:// and www. give the same captures. A line that is not a web address is skipped and said in the log. Up to 1,000 per run.

## `scope` (type: `string`):

How much each line covers: the page itself (page), every address that begins with it (prefix), every page of its host (host), or the host and all its subdomains (domain). Host and domain read the whole site, whatever path the line has.

## `list` (type: `string`):

What the run stores: every capture (captures), or each URL the Wayback Machine holds under a line once (urls), with its first and latest capture, how many captures it has and how many versions of its content. Use urls with Addresses under this one, The whole host or The whole domain to get a site's pages. A URL list reads every capture of the site: one with millions of captures takes long, and the dates narrow it.

## `capturesPerUrl` (type: `integer`):

How many captures the run stores for each line, oldest first; 0 stores every capture, which for a whole site can be very many.

## `maxUrls` (type: `integer`):

With List set to urls: how many URLs the run stores for each line, in the order of the Wayback Machine's index (by host, then path); 0 stores every URL.

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

Only captures made on or after this date: a year (2020), a month (2020-03) or a day (2020-03-15). Empty: from the first capture.

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

Only captures made on or before this date: a year (2020), a month (2020-03) or a day (2020-03-15). Empty: up to the latest capture.

## `closestTo` (type: `string`):

Store one capture of each page: the one closest to this date, before or after it, among those the status and content filters keep. A year (2020), a month (2020-03) or a day (2020-03-15); a year or a month means its first day. Works with the scope This page; the date range and One capture per are not used with it. Empty: list captures.

## `onePer` (type: `string`):

Thin each address's captures: every capture (capture), the first of each hour, day, month or year, or one each time the content changed from the capture before (content).

## `statuses` (type: `string`):

Which captures to keep by the HTTP status the site answered with when it was captured: pages that loaded (ok), redirects, errors (4xx and 5xx), pages that were gone (notFound: 404 and 410; a capture that repeats one unchanged is not listed), or all.

## `types` (type: `string`):

HTML pages only (pages), PDF files only (pdf; a capture that repeats a PDF unchanged is not listed), or every captured file: images, scripts, style sheets and the rest (all).

## `content` (type: `string`):

Store the page a capture holds with it: its title and its text, its markdown, its HTML as captured, or all three. Reading a page takes a few seconds for each capture, so it is done for the first captures of each line only (see Pages per URL or domain); pair it with One capture per month or content change to spread them over time. None lists the captures only.

## `pagesPerUrl` (type: `integer`):

With Read each capture's page: how many of each line's captures are stored with their page, oldest first. The line's other captures are stored without it.

## Actor input object example

```json
{
  "urls": [
    "https://www.nasa.gov/"
  ],
  "scope": "page",
  "list": "captures",
  "capturesPerUrl": 100,
  "maxUrls": 1000,
  "onePer": "capture",
  "statuses": "ok",
  "types": "pages",
  "content": "markdown",
  "pagesPerUrl": 5
}
```

# Actor output Schema

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

One record per capture in the run's default dataset: its date, status, content type, digest, size and archive links, its page when asked for, and what the record lacks; or one record per URL in a run that lists URLs.

## `summary` (type: `string`):

What the run did: the captures, pages and URLs stored, the addresses without captures, not shown, cut by the limit or not read, and the Ref to quote in an issue.

## `progress` (type: `string`):

The addresses the run could not read and what it found for those without records, by input line: kept as the run goes, so a run moved or resurrected counts them once.

# 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": [
        "https://www.nasa.gov/"
    ],
    "scope": "page",
    "list": "captures",
    "capturesPerUrl": 100,
    "maxUrls": 1000,
    "onePer": "capture",
    "statuses": "ok",
    "types": "pages",
    "content": "markdown",
    "pagesPerUrl": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("kaleidoscopelabs/wayback-machine-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 = {
    "urls": ["https://www.nasa.gov/"],
    "scope": "page",
    "list": "captures",
    "capturesPerUrl": 100,
    "maxUrls": 1000,
    "onePer": "capture",
    "statuses": "ok",
    "types": "pages",
    "content": "markdown",
    "pagesPerUrl": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("kaleidoscopelabs/wayback-machine-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 '{
  "urls": [
    "https://www.nasa.gov/"
  ],
  "scope": "page",
  "list": "captures",
  "capturesPerUrl": 100,
  "maxUrls": 1000,
  "onePer": "capture",
  "statuses": "ok",
  "types": "pages",
  "content": "markdown",
  "pagesPerUrl": 5
}' |
apify call kaleidoscopelabs/wayback-machine-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kaleidoscopelabs/wayback-machine-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/61BbX06e8wsIQxcPI/builds/2UiNJdktkyruhQqwf/openapi.json
