# Internet Archive & Wayback Machine Scraper: Books, Snapshots (`best_celerytop/internet-archive-scraper`) Actor

Internet Archive and Wayback Machine scraper. Search archive.org for books, films, music, software and images with metadata and direct download links, or list Wayback Machine snapshots of any URL or domain through the CDX API with date filters. Public APIs, no login, no browser, no proxies.

- **URL**: https://apify.com/best_celerytop/internet-archive-scraper.md
- **Developed by:** [Konstantin Semin](https://apify.com/best_celerytop) (community)
- **Categories:** Developer tools, Education
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 archive items

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

## Internet Archive & Wayback Machine Scraper: Books, Snapshots, Metadata

Two tools in one Actor, both reading the Internet Archive's own public APIs:

- **Library search** on [archive.org](https://archive.org): millions of free books, magazines, films, music recordings, software titles and images, returned as clean structured data with title, creators, year, subjects, description, license, download counts, and the full list of files with direct download links, formats and sizes.
- **Wayback Machine snapshots** on [web.archive.org](https://web.archive.org): every capture the Wayback Machine holds for a web page, a URL prefix, a host or a whole domain, with timestamps, HTTP status, content type, size and a content hash, read from the CDX index API. Filter by date range, keep only successful captures, or collapse the list to one row per archived URL to get every page of a site the archive ever saw.

No login, no browser, no proxies, no API key.

### What you can do with it

- **Build datasets** of public-domain books, old films, radio shows or concert recordings for research, machine learning or digital humanities.
- **Find files to download** in the format you need: every item comes with direct links to its PDF, EPUB, MP3, MP4, FLAC, ZIP and other files.
- **Monitor a collection** such as `prelinger`, `librivoxaudio` or `opensource_movies` and get the newest additions on a schedule.
- **See how a page changed over time**: list its Wayback Machine snapshots, spot the captures where the content hash changed, and open each one.
- **Recover a lost site**: list every archived URL of a domain, then fetch the snapshots you need.
- **Check what a page said on a date** for SEO history, competitor research, legal evidence or link reclamation.
- **Feed an app, an agent or a workflow**: the Actor runs in n8n through the official Apify node, and in Make, Zapier, LangChain or any tool that calls the Apify API.

### Input

#### Internet Archive library

| Field | Type | Description |
|---|---|---|
| `queries` | array | Search terms, one search per line. Plain words search titles, descriptions and subjects. Lucene syntax works too: `subject:chess AND language:English`, `creator:"Orson Welles"`, `title:(jazz OR blues)`. |
| `mediaType` | string | `texts`, `movies`, `audio`, `software`, `image`, `data`, `etree` (live music), `web`, or empty for any. |
| `collection` | string | Only items from one archive.org collection, for example `prelinger`. Works alone, without queries. |
| `yearFrom`, `yearTo` | integer | Publication year range. |
| `sortBy` | string | `relevance` (default), `mostDownloaded`, `newestAdded`, `oldestAdded`, `newestPublished`, `oldestPublished`, `titleAZ`, `topRated`. |
| `identifiers` | array | Fetch specific items by identifier, the last part of an `archive.org/details/...` URL. |
| `includeFiles` | boolean | Add files with download links and the full metadata. Default `true`. |
| `fileFormats` | array | Keep only files of these formats or extensions, for example `pdf`, `epub`, `mp3`, `mp4`. Empty keeps all files. |
| `maxFilesPerItem` | integer | Cap on files listed per item. Default `50`. |

#### Wayback Machine

| Field | Type | Description |
|---|---|---|
| `waybackUrls` | array | Pages or sites to list snapshots for: `https://example.com/pricing`, `example.com`, `example.com/blog/`. The scheme does not matter. |
| `waybackMatchType` | string | `exact` (default): that one URL. `prefix`: every archived URL starting with it. `host`: every archived URL on the host. `domain`: the host and all its subdomains. |
| `waybackFrom`, `waybackTo` | string | Date range of the captures: `2020`, `2020-06` or `2020-06-15`. |
| `waybackCollapse` | string | `none` (default): every capture. `digest`: only captures whose content changed. `url`: one row per archived URL, the way to list all pages of a site. `hour`, `day`, `month`, `year`: one capture per period. |
| `waybackOnlyOk` | boolean | Keep only HTTP 200 captures, dropping redirects and errors. Default `false`. |
| `waybackMimeType` | string | Keep only one content type, for example `text/html` or `application/pdf`. |

#### Limits

| Field | Type | Description |
|---|---|---|
| `maxItems` | integer | Maximum number of rows saved in the run, library items and snapshots together. Default `100`. |

#### Example: books as PDF and EPUB

```json
{
    "queries": ["chess openings"],
    "mediaType": "texts",
    "yearFrom": 1900,
    "sortBy": "mostDownloaded",
    "fileFormats": ["pdf", "epub"],
    "maxItems": 100
}
```

#### Example: history of one page

```json
{
    "waybackUrls": ["https://apify.com/pricing"],
    "waybackFrom": "2022",
    "waybackCollapse": "digest",
    "waybackOnlyOk": true,
    "maxItems": 500
}
```

#### Example: every archived page of a site

```json
{
    "waybackUrls": ["example.com"],
    "waybackMatchType": "domain",
    "waybackCollapse": "url",
    "waybackOnlyOk": true,
    "waybackMimeType": "text/html",
    "maxItems": 5000
}
```

### Output

Both kinds of rows go to the same dataset; the `type` field tells them apart (`archiveItem` or `waybackSnapshot`). The dataset has a table view for each.

#### Library item

```json
{
    "type": "archiveItem",
    "identifier": "kupdf.net_modern-chess-openings-15th-edition",
    "url": "https://archive.org/details/kupdf.net_modern-chess-openings-15th-edition",
    "title": "Modern Chess Openings 15th edition",
    "creators": [],
    "date": null,
    "year": null,
    "mediaType": "texts",
    "collections": ["folkscanomy_chess", "folkscanomy"],
    "subjects": ["chess", "chess-openings", "modern-chess-openings"],
    "description": "Essential to understanding chess openings!",
    "language": null,
    "publisher": null,
    "licenseUrl": null,
    "rights": null,
    "downloads": 145756,
    "rating": null,
    "reviewsCount": null,
    "itemSizeBytes": 666005376,
    "filesCount": 19,
    "addedAt": "2021-01-15T01:51:39.000Z",
    "thumbnailUrl": "https://archive.org/services/img/kupdf.net_modern-chess-openings-15th-edition",
    "downloadPageUrl": "https://archive.org/download/kupdf.net_modern-chess-openings-15th-edition",
    "files": [
        {
            "name": "kupdf.net_modern-chess-openings-15th-edition.epub",
            "format": "EPUB",
            "source": "derivative",
            "sizeBytes": 1026235,
            "durationSeconds": null,
            "width": null,
            "height": null,
            "md5": "65c50caf91c64be8c67d454e4ea40c42",
            "url": "https://archive.org/download/kupdf.net_modern-chess-openings-15th-edition/kupdf.net_modern-chess-openings-15th-edition.epub"
        }
    ],
    "scrapedAt": "2026-11-12T06:10:00.000Z"
}
```

Fields the archive does not have for an item are `null` or an empty list. `source` is `original` for uploaded files and `derivative` for versions the archive generated (OCR text, smaller videos, EPUB from PDF). Audio and video files carry `durationSeconds`; images and videos carry `width` and `height` when known.

#### Wayback Machine snapshot

```json
{
    "type": "waybackSnapshot",
    "query": "apify.com/",
    "url": "https://apify.com/",
    "timestamp": "20240106234848",
    "snapshotAt": "2024-01-06T23:48:48.000Z",
    "snapshotUrl": "https://web.archive.org/web/20240106234848/https://apify.com/",
    "rawSnapshotUrl": "https://web.archive.org/web/20240106234848id_/https://apify.com/",
    "statusCode": 200,
    "mimeType": "text/html",
    "digest": "CI23EQLBQNE7EWSZRZT6HLVWOEIDTFE3",
    "lengthBytes": 52534,
    "changedSinceLast": null,
    "scrapedAt": "2026-11-18T18:17:37.769Z"
}
```

`snapshotUrl` opens the capture in the Wayback Machine with its toolbar; `rawSnapshotUrl` returns the archived page exactly as captured, without the toolbar, which is what you want for diffing or downloading. `digest` is the archive's hash of the content; `changedSinceLast` is `true` when it differs from the previous capture of the same URL in the list, `null` for the first capture. Snapshots come oldest first.

A `RUN_SUMMARY` record in the key-value store lists, per query and per Wayback URL, how many rows were taken, the first and last snapshot dates, and any error.

### Good to know

- **How big a run can be.** The library search pages through results with a cursor, so a run can collect tens of thousands of items; with `includeFiles` on, around 1,000 items take two to three minutes. A Wayback request returns up to `maxItems` captures in one call; a whole domain can have millions, so use `waybackCollapse: "url"`, a date range or `waybackMimeType` to narrow it.
- **Deduplication.** A library item that matches several queries is saved once.
- **Polite by design.** Requests go to the archive's public APIs with a small concurrency and a plain user agent, exactly as the archive asks. The CDX API can take a minute for large domains; the Actor waits for it.
- **Downloading files.** The `url` of every library file is a direct link; put it into any download tool. Most derivative files are small, originals can be gigabytes.
- **Automation.** The official Apify node for n8n (`@apify/n8n-nodes-apify`) runs this Actor and returns its dataset inside a workflow; the Apify API and the Make and Zapier integrations work the same way.
- **Price.** $2 per 1,000 rows (archive items or Wayback snapshots), no start fee; platform usage is included.

### Please respect the archive

The Internet Archive is a non-profit library. Many items are public domain or Creative Commons; others are hosted with restrictions. Check `licenseUrl` and `rights` before republishing anything, and follow the [Internet Archive terms of use](https://archive.org/about/terms.php).

### FAQ

**Can I get Wayback Machine snapshots of a website?**
Yes. Put the page or site into `waybackUrls`. Use `waybackMatchType: "domain"` with `waybackCollapse: "url"` to list every archived page of a site, or leave the defaults to get the full capture history of one URL.

**Does it download the archived pages themselves?**
It returns the list of captures with a direct `rawSnapshotUrl` for each. Fetch those URLs with any download tool or a crawler.

**How do I find when a page changed?**
Set `waybackCollapse: "digest"` to keep only captures whose content hash changed, and look at `changedSinceLast`.

**Why are some items missing `creators` or `year`?**
Uploaders fill these in by hand and many leave them empty. The Actor returns exactly what the archive has.

**How do I download many files from archive.org at once?**
Run a search with `fileFormats` set to what you need. Every item lists its files with direct `url` links that any download tool can fetch.

**Does archive.org have a search API?**
Yes, the Internet Archive's scrape API, and the Wayback Machine has the CDX API. The Actor uses both, with no key or login.

**How do I list all items in an archive.org collection?**
Set `collection` to the collection name and leave `queries` empty.

**Can I use it from n8n or an AI agent?**
Yes. Start it through the official Apify node for n8n, the Make or Zapier integration, or the Apify MCP server, and read the rows back from the dataset.

**Something is missing or broken?**
Open an issue on the Issues tab and include the input you used.

### Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by the Internet Archive. All content belongs to its respective owners and uploaders.

# Actor input Schema

## `queries` (type: `array`):

What to search for, one search per line. Plain words search titles, descriptions and subjects. Advanced Lucene syntax works too, for example `subject:chess AND language:English` or `creator:"Orson Welles"`.

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

Limit results to one kind of item.

## `collection` (type: `string`):

Only items from this archive.org collection, for example `prelinger`, `librivoxaudio`, `folkscanomy` or `opensource_movies`. The collection name is the last part of a collection URL. Can be used alone, without search queries.

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

Keep items whose publication year is this or later.

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

Keep items whose publication year is this or earlier.

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

Order of the results.

## `identifiers` (type: `array`):

Fetch specific items by identifier (the last part of an archive.org/details/... URL), for example `chessfundamentals00capa`. Can be combined with searches.

## `includeFiles` (type: `boolean`):

Add the list of files with direct download links, formats and sizes, plus the full item metadata. One extra request per item.

## `fileFormats` (type: `array`):

Keep only files of these formats or extensions, for example `pdf`, `epub`, `mp3`, `mp4`, `flac`, `jpg`, `zip`. Leave empty for all files.

## `maxFilesPerItem` (type: `integer`):

Cap on the number of files listed for one item.

## `waybackUrls` (type: `array`):

Web pages or sites to get archived snapshots for, one per line: `https://example.com/pricing`, `example.com`, `example.com/blog/`. The scheme does not matter. Combined with **Match type** below.

## `waybackMatchType` (type: `string`):

`exact`: snapshots of that one URL. `prefix`: every archived URL starting with it. `host`: every archived URL on that host. `domain`: the host and all its subdomains.

## `waybackFrom` (type: `string`):

Earliest snapshot to include: `2020`, `2020-06` or `2020-06-15`.

## `waybackTo` (type: `string`):

Latest snapshot to include: `2023`, `2023-12` or `2023-12-31`.

## `waybackCollapse` (type: `string`):

`none`: every capture. `digest`: skip captures whose content did not change. `url`: one row per archived URL (its first capture), the way to list all pages of a site. `hour`, `day`, `month`, `year`: one capture per period.

## `waybackOnlyOk` (type: `boolean`):

Skip redirects, errors and missing pages.

## `waybackMimeType` (type: `string`):

Keep only captures of one MIME type, for example `text/html`, `application/pdf` or `image/jpeg`. Empty keeps all.

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

Maximum number of rows saved in the run: library items plus Wayback Machine snapshots together.

## Actor input object example

```json
{
  "queries": [
    "chess openings"
  ],
  "mediaType": "texts",
  "sortBy": "relevance",
  "includeFiles": true,
  "maxFilesPerItem": 50,
  "waybackMatchType": "exact",
  "waybackCollapse": "none",
  "waybackOnlyOk": false,
  "maxItems": 20
}
```

# Actor output Schema

## `items` (type: `string`):

Archive.org library items with metadata and file download links, and Wayback Machine snapshots.

## `runSummary` (type: `string`):

Per-query and per-URL counts and errors for this run.

# 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 = {
    "queries": [
        "chess openings"
    ],
    "mediaType": "texts",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("best_celerytop/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 = {
    "queries": ["chess openings"],
    "mediaType": "texts",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("best_celerytop/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 '{
  "queries": [
    "chess openings"
  ],
  "mediaType": "texts",
  "maxItems": 20
}' |
apify call best_celerytop/internet-archive-scraper --silent --output-dataset

```

## MCP server setup

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