# Wayback Machine History & Archived URLs Scraper (`maxkang/wayback-machine-history`) Actor

Bulk Wayback Machine (archive.org) lookup: first and last capture, website age, capture history per year, every snapshot of a page, or all archived URLs of a domain for SEO and content recovery. Official CDX API, no proxy.

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

## Pricing

from $5.00 / 1,000 url summarizeds

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 History & Archived URLs Scraper

**Bulk Wayback Machine (archive.org) lookups in three modes:**

1. **Summary**: one row per website or page: first capture, last capture, **website age (years online)**, captures per year, links to the first and latest archived copy.
2. **Snapshots**: every archived copy of a page, one per day / month / year or **only when the content changed**, with direct `web.archive.org` links.
3. **Archived URLs**: **every page URL the Wayback Machine ever saw on a domain**, cleaned (HTML only, no `?utm=` noise). Perfect for SEO migrations, 404 recovery, finding deleted pages and old content.

Built on the official **Wayback CDX API**. No proxy, no browser, no login.

### Why this Actor

- ✅ **Three jobs in one tool**: website age checker, snapshot history, and archived URL extractor.
- ✅ **Clean output**: only successful captures by default, query-string and asset noise removed in URL mode, ISO dates, direct archive links.
- ✅ **Change detection**: `collapse: change` keeps a snapshot only when the page's content hash changed, so you see real edits (pricing changes, terms updates, redesigns).
- ✅ **Bulk and polite**: retries with backoff when archive.org rate-limits, so runs finish instead of failing.
- ✅ **Cheap**: pay per summary or per row; no start fee.

### Use cases

- **SEO**: recover old URLs after a migration, build 301 redirect maps, find deleted pages with backlinks, audit an expired domain before buying it.
- **Due diligence and lead scoring**: how old is this business website? Is it still maintained (`daysSinceLastCapture`)?
- **Competitor monitoring**: snapshots of a competitor's pricing page, one per month or only when it changed.
- **Research and journalism**: when did a page first appear, how often did it change?
- **Legal / compliance**: archived versions of terms, privacy policies and claims.

### Input examples

Summary for a list of domains:

```json
{ "urls": ["apify.com", "franklinbbq.com"], "mode": "summary" }
```

Pricing page history, only when it changed:

```json
{ "urls": ["apify.com/pricing"], "mode": "snapshots", "collapse": "change" }
```

All archived pages of a domain (for redirects / content recovery):

```json
{ "urls": ["franklinbbq.com"], "mode": "urls", "maxRowsPerTarget": 5000 }
```

### Output

Summary row:

```json
{
  "target": "apify.com",
  "status": "ok",
  "firstCaptureAt": "2007-05-31T10:15:38+00:00",
  "lastCaptureAt": "2026-11-21T14:19:23+00:00",
  "yearsOnline": 19.5,
  "daysSinceLastCapture": 0,
  "daysWithCaptures": 870,
  "activeYears": 18,
  "daysWithCapturesPerYear": { "2007": 3, "2008": 1, "...": 0 },
  "firstCaptureUrl": "https://web.archive.org/web/20070531101538/http://apify.com:80/",
  "lastCaptureUrl": "https://web.archive.org/web/20261121141923/https://apify.com/"
}
```

Snapshot / URL row:

```json
{
  "target": "apify.com/pricing",
  "url": "https://www.apify.com/pricing",
  "capturedAt": "2017-10-27T07:20:08+00:00",
  "archiveUrl": "https://web.archive.org/web/20171027072008/https://www.apify.com/pricing",
  "statusCode": "200",
  "mimeType": "text/html",
  "lengthBytes": 5816,
  "digest": "WJX5I2L46FZCT2Y4YGPCZKHFX5M4R2EU"
}
```

### Pricing

- **Summary: $0.005 per URL or domain** (`not-archived` results count; errors are free).
- **Snapshots / archived URLs: $0.0005 per row** ($0.50 per 1,000 rows). Use `maxRowsPerTarget` and date filters to control cost.

Set *maximum cost per run* to cap spend; the Actor stops cleanly at the cap.

### Limits and honest notes

- Data comes from the Internet Archive. Sites that block archiving, or pages never crawled, return `not-archived`.
- `daysWithCaptures` counts days with at least one capture (the CDX API does not give exact capture totals cheaply).
- Very large domains in `urls` mode can take a few minutes; archive.org is slow on domain-wide queries.
- This Actor returns archive metadata and links, not the archived page content.

### FAQ

**Do I need a proxy?** No.

**How do I check a website's age in bulk?** Use `mode: summary` and read `firstCaptureAt` / `yearsOnline`. Combine with *Bulk Domain WHOIS, DNS, SSL & Email Security Checker* for the registration date.

**Can I monitor a page for changes?** Yes. Schedule `mode: snapshots` with `collapse: change` and `from` set to last week.

**Something is wrong?** Open an issue with the URL.

### More tools from this developer

- [Contact Details Scraper: Emails, Phones & Lead Signals](https://apify.com/maxkang/website-contact-lead-qualifier): emails, phones and socials from business websites with source pages and lead signals.
- [Careers Page Jobs Scraper & Hiring Signals](https://apify.com/maxkang/company-hiring-signals): open jobs from Greenhouse, Lever, Ashby, Workable, SmartRecruiters and Recruitee plus hiring signals.
- [Bulk Domain WHOIS, DNS, SSL & Email Security Checker](https://apify.com/maxkang/domain-whois-dns-checker): registrar, age, expiry, DNS, SPF/DMARC and SSL in one row.

# Actor input Schema

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

One per line: example.com, example.com/pricing or https://example.com/blog/post.

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

summary = one row per URL (first/last capture, years online, captures per year). snapshots = one row per capture of the URL. urls = every archived page URL of the domain (great for SEO, redirects and content recovery).

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

exact = only this URL. prefix = this URL and everything under it. host = the whole host. domain = the host and all subdomains. In 'urls' mode, exact is treated as domain.

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

Only for 'snapshots' mode. 'change' keeps a snapshot only when the page content changed.

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

Optional start date for 'snapshots' and 'urls' modes.

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

Optional end date for 'snapshots' and 'urls' modes.

## `onlyStatus200` (type: `boolean`):

Skip redirects and error pages.

## `htmlOnly` (type: `boolean`):

Skip images, CSS, JS and other files.

## `skipQueryStrings` (type: `boolean`):

Drops tracking and session variants such as ?utm_source=… so you get clean page URLs.

## `maxRowsPerTarget` (type: `integer`):

Limit for 'snapshots' and 'urls' modes.

## `maxConcurrency` (type: `integer`):

Keep it low (2–4). archive.org rate-limits aggressive clients.

## Actor input object example

```json
{
  "urls": [
    "apify.com",
    "franklinbbq.com"
  ],
  "mode": "summary",
  "matchType": "exact",
  "collapse": "day",
  "onlyStatus200": true,
  "htmlOnly": true,
  "skipQueryStrings": true,
  "maxRowsPerTarget": 1000,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

First/last capture, years online and captures per year.

## `rows` (type: `string`):

One row per snapshot or archived URL with its archive link.

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

All fields.

## `runSummary` (type: `string`):

Targets, rows, not archived and errors.

# 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",
        "franklinbbq.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maxkang/wayback-machine-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 = { "urls": [
        "apify.com",
        "franklinbbq.com",
    ] }

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

```

## MCP server setup

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