# Wayback Machine Scraper & Archive.org Search - $1/1,000 (`pennydata/archive-org-items-search`) Actor

Wayback Machine snapshots for a URL: list every archived version of a website or domain (date, status, digest, snapshot link). Also searches Internet Archive books, audio and video items by keyword.

- **URL**: https://apify.com/pennydata/archive-org-items-search.md
- **Developed by:** [Penny Data](https://apify.com/pennydata) (community)
- **Categories:** Developer tools, SEO tools, AI
- **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

## Archive.org Advanced Search: Internet Archive Scraper

> **Try it in one click:** open [Try for free on Apify](https://apify.com/pennydata/archive-org-items-search), press **Try for free**, and the Console form opens with this demo input already filled in (`creator:"Mark Twain"`, texts, 10 items). Press **Start** to see it run.

Demo input and the first 3 rows it returns (live local run against archive.org):

| identifier | title | creator | downloads |
|---|---|---|---|
| mark-twai | Mark Twain Complete collection Public domain | Mark Twain | 22717 |
| LifeOfMississippi | Life Of Mississippi | Mark Twain | 13454 |
| WarPrayer-English-MarkTwain | WAR PRAYER - ENGLISH - MARK TWAIN | MARK TWAIN | 11702 |

```json
{ "query": "creator:\"Mark Twain\"", "mediaType": "texts", "maxItems": 10, "sortBy": "downloads" }
```

### Wayback Machine mode: list archived snapshots of any URL or domain

Set **mode** to `wayback` to list Wayback Machine captures through the official CDX API (no browser, no proxy). One row per capture: URL, capture time, HTTP status, MIME type, content digest, size, a viewable snapshot link and a raw snapshot link. Same price as item search: $0.001 per row, empty results are free.

```json
{ "mode": "wayback", "waybackUrl": "example.com", "collapse": "digest", "statusCode": "200", "maxItems": 25 }
```

First rows of that run (real run, 25 rows returned):

| capturedAt | url | statusCode | digest |
|---|---|---|---|
| 2002-01-20T14:25:10Z | http://example.com:80/ | 200 | HT2DYGA5UKZCPBSFVCV3JOBXGW2G5UUA |
| 2002-03-28T01:28:21Z | http://www.example.com:80/ | 200 | UY3I2DT2AMWAY6DECFCFYMT5ZOTFHUCH |

- **waybackUrl**: page or domain. **matchType**: `exact` (default), `prefix`, `host`, `domain` (host plus subdomains).
- **waybackFrom / waybackTo**: capture range, `YYYY`, `YYYYMM` or `YYYYMMDD`.
- **statusCode**: keep only captures with this HTTP status, e.g. `200`.
- **collapse**: `digest` keeps only captures where the page content changed (track website changes over time); `day`, `month`, `year` keep one capture per period.
- **maxItems** caps rows and cost.

Use it to see how a page changed, find old URLs of a site, recover removed pages, or build link lists for research and SEO audits. Item search (default mode) is described below.

**Archive.org advanced search to clean JSON.** Search the Internet Archive for books, magazines, audio, movies, software and images and export one row per item: title, creator, date, media type, collections, download count, subjects, language, license, file count, total size, item page URL and download URL. It uses the **official archive.org advancedsearch and metadata JSON APIs**: no browser, no proxy, no login. Pay **$0.001 per item** ($1 per 1,000); a search with no results has no item charges.

Use it for building datasets of public domain books, collecting audio or video collections for research, library and archive cataloguing, OSINT, training-data sourcing (check each item's license), and feeding archive.org lists into Zapier, Make, n8n or your own pipeline through the Apify API.

### Input

- **query**: keywords or archive.org advanced search syntax, e.g. `public domain cookbook`, `creator:"Mark Twain"`, `subject:chemistry AND language:eng`.
- **mediaType**: `all` (default), `texts`, `movies`, `audio`, `software`, `image`, `web`, `etree`, `data`, `collection`.
- **collection**: only items in one collection (`americana`, `prelinger`, `librivoxaudio`, `nasa`, ...).
- **dateFrom / dateTo**: `YYYY` or `YYYY-MM-DD` range on the item date.
- **maxItems**: 1 to 5000 (default 100). Caps your cost.
- **sortBy**: `relevance` (default), `downloads`, `date_newest`, `date_oldest`.
- **includeFileList**: add a `files` array per item (name, format, size, download URL). Needs one extra metadata call per item, so it runs at about 2 items per second.

Example input:

```json
{ "query": "public domain cookbook", "mediaType": "texts", "maxItems": 100, "sortBy": "downloads" }
```

### Output

One dataset row per item, for example:

```json
{
  "identifier": "lesrecettesdupet0000sadk",
  "title": "Les recettes du petit chef",
  "creator": "Sadler, Ann",
  "date": "1999-01-01T00:00:00Z",
  "mediaType": "texts",
  "collection": ["inlibrary", "printdisabled"],
  "downloads": 42,
  "description": "...",
  "subjects": ["Cooking"],
  "language": "eng",
  "license": null,
  "itemUrl": "https://archive.org/details/lesrecettesdupet0000sadk",
  "downloadUrl": "https://archive.org/download/lesrecettesdupet0000sadk",
  "fileCount": 30,
  "totalSizeBytes": 5412345
}
```

Fields that archive.org does not provide are `null` (or an empty list for `collection` and `subjects`). `downloadUrl` is the item's file directory; set `includeFileList` to get a direct URL for each file.

### Good to know

- Rate limit: the actor sends an identifying User-Agent, makes at most 2 requests per second and retries on HTTP 429 and 5xx with backoff.
- Only the Internet Archive item APIs are covered. This actor does not query Wayback Machine / CDX captures.
- A listed item is not necessarily free to reuse: check the `license` field and the item page for rights.
- Not affiliated with the Internet Archive. Built with AI help (Claude).

### Pricing

Pay per event: **$0.001 per item** returned, plus Apify's standard actor-start event. Searches with no results add no item charges.

### Related actors

- [Sitemap Extractor Plus](https://apify.com/pennydata/sitemap-extractor-plus): lists the URLs a site publishes in its sitemaps.
- [RSS/Atom Feed Reader (bulk)](https://apify.com/pennydata/rss-atom-feed-reader-bulk): reads feeds from sources you found.
- [Shot PDF](https://apify.com/pennydata/shot-pdf): saves a screenshot or PDF of a page you want to keep.

### Use with AI agents (MCP)

Call this actor from an AI agent (Claude, Cursor, or any MCP client) through the Apify MCP server. Add this URL as an MCP server in your client: https://mcp.apify.com?tools=pennydata/archive-org-items-search
It exposes this actor as a tool the agent can run with the same input as above. An Apify API token is required. This actor was built with AI assistance.

# Actor input Schema

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

items = search archive.org items (books, audio, video). wayback = list Wayback Machine snapshots of a URL or whole domain.

## `waybackUrl` (type: `string`):

Page URL or domain whose archived snapshots to list, e.g. example.com or https://example.com/pricing. Used only when mode is wayback.

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

exact = this URL only, prefix = everything under this path, host = whole host, domain = host plus subdomains.

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

Earliest capture, YYYY, YYYYMM or YYYYMMDD.

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

Latest capture, YYYY, YYYYMM or YYYYMMDD.

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

Only captures with this status, e.g. 200. Leave empty for all.

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

none = every capture; digest = only captures where the page content changed; day, month, year = one capture per period.

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

Keywords or archive.org advanced search syntax, e.g. public domain cookbook, creator:"Mark Twain", subject:chemistry AND language:eng.

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

Restrict to one archive.org media type, or all.

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

Only items in this collection identifier, e.g. americana, prelinger, librivoxaudio, nasa.

## `dateFrom` (type: `string`):

Earliest item date, YYYY or YYYY-MM-DD.

## `dateTo` (type: `string`):

Latest item date, YYYY or YYYY-MM-DD.

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

Maximum items to return. This also caps what you are charged.

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

Result order.

## `includeFileList` (type: `boolean`):

Add a files array (name, format, size, download URL) per item. Costs one extra metadata API call per item, so the run is slower (about 2 items per second).

## Actor input object example

```json
{
  "mode": "items",
  "waybackUrl": "example.com",
  "matchType": "exact",
  "collapse": "none",
  "query": "creator:\"Mark Twain\"",
  "mediaType": "texts",
  "maxItems": 10,
  "sortBy": "relevance",
  "includeFileList": false
}
```

# Actor output Schema

## `items` (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 = {
    "waybackUrl": "example.com",
    "query": "creator:\"Mark Twain\"",
    "mediaType": "texts",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("pennydata/archive-org-items-search").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 = {
    "waybackUrl": "example.com",
    "query": "creator:\"Mark Twain\"",
    "mediaType": "texts",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("pennydata/archive-org-items-search").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 '{
  "waybackUrl": "example.com",
  "query": "creator:\\"Mark Twain\\"",
  "mediaType": "texts",
  "maxItems": 10
}' |
apify call pennydata/archive-org-items-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pennydata/archive-org-items-search"
        }
    }
}
```

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/FHULclkjkqazWzBp8/builds/fpk2q2rvHo0HcKrLv/openapi.json
