# Wayback Machine & Internet Archive Scraper – Snapshots, Search (`rowfeed/wayback-internet-archive-scraper`) Actor

Query the Wayback Machine's official JSON APIs: snapshot history (CDX) for any URL, the latest archived snapshot, and full-text search of archive.org items. No login, no scraping, no proxy.

- **URL**: https://apify.com/rowfeed/wayback-internet-archive-scraper.md
- **Developed by:** [Rowfeed](https://apify.com/rowfeed) (community)
- **Categories:** Developer tools, Automation, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 rows

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Query the **Wayback Machine's own snapshot history**, check whether a page is archived at all, and **full-text search archive.org's item catalog** — all from one Actor, all against archive.org's official, key-less JSON APIs. No login, no browser, no scraping the Wayback Machine's website itself.

Built for **SEO and legal teams** checking a page's publication/change history for evidence or audits, **researchers and journalists** tracking how a page or a set of domains evolved over time, and **AI agents** that need structured archive data mid-task instead of parsing HTML.

Three modes in one Actor, one consistent row shape per mode, and every mode is backed by an API that Internet Archive itself publishes and maintains — nothing here depends on scraping a page that could change its markup tomorrow.

### What you get

- **Snapshots mode** — the full CDX capture history for any URL: every timestamp, status code, MIME type and content digest archive.org has for it, one row per capture.
- **Latest mode** — the single most recent archived snapshot for a list of URLs, with an `available` flag so "nothing archived" is a clean `false`, not an error. A `false` from archive.org's availability API is double-checked against the CDX index before it is reported (that API can answer "not archived" while it is overloaded); if both endpoints are down you get an unbilled error row, never a silent false negative.
- **Search mode** — full-text search across archive.org's books, audio, video, software and text items, with title, creator, download count and description per result.
- **Errors instead of crashes** — a malformed URL or a failed request becomes one unbilled error row (`error`, `errorMessage`); a URL with zero snapshots is not an error either, it just produces no row.

### Sample rows

Snapshots mode, a real row from a default run:

```json
{
  "original_url": "http://example.com:80/",
  "timestamp": "2002-01-20T14:25:10+00:00",
  "archived_url": "https://web.archive.org/web/20020120142510/http://example.com:80/",
  "status_code": "200",
  "mime_type": "text/html",
  "digest": "HT2DYGA5UKZCPBSFVCV3JOBXGW2G5UUA",
  "length_bytes": 1792,
  "urlkey": "com,example)/",
  "scraped_at": "2026-09-11T09:49:22+00:00"
}
```

Latest mode, a real row:

```json
{
  "original_url": "example.com",
  "available": false,
  "archived_url": null,
  "timestamp": null,
  "status": null,
  "scraped_at": "2026-09-11T09:52:50+00:00"
}
```

Search mode, a real row for the query "climate data":

```json
{
  "identifier": "climatechangecom0000unse",
  "title": "Climate change communication and the Internet",
  "media_type": "texts",
  "date": "2017-01-01T00:00:00Z",
  "creator": null,
  "downloads": 182,
  "description": "x, 127 pages : 26 cm The volume provides a timely, state of the art collection of studies examining climate change communication in the era of digital media...",
  "item_url": "https://archive.org/details/climatechangecom0000unse",
  "scraped_at": "2026-09-11T09:52:32+00:00"
}
```

### Filters

| Input | Mode | Default | What it does |
|---|---|---|---|
| `mode` | all | `snapshots` | `snapshots`, `latest` or `search`. |
| `urls` | snapshots, latest | `["example.com", "apify.com"]` | Domains or URLs to look up. A malformed entry becomes an unbilled error row instead of stopping the run. |
| `from` / `to` | snapshots | unset | Year or date bounds on capture time, e.g. `2024` / `20261231`. |
| `matchType` | snapshots | `exact` | `exact`, `prefix`, `host` or `domain`. |
| `statusCode` | snapshots | `200` | Only include captures with this HTTP status; blank = every status. |
| `maxSnapshotsPerUrl` | snapshots | `100` | Stop after this many capture rows per URL. |
| `collapse` | snapshots | `digest` | Collapse consecutive captures sharing a CDX field value (default: skip re-captures with identical content). |
| `query` | search | `climate data` | Full-text query against archive.org's item catalog. |
| `mediaType` | search | unset | Restrict to a media type, e.g. `texts`, `audio`, `movies`, `software`. |
| `maxResults` | search | `100` | Stop after this many search result rows. |

### No personal data

Snapshots and latest rows contain only URLs, timestamps and technical metadata that archive.org already publishes. Search rows carry a `creator` field, which is the catalog's own byline for an uploaded item (an author or publisher name, not personal data collected by this Actor) — otherwise every field is item metadata archive.org makes public.

### Pricing

Pay per event, no subscription: **$0.50 per 1,000 rows**. A default run (2 URLs, snapshots mode, up to 100 captures each) costs a few cents. Error rows are never charged, and a URL with zero snapshots produces no row and no charge.

### Use it from your tools

- **API and SDKs** — call it via the Apify API or the official Python/JavaScript clients: one call to start the run, one to fetch the rows as JSON, CSV or Excel.
- **n8n, Make and Zapier** — trigger runs and feed the rows into a workflow through Apify's integration for each.
- **AI agents and MCP** — eligible for agentic use via Apify's MCP server with pay-per-event pricing, so an agent can hand it a URL or a search query mid-task and pay only for the rows it actually got back.

### Details

- **APIs used**: the CDX snapshot index (`web.archive.org/cdx/search/cdx`), the availability API (`archive.org/wayback/available`), and the item search API (`archive.org/advancedsearch.php`) — all official, key-less, documented archive.org endpoints.
- **Fetching**: plain `httpx` GET over https only, no proxy, no browser. 429 and 5xx responses are retried with exponential backoff (honouring a `Retry-After` header when archive.org sends one), up to 5 tries; 404/401/403 are not retried.
- **Run stats**: the `STATS` record in the run's key-value store holds per-mode counts, including error rows and (for snapshots mode) URLs with zero captures.
- **Not affiliated** with the Internet Archive — this Actor is an independent client for its public APIs.

# Actor input Schema

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

snapshots = full CDX history per URL (one row per archived capture). latest = the most recent snapshot per URL (one row per URL). search = full-text search of archive.org items (books, audio, video, software, texts).

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

Domains or URLs to look up in the Wayback Machine. Used by the snapshots and latest modes. A malformed entry becomes an unbilled error row instead of stopping the run.

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

Only include snapshots captured on or after this year or date, e.g. 2024 or 20240101. Leave blank for no lower bound.

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

Only include snapshots captured on or before this year or date, e.g. 2026 or 20261231. Leave blank for no upper bound.

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

exact = only this URL. prefix = this URL and everything under it. host = the whole hostname. domain = the hostname and its subdomains.

## `statusCode` (type: `string`):

Only include snapshots with this HTTP status code, e.g. 200. Leave blank to include every status code.

## `maxSnapshotsPerUrl` (type: `integer`):

Stop after this many snapshot rows per URL. Each row is one `row` event ($0.50 per 1,000).

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

Collapse consecutive snapshots that share the same value of this CDX field, e.g. digest (skip re-captures with identical content) or timestamp:8 (one per day). Leave blank for every capture.

## `query` (type: `string`):

Full-text search query against archive.org's item catalog (title, description, text).

## `mediaType` (type: `string`):

Optional archive.org mediatype filter, e.g. texts, audio, movies, software, image, data. Leave blank for every media type.

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

Stop after this many search result rows. Each row is one `row` event ($0.50 per 1,000).

## Actor input object example

```json
{
  "mode": "snapshots",
  "urls": [
    "example.com"
  ],
  "matchType": "exact",
  "statusCode": "200",
  "maxSnapshotsPerUrl": 100,
  "collapse": "digest",
  "query": "climate data",
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("rowfeed/wayback-internet-archive-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("rowfeed/wayback-internet-archive-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 '{}' |
apify call rowfeed/wayback-internet-archive-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rowfeed/wayback-internet-archive-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/gGZSrQV6KtCvmyMDW/builds/lG0ZG1Jib9Z1yUM4k/openapi.json
