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

Search archive.org and export item metadata (books, audio, video, software, web captures) via the official Advanced Search API, no key needed

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

## Pricing

from $0.50 / 1,000 results

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?

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 [archive.org](https://archive.org) and export item metadata -- books, audio recordings, videos, software, images, and web captures -- using the official [Advanced Search API](https://archive.org/advancedsearch.php). No API key or browser required.

### What it scrapes

The actor queries the Internet Archive's public JSON search endpoint and fetches item metadata. Optionally, it fetches the file manifest for each item (one extra request per item). Results are exported to a dataset.

### Inputs

| Name | Type | Default | Description |
|---|---|---|---|
| `query` | string | `mediatype:texts AND subject:python` | Archive.org search query (Lucene syntax). Supports field-scoped queries: `creator:tolkien`, `subject:jazz`, `collection:librivoxaudio`. |
| `mediatype` | string | *(empty)* | Narrow to a media type: `texts`, `audio`, `movies`, `software`, `image`, `web`, `data`. |
| `sort` | string | `downloads desc` | Sort order. Examples: `date desc`, `titleSorter asc`, `avg_rating desc`. |
| `maxItems` | integer | `100` | Maximum items to return. Hard cap: 10,000. |
| `includeFiles` | boolean | `false` | Also fetch the file manifest for each item. Makes one extra request per item -- significantly slower for large result sets. |

#### Query syntax

Archive.org uses Lucene syntax. Some useful patterns:

```
subject:jazz AND mediatype:audio
creator:"Ernest Hemingway"
collection:gutenberg AND language:english
date:[2020-01-01 TO 2023-12-31]
```

### Output fields

| Field | Type | Description |
|---|---|---|
| `identifier` | string | Unique Archive.org item ID |
| `title` | string | Item title |
| `creator` | array | Author(s) or creator(s) |
| `description` | string | Item description |
| `mediatype` | string | `texts`, `audio`, `movies`, `software`, `image`, etc. |
| `subject` | array | Subject tags |
| `date` | string | Original publication date |
| `year` | integer | Publication year |
| `language` | array | Language(s) |
| `downloads` | integer | Total download count |
| `item_size` | integer | Total size in bytes |
| `collection` | array | Collections the item belongs to |
| `publicdate` | string | Date added to Archive.org (ISO 8601) |
| `item_url` | string | Direct URL to the item page |
| `files` | array | File manifest (only when `includeFiles: true`) |

### Sample output

Result from query `mediatype:texts AND subject:python`, sorted by `downloads desc`:

```json
{"identifier":"python_ebooks_2020","title":"Python Ebooks","creator":["strugglez"],"description":"Python Ebooks","mediatype":"texts","subject":["python"],"date":null,"year":null,"language":["Latin"],"downloads":257128,"item_size":49856126105,"collection":["booksbylanguage_latin","booksbylanguage"],"publicdate":"2020-09-27T09:24:26Z","item_url":"https://archive.org/details/python_ebooks_2020","files":null}
```

### Pricing

Pay-per-result: **$0.50 per 1,000 items**. Fetching 100 items costs $0.05. Enabling `includeFiles` does not increase the per-item charge but increases runtime.

### Limitations

- Archive.org caps search results at 10,000 items per query. For larger data needs, paginate using date ranges or subject filters.
- `includeFiles: true` makes one extra HTTP request per item -- 1,000 items takes significantly longer and may hit rate limits.
- Some fields (`date`, `year`, `language`) are not consistently filled by archive contributors.
- The `collection` array includes personal favorites (prefixed `fav-`) alongside curated collections.

### Rate limits

The actor uses 500ms delays between search pages and 600ms delays between per-item file requests. Concurrency is kept at 1 (sequential). This respects archive.org's infrastructure.

### Legal

Archive.org's public search API is openly accessible with no authentication. Only public metadata is exported. No paywalled content or login-restricted data is accessed.

# Actor input Schema

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

Archive.org search query (Lucene syntax). Examples: "subject:jazz AND mediatype:audio", "creator:tolkien", "collection:librivoxaudio"

## `mediatype` (type: `string`):

Narrow results to a specific media type: texts, audio, movies, software, image, web, data. Leave blank to search all types.

## `sort` (type: `string`):

Sort results. Examples: "downloads desc", "date desc", "titleSorter asc"

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

Maximum number of items to return. Hard cap at 10,000.

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

Fetch the file manifest for each item. Makes one extra API request per item -- much slower for large result sets.

## Actor input object example

```json
{
  "query": "mediatype:texts AND subject:python",
  "mediatype": "",
  "sort": "downloads desc",
  "maxItems": 100,
  "includeFiles": false
}
```

# 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 = {
    "query": "mediatype:texts AND subject:python",
    "mediatype": "",
    "sort": "downloads desc",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("skillmerc/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 = {
    "query": "mediatype:texts AND subject:python",
    "mediatype": "",
    "sort": "downloads desc",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("skillmerc/internet-archive-search-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 '{
  "query": "mediatype:texts AND subject:python",
  "mediatype": "",
  "sort": "downloads desc",
  "maxItems": 100
}' |
apify call skillmerc/internet-archive-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,skillmerc/internet-archive-search-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/VJHyNbIogAZ90ws5O/builds/kjUUVrOSiE0lBFfIy/openapi.json
