# Internet Archive Scraper - archive.org Items, Metadata & Files (`inovaflow/internet-archive-scraper`) Actor

Search the Internet Archive (archive.org) and extract item metadata, files and direct download links. Books, movies, audio, software, images and data — no login required.

- **URL**: https://apify.com/inovaflow/internet-archive-scraper.md
- **Developed by:** [inovaflow](https://apify.com/inovaflow) (community)
- **Categories:** Other, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 archive records

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/platform/actors/running/actors-in-store#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

## Internet Archive Scraper

Search the [Internet Archive](https://archive.org) and export clean, structured data about its items — books, movies, audio, software, images and web captures — with direct download links. No login, no API key, no browser required.

Every result comes back as a clean, normalized record — archive.org's irregular fields flattened into a stable shape, with a direct, permanent download URL for each file — so it drops straight into your database, spreadsheet or ML pipeline.

### What you can do

- **Search** anything on archive.org — a plain keyword or phrase matches item titles, creators and subjects; power users can pass a full Lucene query.
- **Filter** by media type (texts, movies, audio, software, images, data, web…) and by collection.
- **Sort** by relevance, most downloaded, newest/oldest, or trending this week.
- **Get download links** — optionally pull every file in an item (PDF, EPUB, MP3, MP4, ZIP…) with a direct, stable download URL for each.
- **Fetch by identifier** — already know the items you want? Pass their identifiers and get full metadata straight away.

### Input

| Field          | Description                                                                                                                                             |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `searchQuery`  | Keyword or phrase — matches item title, creator & subject — or a full Lucene query (e.g. `grateful dead`, or `title:(python) AND year:[2015 TO 2020]`). |
| `mediaType`    | Restrict to one media type, or search all.                                                                                                              |
| `collection`   | Optional collection identifier (e.g. `librivoxaudio`, `nasa`).                                                                                          |
| `sortBy`       | Most relevant / most downloaded / newest / oldest / trending.                                                                                           |
| `maxItems`     | Cap on how many items to return (archive.org allows up to 10,000 per search).                                                                           |
| `includeFiles` | Also fetch each item's full file list with download URLs.                                                                                               |
| `identifiers`  | Fetch specific items directly by identifier (ignores the search query).                                                                                 |

### Output

Every item is one dataset record:

```json
{
    "identifier": "principleofrelat00eins",
    "title": "The principle of relativity",
    "creators": ["Einstein, Albert"],
    "date": "1920",
    "mediaType": "texts",
    "collections": ["cdl", "americana"],
    "subjects": ["Relativity (Physics)"],
    "downloads": 12873,
    "detailsUrl": "https://archive.org/details/principleofrelat00eins",
    "thumbnailUrl": "https://archive.org/services/img/principleofrelat00eins",
    "files": [
        {
            "name": "principleofrelat00eins.pdf",
            "format": "Text PDF",
            "sizeBytes": 8123456,
            "downloadUrl": "https://archive.org/download/principleofrelat00eins/principleofrelat00eins.pdf"
        }
    ]
}
```

(`files` / `filesCount` are included only when **Include file list & download links** is on.)

### Example use cases

- Build a dataset of public-domain books, films or audio for research or ML training.
- Monitor a collection for newly added items.
- Resolve a list of archive.org identifiers to full metadata and download URLs.
- Find the most-downloaded items on a topic.

### Pricing

**Pay-per-event** — you only pay for what a run returns:

| Event          | Price                                                                              |
| -------------- | ---------------------------------------------------------------------------------- |
| Actor start    | **$0.005** per run — one charge per GB of memory (so $0.005 at the default 512 MB) |
| Archive record | **$0.001** per item written to your dataset                                        |

A run that matches nothing costs only the start event. Example: a search returning 500 items ≈ $0.005 + 500 × $0.001 = **$0.505**. Use **Maximum items** to cap the per-record charges exactly, and turning on **Include file list & download links** adds no extra charge. Prices are always shown in the Apify Console before you run.

# Actor input Schema

## `searchQuery` (type: `string`):

What to search for on archive.org. A plain keyword or phrase matches item titles, creators and subjects (e.g. "grateful dead"). You can also pass an advanced Lucene query for full control (e.g. `title:(python) AND year:[2015 TO 2020]`). Leave empty if you are fetching specific items by identifier below.

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

Restrict results to one kind of item, or search across all of them.

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

Optional. Limit results to one archive.org collection by its identifier, e.g. "librivoxaudio", "nasa", or "prelinger".

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

How to order the search results.

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

Stop after this many items. Keeps run time and cost predictable. archive.org caps deep search paging at 10,000 results.

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

For every item, also fetch its full file list with direct download URLs (PDF, EPUB, MP3, MP4, ZIP, etc.). Adds one request per item, so it is a little slower.

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

Optional. A list of exact archive.org item identifiers (the last path segment of an archive.org/details/... URL). When set, the Actor fetches these items directly and ignores the search query above.

## Actor input object example

```json
{
  "searchQuery": "grateful dead",
  "mediaType": "",
  "sortBy": "relevance",
  "maxItems": 100,
  "includeFiles": false,
  "identifiers": []
}
```

# 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 = {
    "searchQuery": "grateful dead",
    "identifiers": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("inovaflow/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 = {
    "searchQuery": "grateful dead",
    "identifiers": [],
}

# Run the Actor and wait for it to finish
run = client.actor("inovaflow/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 '{
  "searchQuery": "grateful dead",
  "identifiers": []
}' |
apify call inovaflow/internet-archive-scraper --silent --output-dataset

```

## MCP server setup

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