# Wayback Machine Scraper - Archived URLs, Snapshots & History (`scrolahdata/wayback-machine-scraper`) Actor

Wayback Machine scraper for archive.org: every archived URL of a domain (waybackurls), all snapshots of a page or only its changes, website history (first capture, captures per year) and archived page text. From $0.30 per 1,000 URLs.

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

## Pricing

from $0.24 / 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.
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

## Wayback Machine Scraper — Archived URLs, Snapshots & Website History (archive.org)

Get data from the **Internet Archive's Wayback Machine** for any website, through archive.org's official public APIs:

- 🗂️ **Every archived URL of a domain** — like `waybackurls` / `gau`: all pages, PDFs, images and files ever archived, with first capture date
- 📸 **All snapshots of a page** — every capture, or **only the captures where the page changed**, one per day / month / year
- 📈 **Website history** — first and last capture, archive age, **captures per year**, gaps
- 🔗 **Archive links** — a Wayback Machine link and a raw-file link for every capture, ready to open or download

**$0.30 per 1,000 archived URLs or snapshots.** Website history $2 per 1,000 sites.

### Use cases

- **SEO & expired domains** — recover the old URLs of a domain to build 301 redirect maps, find lost backlinks targets and check a domain's history before buying it
- **Content recovery** — find every archived copy of deleted pages and old blog posts, with direct links
- **Competitor research** — how a competitor's pricing page, homepage or product pages changed over time
- **Security & bug bounty recon** — list historical endpoints, parameters, JS files and forgotten subdomains (`includeSubdomains`)
- **Domain age & trust checks** — when was a website first seen, and has it been active every year?
- **Research & journalism** — prove what a page said on a given date, with Wayback Machine links

### Input

Archived URLs of a domain (only HTML pages that returned 200):

```json
{
  "urls": ["example.com"],
  "mode": "archivedUrls",
  "statusCodes": ["200"],
  "mimeTypes": ["html"],
  "maxResultsPerUrl": 10000
}
```

Only the captures where a page changed, since 2023:

```json
{
  "urls": ["https://apify.com/pricing"],
  "mode": "snapshots",
  "snapshotCollapse": "changes",
  "fromDate": "2023-01-01"
}
```

Website history: `{"urls": ["apify.com", "example.org"], "mode": "history"}`

### Output

Archived URL:

```json
{
  "type": "archivedUrl",
  "input": "apify.com",
  "url": "http://www.apify.com/",
  "firstCapturedAt": "2007-05-31T10:15:38Z",
  "statusCode": "200",
  "mimeType": "text/html",
  "archiveUrl": "https://web.archive.org/web/20070531101538/http://www.apify.com:80/"
}
```

Website history:

```json
{
  "type": "history",
  "input": "apify.com",
  "isArchived": true,
  "firstCapture": "2007-05-31T10:15:38Z",
  "lastCapture": "2026-11-16T22:02:53Z",
  "archiveAgeYears": 19.5,
  "totalCaptures": 1600,
  "capturesPerYear": {"2007": 3, "2018": 229, "2019": 343, "2024": 262, "2025": 177},
  "yearsWithoutCaptures": [2009, 2010]
}
```

Snapshots carry `capturedAt`, `statusCode`, `mimeType`, `length`, `digest` (same digest = identical content), `archiveUrl` and `rawArchiveUrl` (the original file without the Wayback toolbar).

### Tips & limits

- Filters run inside the Wayback Machine, so you only pay for what you keep: status codes, content types (`html`, `pdf`, `images`, `javascript`, `json` ...), a URL regex and a date range.
- Large domains can have millions of archived URLs — set **Max results** to what you need. Results are paged automatically.
- For giant sites (github.com, wikipedia.org ...) a whole-domain query with filters can time out inside the Wayback Machine; use a URL prefix such as `github.com/apify/` or a date range instead. Failed queries are not charged.
- Lists come straight from the Wayback CDX index, so even 100,000 URLs take only minutes. The Actor paces its requests to stay friendly to the Internet Archive.
- Data comes from archive.org's public CDX and availability APIs. Please use it responsibly — the Internet Archive is a non-profit.

### Pricing

- **Archived URL or snapshot** — $0.30 per 1,000 rows
- **Website history** — $2 per 1,000 websites

Errors are free. Discounts for Apify Silver, Gold and higher plans.

### Integrations & API

- **API** — run it from Python, Node.js or any language with the Apify API / `apify-client`; export JSON, CSV or Excel.
- **Schedules** — run weekly to log new captures of competitor pages.
- **Zapier, Make, n8n, Google Sheets, webhooks** — send archived URLs to a sheet or your SEO tools.
- **AI agents (MCP)** — use it from Claude, ChatGPT, Cursor or any MCP client through the Apify MCP server.

### FAQ

**Do I need an archive.org account or API key?** No.

**Is this the same as waybackurls?** The *Archived URLs* mode returns the same kind of list (unique URLs from the Wayback CDX index), with filters, dates and archive links, in the cloud and exportable.

**Why is a URL missing?** The Wayback Machine only has pages it crawled; pages blocked by robots.txt or excluded on request are not available.

### More from ScrolahData

- [Sitemap Extractor](https://apify.com/scrolahdata/sitemap-extractor)
- [Bulk URL Status Checker](https://apify.com/scrolahdata/bulk-url-status-checker)
- [Domain WHOIS & DNS Checker](https://apify.com/scrolahdata/domain-whois-dns-checker)
- [SEO Meta Tags Extractor](https://apify.com/scrolahdata/seo-meta-tags-extractor)
- [Tech Stack Detector](https://apify.com/scrolahdata/tech-stack-detector)

# Actor input Schema

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

Domains (example.com), URL prefixes (example.com/blog/) or exact page URLs. Wayback Machine links (web.archive.org/web/...) also work.

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

Archived URLs = like waybackurls / gau, one row per unique URL. Snapshots = every capture of a URL. History = one summary row per website.

## `includeSubdomains` (type: `boolean`):

For a bare domain, also list URLs of its subdomains (blog.example.com, shop.example.com ...).

## `exactUrlOnly` (type: `boolean`):

Do not expand a domain or prefix - only the exact URL given.

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

Keep only captures with these status codes, e.g. 200, 301, 404. Empty = all.

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

html, pdf, images, javascript, css, json or any MIME type (application/zip). Empty = all.

## `urlRegex` (type: `string`):

Optional regular expression the archived URL must match, e.g. .*.(pdf|docx)$ or .*/blog/.\*

## `fromDate` (type: `string`):

Optional, e.g. 2015 or 2020-06-01.

## `toDate` (type: `string`):

Optional, e.g. 2019-12-31.

## `snapshotCollapse` (type: `string`):

Reduce the capture list. 'Only captures where the page changed' skips identical consecutive copies.

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

Max archived URLs or snapshots per input.

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

Optional.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "mode": "archivedUrls",
  "includeSubdomains": true,
  "exactUrlOnly": false,
  "statusCodes": [],
  "mimeTypes": [],
  "snapshotCollapse": "none",
  "maxResultsPerUrl": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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"
    ],
    "statusCodes": [],
    "mimeTypes": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrolahdata/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": ["apify.com"],
    "statusCodes": [],
    "mimeTypes": [],
}

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

```

## MCP server setup

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