# Internet Archive Search Scraper (`crawlergang/internet-archive-search-scraper`) Actor

Searches and retrieves items from the Internet Archive (archive.org) - 44M+ books, videos, audio, software, and web archives. Free, no API key required.

- **URL**: https://apify.com/crawlergang/internet-archive-search-scraper.md
- **Developed by:** [Crawler Gang](https://apify.com/crawlergang) (community)
- **Categories:** Automation, Integrations, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 11 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Search Scraper

Search and retrieve items from the **Internet Archive** (archive.org) — the world's largest digital library with 44M+ books, videos, audio recordings, software, and web archives. Free, no API key required.

### What does this actor do?

This actor lets you:

- **Search** the entire Internet Archive by keyword with filters for media type, collection, language, date range, and sort order.
- **Fetch specific items** by their unique Archive.org identifiers, getting enriched metadata including file counts and item sizes.

### Data Source

All data is retrieved from the [Internet Archive](https://archive.org) public API:

- **Advanced Search API**: `https://archive.org/advancedsearch.php` — free, no authentication required.
- **Metadata API**: `https://archive.org/metadata/{identifier}` — free, no authentication required.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | Select | `search` (default) or `byIdentifiers` |
| `query` | String | Search keywords (e.g. "public domain books", "jazz music") |
| `mediaType` | Select | Filter by type: texts, audio, movies, software, image, etree, data, web, collection, account |
| `collection` | String | Filter by collection slug (e.g. "gutenbergbooks", "librivoxaudio", "prelinger") |
| `language` | String | Filter by language code (e.g. "eng", "fra", "spa") |
| `dateFrom` | String | Start date filter (YYYY or YYYY-MM-DD) |
| `dateTo` | String | End date filter (YYYY or YYYY-MM-DD) |
| `sortBy` | Select | Sort order: most downloaded, newest, oldest, or alphabetical |
| `identifiers` | Array | Specific Archive.org identifiers (for byIdentifiers mode) |
| `maxItems` | Integer | Max items to return (default: 50, max: 5000) |

#### Example Inputs

**Search for classic literature texts:**

```json
{
  "mode": "search",
  "query": "shakespeare",
  "mediaType": "texts",
  "language": "eng",
  "maxItems": 25
}
```

**Fetch specific items by identifier:**

```json
{
  "mode": "byIdentifiers",
  "identifiers": ["gutenberg-hamlet", "adventures_of_huckleberry_finn_librivox"],
  "maxItems": 10
}
```

**Search for audio recordings in a date range:**

```json
{
  "mode": "search",
  "query": "blues music",
  "mediaType": "audio",
  "dateFrom": "1920",
  "dateTo": "1960",
  "sortBy": "-publicdate",
  "maxItems": 100
}
```

### Output

Each item in the dataset contains:

| Field | Description |
|-------|-------------|
| `identifier` | Unique Archive.org identifier |
| `url` | Direct URL to the item page (archive.org/details/{identifier}) |
| `title` | Item title |
| `description` | Item description |
| `creator` | Author or creator |
| `date` | Creation or publication date |
| `mediatype` | Type of media (texts, audio, movies, etc.) |
| `collection` | Collection it belongs to |
| `language` | Language code(s) |
| `subject` | Subject tags (up to 10) |
| `format` | File format(s) (up to 5) |
| `downloads` | Total download count |
| `files_count` | Number of files in the item (byIdentifiers mode) |
| `item_size` | Total size in bytes (byIdentifiers mode) |
| `server` | Serving server hostname (byIdentifiers mode) |
| `scrapedAt` | ISO 8601 timestamp of when data was scraped |

#### Example Output

```json
{
  "identifier": "gutenberg-hamlet",
  "url": "https://archive.org/details/gutenberg-hamlet",
  "title": "Hamlet",
  "description": "A classic tragedy by William Shakespeare",
  "creator": "William Shakespeare",
  "date": "1603",
  "mediatype": "texts",
  "collection": "gutenbergbooks",
  "language": "eng",
  "subject": ["drama", "tragedy", "Shakespeare"],
  "format": ["PDF", "EPUB", "Plain Text"],
  "downloads": 85432,
  "scrapedAt": "2026-01-15T10:30:00+00:00"
}
```

### Frequently Asked Questions

**Is this free to use?**
Yes. The Internet Archive provides a completely free public API with no authentication required.

**How many items can I retrieve?**
Up to 5,000 items per run using the `maxItems` parameter.

**What media types are available?**
Texts (books), Audio, Movies/Video, Software, Images, Live Music (etree), Data sets, Web Archives, and Collections.

**Can I filter by collection?**
Yes — use the `collection` field with a collection slug (e.g. "gutenbergbooks" for Project Gutenberg books, "librivoxaudio" for LibriVox audiobooks, "prelinger" for Prelinger Archives films).

**Can I search in specific languages?**
Yes — use ISO 639-3 language codes like "eng" (English), "fra" (French), "spa" (Spanish), "deu" (German).

**What are identifiers?**
Every Internet Archive item has a unique identifier (e.g. "gutenberg-hamlet"). You can find these in Archive.org URLs: `archive.org/details/{identifier}`.

**How is the data rate-limited?**
The actor adds a 0.3s delay between search pages and 0.5s between metadata requests to respect the API's guidelines.

### Use Cases

- Building digital library catalogs
- Research on public domain content
- Finding historical audio/video recordings
- Locating old software for preservation research
- Downloading metadata for academic research
- Tracking download statistics for archive items

# Actor input Schema

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

What to fetch: search across all collections, or fetch specific items by identifier.

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

Free-text search query (e.g. "shakespeare", "jazz music", "public domain books"). Used in mode=search.

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

Filter results to a specific media type.

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

Filter by a specific collection (e.g. "gutenbergbooks", "librivoxaudio", "prelinger"). Leave blank for all.

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

Filter by language code (e.g. "eng", "fra", "spa", "deu"). Leave blank for all languages.

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

Return items dated from this date (e.g. "1900", "1920-01-01").

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

Return items dated up to this date (e.g. "2000", "1999-12-31").

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

How to sort search results.

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

Specific Internet Archive identifiers to fetch (e.g. \["gutenberg-the-great-gatsby", "adventures\_of\_huckleberry\_finn\_librivox"]).

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

Maximum number of items to return.

## Actor input object example

```json
{
  "mode": "search",
  "query": "public domain books",
  "mediaType": "texts",
  "sortBy": "-downloads",
  "identifiers": [],
  "maxItems": 50
}
```

# Actor output Schema

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

Dataset containing all scraped Internet Archive items.

# 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": "public domain books",
    "mediaType": "texts",
    "sortBy": "-downloads",
    "identifiers": [],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlergang/internet-archive-search-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 = {
    "mode": "search",
    "query": "public domain books",
    "mediaType": "texts",
    "sortBy": "-downloads",
    "identifiers": [],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlergang/internet-archive-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "public domain books",
  "mediaType": "texts",
  "sortBy": "-downloads",
  "identifiers": [],
  "maxItems": 50
}' |
apify call crawlergang/internet-archive-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlergang/internet-archive-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hsElbe97JZexuhVeY/builds/haKHjijAkzs6xpggu/openapi.json
