# Internet Archive Search & Wayback Machine Snapshots API (`andreaajohansen/internet-archive-wayback`) Actor

Search archive.org items (books, films, audio, software, collections) and list Wayback Machine snapshots for any URL or domain, using the official Internet Archive APIs. Snapshot dates, links, status, MIME type. No login.

- **URL**: https://apify.com/andreaajohansen/internet-archive-wayback.md
- **Developed by:** [Andre Aa Johansen](https://apify.com/andreaajohansen) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## Internet Archive Search & Wayback Machine Snapshots API

Two tools in one Actor, both built on the **official Internet Archive APIs** (no HTML scraping, no login, no API key):

1. **Search archive.org**: find books, films, audio, live concerts, software, images and datasets in the Internet Archive library and export their metadata (title, creator, date, downloads, collections, subjects, licence, links).
2. **Wayback Machine snapshots**: list every capture of a URL, a path or a whole domain, with capture date, status code, MIME type, size, content digest and a ready-to-open snapshot link. Or get a **one-row summary per URL** with its first and latest capture.

> Independent tool. Not affiliated with or endorsed by the Internet Archive. Please consider [donating to the Internet Archive](https://archive.org/donate).

### Use cases

- **SEO and domain research**: when was a domain first archived, how often did a page change, what did a competitor's pricing page look like in 2021?
- **Expired-domain and backlink due diligence**: check history before you buy a domain.
- **Legal, compliance and journalism**: find dated evidence of what a page said and when.
- **Web-archiving and research datasets**: get every captured URL under a prefix (`example.com/blog/`), filter by MIME type (e.g. all PDFs) and download the raw files via `rawContentUrl`.
- **Content discovery**: build lists of public-domain films, books or audio by collection, subject, year or popularity.
- **Monitoring**: schedule a daily summary run to see when a list of URLs was last captured.

### Input

**Mode = search**

| Option | Example |
| --- | --- |
| Search query | `"moon landing"`, `title:(annual report) AND creator:(nasa)` |
| Media types | `texts`, `movies`, `audio`, `software`, ... |
| Collections | `prelinger`, `nasa`, `gutenberg` |
| Year from / to | `1950` / `1979` |
| Sort by | Most downloaded, newest added, publication date, title |

```json
{ "mode": "search", "query": "\"moon landing\"", "mediaTypes": ["movies"], "sortBy": "downloads desc", "maxItems": 500 }
```

**Mode = wayback**

| Option | Example |
| --- | --- |
| URLs / domains | `apify.com`, `https://example.com/pricing`, a `web.archive.org/web/...` link |
| Wayback output | Every snapshot, or Summary per URL (first & latest capture) |
| URL match | exact, prefix, whole host, domain incl. subdomains |
| From / To | `2018`, `2020-06`, `2021-12-31` |
| Collapse | one per hour/day/month/year, or only when content changed |
| Only HTTP 200 | on by default |
| MIME type | `text/html`, `application/pdf` |

```json
{ "mode": "wayback", "urls": ["apify.com"], "from": "2018", "collapse": "month", "maxItems": 200 }
```

### Example output

Search item:

```json
{
  "identifier": "Experime1940",
  "title": "Experiments in the Revival of Organisms",
  "mediaType": "movies",
  "creator": ["Techfilm Studio, Moscow"],
  "year": 1940,
  "downloads": 773649,
  "subjects": ["Animals: Dogs", "Medicine: Veterinary: Experiments", "Life extension"],
  "collections": ["prelinger"],
  "licenseUrl": "http://creativecommons.org/licenses/publicdomain/",
  "itemUrl": "https://archive.org/details/Experime1940",
  "thumbnailUrl": "https://archive.org/services/img/Experime1940"
}
```

Wayback snapshot:

```json
{
  "inputUrl": "apify.com",
  "originalUrl": "https://www.apify.com/",
  "capturedAt": "2018-01-05T04:58:47Z",
  "snapshotUrl": "https://web.archive.org/web/20180105045847/https://www.apify.com/",
  "rawContentUrl": "https://web.archive.org/web/20180105045847id_/https://www.apify.com/",
  "mimeType": "text/html",
  "statusCode": 200,
  "digest": "LIERIYMY2HC6VUOBDEB42X6SJQFNKTVV",
  "lengthBytes": 8500
}
```

Wayback summary:

```json
{
  "inputUrl": "example.com",
  "isArchived": true,
  "firstSnapshotAt": "2002-01-20T14:25:10Z",
  "lastSnapshotAt": "2026-11-20T03:16:23Z",
  "lastSnapshotUrl": "https://web.archive.org/web/20261120031623/https://example.com/"
}
```

Export as JSON, CSV, Excel or HTML, or use the Apify API, Zapier, Make or n8n.

### Pricing

Pay per result: **$1.00 per 1,000 rows** plus **$0.01 per run start**. 1,000 snapshots or archive items cost about one dollar. No subscription.

### How it works and fair use

The Actor calls the documented [Internet Archive search (scrape) API](https://archive.org/developers/), the [Wayback CDX Server API](https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server) and the [Wayback Availability API](https://archive.org/help/wayback_api.php). It sends at most about one request per second to archive.org and one every 1.5 seconds to web.archive.org, pages through large result sets with the official cursor / resume keys, and backs off for a minute if the Wayback Machine asks it to slow down (HTTP 429). It never downloads the archived files themselves.

### FAQ

**Does it download the archived pages?** No. It returns links. `snapshotUrl` opens the page in the Wayback Machine; `rawContentUrl` returns the original archived bytes without the Wayback toolbar.

**Why does a URL show `isArchived: false`?** The Wayback Machine has no successful capture for it (or the site owner excluded it). Try `matchType: domain` or turn off *Only successful captures*.

**How many snapshots can I get?** Popular domains have millions of captures. Use *Collapse* (e.g. one per month) and date ranges to keep results focused, and *Max snapshots per URL* as a safety cap.

**Is the metadata personal data?** Item metadata is the public catalogue record (creator, title, subjects). User favourite lists (`fav-<username>` collections) are removed.

**What search syntax is supported?** The Internet Archive's Lucene-style syntax: fields like `title:`, `creator:`, `subject:`, `collection:`, `mediatype:`, `AND`/`OR`/`NOT`, quotes for phrases.

### Disclaimer

Data is provided as returned by the Internet Archive APIs, without warranty. Respect the rights of the original publishers when you reuse archived content.

# Actor input Schema

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

'search' finds items in the Internet Archive library (archive.org). 'wayback' lists Wayback Machine snapshots (captures) of web pages.

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

Keywords or advanced Internet Archive search syntax, e.g. 'apollo moon landing', 'title:(annual report) AND creator:(nasa)' or 'subject:jazz'.

## `mediaTypes` (type: `array`):

Limit to these media types. Leave empty for all.

## `collections` (type: `array`):

Limit to items in these collection identifiers, e.g. 'prelinger', 'nasa', 'gutenberg', 'librivoxaudio'.

## `yearFrom` (type: `integer`):

Earliest publication year.

## `yearTo` (type: `integer`):

Latest publication year.

## `language` (type: `string`):

Language as written on archive.org, e.g. 'English' or 'eng'.

## `sortBy` (type: `string`):

Order of search results.

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

Pages or domains to look up in the Wayback Machine, e.g. 'example.com', 'https://example.com/pricing' or 'example.com/blog/'. Wayback links (web.archive.org/web/...) are accepted too.

## `waybackOutput` (type: `string`):

'snapshots' returns one row per capture. 'summary' returns one row per URL with its first and latest capture (fast, for checking many URLs).

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

'exact' = only this URL; 'prefix' = this URL and everything under it; 'host' = every page on this host; 'domain' = this domain and all subdomains.

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

Earliest capture date: 2015, 2015-06 or 2015-06-30.

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

Latest capture date: 2020, 2020-12 or 2020-12-31.

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

Keep at most one capture per period, or drop consecutive captures whose content did not change ('digest').

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

Skip redirects, errors and robots-blocked captures.

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

Optional MIME filter, e.g. 'text/html' or 'application/pdf'. Regular expressions allowed.

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

Upper limit of snapshot rows per input URL.

## `maxItems` (type: `integer`):

Maximum number of rows for the whole run.

## Actor input object example

```json
{
  "mode": "search",
  "query": "moon landing",
  "sortBy": "relevance",
  "waybackOutput": "snapshots",
  "matchType": "exact",
  "collapse": "none",
  "onlySuccessful": true,
  "maxSnapshotsPerUrl": 1000,
  "maxItems": 50
}
```

# 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 = {
    "mode": "search",
    "query": "moon landing",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("andreaajohansen/internet-archive-wayback").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 = {
    "mode": "search",
    "query": "moon landing",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("andreaajohansen/internet-archive-wayback").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 '{
  "mode": "search",
  "query": "moon landing",
  "maxItems": 50
}' |
apify call andreaajohansen/internet-archive-wayback --silent --output-dataset

```

## MCP server setup

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

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/Of5rNtugVviMRDdbN/builds/jIyrBI14U9ceb5A7Z/openapi.json
