# Wayback Machine Scraper: Archive.org Snapshots & URLs (`berryish_pillar/wayback-machine-snapshots`) Actor

Get every Internet Archive (Wayback Machine) capture of a URL, one per day, month or year or only when content changed, with archive links, status and content hash. List all archived URLs of a domain, and optionally extract title, description and text from old pages. From $0.30 per 1,000 rows.

- **URL**: https://apify.com/berryish_pillar/wayback-machine-snapshots.md
- **Developed by:** [berryish_pillar](https://apify.com/berryish_pillar) (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

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: archived snapshots, old URLs and page history

Get the **Internet Archive (Wayback Machine) history of any URL**: every capture, or one per **day, month or year**, or **only captures where the content changed**, each with a ready-to-open archive link, HTTP status, MIME type, size and content hash. Switch to **archived URLs mode** to list **every URL the archive holds for a domain** (with its first capture date), and optionally **extract title, meta description, H1s and text from old pages**.

**From $0.30 per 1,000 rows. No $0.02 start fee, no monthly rental.**

### What can it do?

- 🕰️ **Snapshot history**: all captures of a URL, between two dates, thinned to one per hour/day/month/year, or only content changes (`collapse: content`), with `contentChanged` flags.
- 🗺️ **Archived URL inventory**: every distinct URL ever archived for a domain, host or URL prefix, with first capture date and status. Recover old pages, build 301 redirect maps, research expired domains.
- 📄 **Old page content** (optional): opens the raw archived copy and adds title, meta description, H1s, plain text, word count and link count. Great for "what did their pricing page say in 2022?" and for AI datasets.
- 🎯 **Filters**: from/to dates, HTTP 200 only, MIME type (text/html, application/pdf…), newest first, per-URL and total caps.
- 🙏 **Gentle on a non-profit**: 1 request per second by default, automatic back-off on 429.

### Who uses this?

- **SEO teams**: find lost URLs to redirect after a migration, check an expired domain's past before buying it, see when a competitor changed titles or content.
- **Competitive and market intelligence**: track a competitor's pricing, features or messaging over the years.
- **Journalists, researchers and OSINT**: prove what a page said on a date, with a citable archive link.
- **Legal and compliance**: historical evidence of terms, claims and disclosures.
- **AI and data teams**: historical web text for training and evaluation sets.

### How to use it

1. Add **URLs or domains**.
2. Pick **What to get**: *Snapshots of each URL* or *All archived URLs of a domain*.
3. Set **one per** (day, month, year, content change), dates and limits. Turn on **Extract page content** if you need text.
4. Click **Start** and export JSON, CSV or Excel, or use the API.

#### Input example (snapshots)

```json
{
  "urls": ["https://apify.com", "https://www.python.org"],
  "mode": "snapshots",
  "collapse": "year",
  "maxResultsPerUrl": 25,
  "includeContent": false
}
```

#### Output example (snapshot with content)

```json
{
  "input": "https://apify.com",
  "originalUrl": "https://apify.com/",
  "timestamp": "20261117100716",
  "capturedAt": "2026-11-17T10:07:16Z",
  "archiveUrl": "https://web.archive.org/web/20261117100716/https://apify.com/",
  "rawArchiveUrl": "https://web.archive.org/web/20261117100716id_/https://apify.com/",
  "statusCode": 200,
  "mimeType": "text/html",
  "digest": "LTSEW2IFSVLGAKTXQCJXMXCX6FV76JBM",
  "lengthBytes": 93232,
  "contentChanged": null,
  "page": {
    "title": "Apify: Marketplace of ready-to-run tools for AI",
    "metaDescription": "Thousands of tools to automate your business. Get real-time web data, track competitors, generate leads, and integrate your apps and AI agents.",
    "h1": ["123,192 tools for your AI"],
    "text": "Skip to content Get started Log in Solutions …",
    "wordCount": 1190,
    "linkCount": 138
  },
  "scrapedAt": "2026-11-20T04:19:04Z"
}
```

#### Output example (archived URLs mode)

```json
{
  "input": "books.toscrape.com",
  "url": "https://books.toscrape.com/?hl=en-GB",
  "firstCapturedAt": "2025-12-28T19:00:45Z",
  "firstArchiveUrl": "https://web.archive.org/web/20251228190045/https://books.toscrape.com/?hl=en-GB",
  "statusCode": 200,
  "mimeType": "text/html"
}
```

RUN_SUMMARY in the key-value store has, per input, the number of rows and the first and last capture dates.

### How much does it cost?

| Event | Price |
|---|---|
| Snapshot (snapshots mode) | **$0.0005** ($0.50 per 1,000) |
| Archived URL (archived URLs mode) | **$0.0003** ($0.30 per 1,000) |
| Page content extracted (optional) | **$0.002** per page |
| Actor start | $0.00005 |

Examples: yearly history of 100 URLs over 20 years ≈ 2,000 snapshots = **$1**. Monthly pricing-page history with text for 3 competitors over 5 years = 180 pages ≈ **$0.45**.

### Tips and limits

- The archive only has what it crawled; some sites ask to be excluded and return no captures (reported in RUN_SUMMARY, not charged).
- Archived URLs mode on large domains is slow on the archive's side (tens of seconds per page of results). Use a URL prefix (e.g. `example.com/blog/` with match type *prefix*) and the MIME filter to narrow it.
- Content extraction reads the raw archived HTML (`id_` URL); JavaScript-rendered content isn't executed.

### Is it legal? Responsible use

The Actor uses the Internet Archive's public, documented CDX API and archived copies, identifies itself, rate-limits itself to 1 request per second by default and backs off when asked. It collects no personal data beyond what the archived public pages contain; respect the original publishers' copyright. Consider [donating to the Internet Archive](https://archive.org/donate) if it's useful to you.

### Related tools

- [Sitemap URL Extractor](https://apify.com/berryish_pillar/sitemap-url-extractor): the site's current URLs, to compare with archived ones.
- [SEO Site Audit](https://apify.com/berryish_pillar/seo-site-audit): audit the live pages.
- [Website Screenshot API](https://apify.com/berryish_pillar/website-screenshot): capture today's version.

# Actor input Schema

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

Snapshots mode: page URLs (https://example.com/pricing). Archived URLs mode: domains (example.com) or URL prefixes.

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

Snapshots: the capture history of each URL. Archived URLs: every distinct URL the archive holds for a domain or prefix, with its first capture.

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

Thin out captures: keep the first per hour/day/month/year, or only captures whose content changed.

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

exact = that URL only; prefix = everything under the path; host = the host name; domain = the host and all subdomains. Default: exact for snapshots, domain for archived URLs.

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

YYYY, YYYY-MM or YYYY-MM-DD.

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

YYYY, YYYY-MM or YYYY-MM-DD.

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

Skip redirects, 404s and errors the crawler recorded.

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

e.g. text/html, application/pdf, image/jpeg.

## `newestFirst` (type: `boolean`):

Snapshots mode: return the most recent captures (up to Max results per URL).

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

Snapshots mode: open each archived copy and add title, meta description, H1s, plain text, word and link counts. Charged per page (see pricing). Slower: about 1 page per second.

## `contentMaxChars` (type: `integer`):

Plain text is cut to this length.

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

0 = no limit. You pay per output row.

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

0 = no limit.

## `maxRequestsPerSecond` (type: `number`):

The Internet Archive is a non-profit; keep this low. 429 responses are backed off automatically.

## `respectRobotsTxt` (type: `boolean`):

Check web.archive.org/robots.txt before requests.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://www.python.org"
  ],
  "mode": "snapshots",
  "collapse": "year",
  "onlyStatus200": true,
  "newestFirst": false,
  "includeContent": false,
  "contentMaxChars": 5000,
  "maxResultsPerUrl": 25,
  "maxResults": 0,
  "maxRequestsPerSecond": 1,
  "respectRobotsTxt": true
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        "https://apify.com",
        "https://www.python.org"
    ],
    "collapse": "year",
    "maxResultsPerUrl": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("berryish_pillar/wayback-machine-snapshots").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://apify.com",
        "https://www.python.org",
    ],
    "collapse": "year",
    "maxResultsPerUrl": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("berryish_pillar/wayback-machine-snapshots").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://apify.com",
    "https://www.python.org"
  ],
  "collapse": "year",
  "maxResultsPerUrl": 25
}' |
apify call berryish_pillar/wayback-machine-snapshots --silent --output-dataset

```

## MCP server setup

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

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/drmsDWYYNSKHYBSOc/builds/8QBgedFbSMr5fnmVZ/openapi.json
