# Internet Archive Library Search & Metadata Export (`jpmarketdata/internet-archive-library-search-export`) Actor

Export Internet Archive catalog metadata for books, movies and audio. Batch up to 5 queries, deduplicate item IDs, inspect indexed rights and see explicit coverage. Public HTTP, no login; metadata only. $0.001 per unique item; summary free.

- **URL**: https://apify.com/jpmarketdata/internet-archive-library-search-export.md
- **Developed by:** [h ichi](https://apify.com/jpmarketdata) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 unique library item delivereds

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 Library Search & Metadata Export

Search the Internet Archive library and export structured metadata for books, movies, audio, software and other indexed media. Researchers and data workflows can retrieve capped, paginated query results without writing an API client. Up to five queries share one identifier-deduplicated results and an uncharged coverage summary.

This Actor uses Archive.org public Advanced Search. It returns catalog metadata, not full texts, downloadable media, lending access, private content or Wayback website history. The source index may omit metadata and change during pagination.

Independent, unofficial tool; not affiliated with or endorsed by Internet Archive.

### Input

`queries` accepts one to five Archive.org Advanced Search expressions, each 1–500 characters. The default is `["collection:gutenberg AND mediatype:texts"]`. Use e.g. `collection:nasa AND mediatype:movies` for a different media profile. `maxItems` is the global maximum of unique delivered item rows, 1–1,000, default 100. Queries are processed in input order, in pages of 50 sorted by identifier ascending. Earlier queries may consume the shared limit, leaving later queries unvisited. Query coverage makes this explicit.

Example:

```json
{"queries":["collection:gutenberg AND mediatype:texts","collection:nasa AND mediatype:movies"],"maxItems":200}
```

### Output

`archive_item` rows contain identifier, short title, mediaType, creators, subjects, collections, languages, source date, download count, indexed licenseUrl and a short rights statement, itemUrl, matchedQueries, source and observedAt. Scalar/list metadata is normalized. Missing metadata remains null or an empty list; a missing rights/license field does not imply public domain or permission to reuse. Download counts are source observations, not buyers or payments.

One `archive_search_summary` row reports exportedItems, duplicatesRemoved, per-query queryCoverage, complete, stopReasons and contactsRedacted. `matchedQueries` covers only retrieved pages. Query totals are individual index counts and must not be summed into unique library items. If a live query total changes between pages, queryCoverage marks `sourceWindowChanged` and `complete` stays false; the result may omit items from the changing index. `complete` means all supplied queries exhausted in the observed live index; pagination is not a frozen snapshot. Standard Apify results exports provide JSON/CSV/Excel.

### Pricing

PPE price is $0.001 per unique `archive_item` row delivered ($1 per 1,000). Duplicates and the summary are uncharged; no explicit start event. Non-PPE development runs deliver the same results without event charges or event-budget limits.

### Limits

Sequential lightweight HTTP, 256 MB target memory, at most 30 total HTTP requests including robots and retries, 180 seconds for source collection. Pages contain 50 items, identifier ascending. Each request is bounded; a global item, event-budget or request cap returns explicit partial coverage. Delays and Retry-After are honored. Source authentication blocks, rate limits after bounded retries, network timeouts and invalid/error/repeated-page responses fail the run; they are not empty success. If all queries genuinely match zero items, fail with a no-results error and no item charge. No per-item metadata or media request is made.

### Privacy

Only selected public catalog fields are requested. Uploader identities, review authors, contact details, account/server metadata, descriptions and media files are excluded. Contacts found inside allowed metadata are removed before saving. Public bibliographic creator names may remain. Use public non-sensitive search expressions. Account/favorite selectors and source records, and personal favorite collection identifiers, are excluded. Source license/rights statements are informational and do not authorize reuse. Archive.org terms, robots and automated-access guidance apply.

### Research and automation use

Example user question: Which Gutenberg library items match this research query, and what source metadata and rights information are available? An AI agent supplies the query and reads item rows plus queryCoverage to understand missing metadata and export limits. The Actor does not promise every historical item or solve website snapshot extraction.

### Validation status

Local source feasibility uses Gutenberg texts and NASA movies with multiple pages. Local regression tests cover output, failure handling, privacy, limits, PPE delivery and the installed SDK's non-PPE charging mode. Earlier real local runs delivered 100 Gutenberg items, 100 NASA movie items and 1,000 Gutenberg items; every item count matched mock billing and each run added one uncharged summary. See `docs/reviews/2026-10-09-internet-archive-local-validation.json` for those source runs and `docs/reviews/2026-10-10-demand-system-review.md` for the subsequent repair verification in the source repository. Private cloud source reachability, full dataset delivery and live PPE parity are checked before Store publication.

# Actor input Schema

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

One to five public Advanced Search expressions, 1–500 characters each. Input-order queries share one global limit; identifier ascending, pages of 50. Later queries can remain unvisited. $0.001 per delivered unique item; summary and duplicates are free. Account/favorite selectors are excluded.

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

Global cap on unique delivered metadata rows across all queries, 1–1000. The uncharged summary is additional. Source/request limits may return fewer items with explicit coverage. $0.001 per delivered unique item; summary and duplicates are free.

## Actor input object example

```json
{
  "queries": [
    "collection:gutenberg AND mediatype:texts"
  ],
  "maxItems": 100
}
```

# Actor output Schema

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

Unique catalog item rows and one uncharged source coverage summary.

# 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": [
        "collection:gutenberg AND mediatype:texts"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jpmarketdata/internet-archive-library-search-export").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": ["collection:gutenberg AND mediatype:texts"] }

# Run the Actor and wait for it to finish
run = client.actor("jpmarketdata/internet-archive-library-search-export").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": [
    "collection:gutenberg AND mediatype:texts"
  ]
}' |
apify call jpmarketdata/internet-archive-library-search-export --silent --output-dataset

```

## MCP server setup

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

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/Sk5dMlnqnlXYA4UI1/builds/BSdWCuZnNoQUuGEyp/openapi.json
