# Wayback Machine Scraper: Snapshots, Archived URLs, Page Text (`tali-works/wayback-machine-scraper`) Actor

Get the Internet Archive history of any URL or every archived URL of a domain, with capture dates, status, MIME type and archive links. Optionally extract archived page title and text. $1 per 1,000 snapshots.

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

## Pricing

Pay per event

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 Scraper: Snapshot History, Archived URLs & Page Text

Export data from the **Internet Archive's Wayback Machine** at scale. Get the **full snapshot history of any URL** (capture dates, HTTP status, MIME type, size, content digest and archive links), or **discover every archived URL of a domain** (old pages, removed content, PDFs, legacy sitemaps). You can also **extract the title, meta description and clean text of each archived page**. **$1 per 1,000 snapshots**, plus $2 per 1,000 pages when you turn on text extraction. No login or proxies needed.

### Why this Actor

- **Much cheaper:** $1 per 1,000 rows versus $3.50–$5 for similar Actors.
- **Two modes:** snapshot history of exact URLs, or all unique archived URLs under a domain.
- **Smart thinning:** one capture per hour, day, month or year, or only when the content changed. Filter by date range, HTTP 200 only, or MIME type.
- **Archived page text:** for content recovery, change tracking, SEO audits and AI datasets.
- **Handles big sites:** pages through the official CDX API automatically, with retries for the Archive's rate limits.

### Use cases

SEO migrations and lost-content recovery, competitor pricing/page history, brand and legal evidence, domain due diligence, research datasets, finding old URLs for redirects.

### Input

| Field | Description |
|---|---|
| `urls` | URLs or domains. |
| `mode` | `snapshots` (default) or `domain`. |
| `from` / `to` | Date range. |
| `collapse` | `none`, `hour`, `day`, `month`, `year`, `content`. |
| `onlySuccessful` | HTTP 200 only (default on). |
| `mimeType` | e.g. `text/html`, `application/pdf`. |
| `includeContent` | Extract archived page title and text (extra $0.002/page). |
| `maxResultsPerUrl` / `maxTotalResults` | Cost caps. |

```json
{ "urls": ["https://apify.com/pricing"], "mode": "snapshots", "collapse": "month", "from": "2020-01-01", "includeContent": true }
```

### Output

```json
{
  "url": "https://apify.com/", "timestamp": "20200109130705", "capturedAt": "2020-01-09T13:07:05+00:00",
  "archiveUrl": "https://web.archive.org/web/20200109130705/https://apify.com/",
  "rawArchiveUrl": "https://web.archive.org/web/20200109130705id_/https://apify.com/",
  "statusCode": 200, "mimeType": "text/html", "digest": "D4P2GPUK3PEGEFYQFUENG7MNTQI3ZRN4", "length": 29306,
  "title": "Web Scraping, Data Extraction and Automation · Apify",
  "metaDescription": "Apify extracts data from websites, crawls lists of URLs and automates workflows on the web...",
  "text": "Web Scraping, Data Extraction and Automation · Apify\nProducts\n...", "textLength": 3853
}
```

### Pricing

- **$1.00 per 1,000 snapshots/URLs** ($0.001 each).
- **$2.00 per 1,000 archived pages** with text extraction (only if enabled).
- $0.00005 per run start.

### Notes

The Internet Archive is a non-profit and rate-limits heavy use; very large domains can take a while. Please use the data responsibly.

# Actor input Schema

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

Pages (e.g. https://apify.com/pricing) or domains (e.g. apify.com).

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

Snapshot history of an exact URL, or discover every archived URL (pages, files, old sitemaps) under a domain.

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

Only captures on or after this date.

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

Only captures on or before this date.

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

Snapshot mode: thin out captures, e.g. one per month, or only when the page content changed.

## `onlySuccessful` (type: `boolean`):

Skip redirects, 404s and errors.

## `mimeType` (type: `string`):

Optional, e.g. text/html or application/pdf.

## `includeContent` (type: `boolean`):

Download each archived HTML page and add its title, meta description and clean text (extra charge per page).

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

Default 1,000.

## `maxTotalResults` (type: `integer`):

Hard cap for the whole run, to control cost.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "mode": "snapshots",
  "collapse": "none",
  "onlySuccessful": true,
  "includeContent": false,
  "maxResultsPerUrl": 100
}
```

# Actor output Schema

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

All results in the default dataset.

# 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"
    ],
    "maxResultsPerUrl": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("tali-works/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"],
    "maxResultsPerUrl": 100,
}

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

```

## MCP server setup

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