# Public Domain Book & Media Finder (Internet Archive) (`turboextract/public-domain-media-finder`) Actor

Search the Internet Archive's 40M+ books, audio, films and software. Get clean metadata, direct download links (PDF, EPUB, MP3, MP4) and optional full OCR text. Built for AI dataset builders, researchers, educators and publishers.

- **URL**: https://apify.com/turboextract/public-domain-media-finder.md
- **Developed by:** [Moses Ndambuki](https://apify.com/turboextract) (community)
- **Categories:** AI, For creators
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 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

## Public Domain Book & Media Finder: Internet Archive Library Search

**Search the Internet Archive's library of books, audio, films and software, and get clean metadata, direct download links (PDF, EPUB, TXT, MP3, MP4) and optional full OCR text for every item.** Built for AI dataset builders, researchers, educators, publishers and archivists.

One run replaces hours of clicking through archive.org search pages and item tabs.

***

### Who this is for

- **AI and NLP teams** collecting public domain books and transcripts for training or evaluation sets
- **Publishers and audiobook producers** sourcing out-of-copyright titles to republish
- **Researchers and historians** building corpora by author, period, subject or collection
- **Educators** assembling free reading lists and media libraries
- **Archivists and librarians** auditing what exists for a topic or collection

***

### What you get per item

```json
{
  "identifier": "adventuresofsher00doylrich",
  "url": "https://archive.org/details/adventuresofsher00doylrich",
  "title": "Adventures of Sherlock Holmes",
  "creators": ["Doyle, Arthur Conan, 1859-1930, author"],
  "year": 1892,
  "mediaType": "texts",
  "collections": ["cdl", "americana"],
  "languages": ["eng"],
  "subjects": ["Holmes, Sherlock -- Fiction", "Detective and mystery stories, English"],
  "downloads": 184483,
  "licenseUrl": null,
  "accessRestricted": false,
  "files": [
    { "name": "adventuresofsher00doylrich.pdf", "format": "Text PDF", "sizeBytes": 26124425, "url": "https://archive.org/download/adventuresofsher00doylrich/adventuresofsher00doylrich.pdf" },
    { "name": "adventuresofsher00doylrich.epub", "format": "EPUB", "sizeBytes": 29054469, "url": "https://archive.org/download/adventuresofsher00doylrich/adventuresofsher00doylrich.epub" }
  ],
  "fullTextBytes": 613882,
  "fullText": "ADVENTURES OF SHERLOCK HOLMES ...",
  "fullTextTruncated": true
}
```

***

### How it works

```mermaid
flowchart LR
    A[Query, media type, collection, author, years] --> B[Internet Archive search API]
    B --> C[Drop borrow-only lending books]
    C --> D[Item metadata API: files and access]
    D --> E[Keep useful formats: PDF, EPUB, TXT, MP3, MP4]
    E --> F[Optional: full OCR text for books]
    F --> G[One row per item in dataset]
```

All data comes from the Internet Archive's official public APIs. No login, no browser, no scraping of HTML pages.

***

### Quick start

1. Click **Try for free**.
2. Type a query, e.g. `sherlock holmes`, and pick a media type.
3. Optional: set **Published up to year** to `1929`, turn on **Include full OCR text**.
4. Click **Start**, then export to JSON, CSV or Excel.

#### API

```bash
curl -X POST "https://api.apify.com/v2/acts/Turboextract~public-domain-media-finder/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "cookbook",
    "mediaType": "texts",
    "language": "English",
    "yearTo": 1925,
    "includeFullText": true,
    "maxItems": 500
  }'
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("Turboextract/public-domain-media-finder").call(run_input={
    "collections": ["librivoxaudio"],
    "mediaType": "audio",
    "query": "dickens",
    "maxItems": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    mp3s = [f["url"] for f in item.get("files", []) if "MP3" in f["format"]]
    print(item["title"], len(mp3s), "tracks")
```

***

### Input

| Field | Default | What it does |
|---|---|---|
| `query` | – | Keywords or Internet Archive query syntax |
| `mediaType` | texts | Books, audio, films, software, images, data, live music or any |
| `collections` | – | e.g. `gutenberg`, `americana`, `librivoxaudio`, `prelinger` |
| `creator` | – | Author or creator |
| `language` | – | `English` or `eng` style codes |
| `yearFrom` / `yearTo` | – | Publication year range |
| `openLicenseOnly` | false | Only items declaring a CC or Public Domain Mark license |
| `excludeLendingLibrary` | true | Skip borrow-only, in-copyright books |
| `sortBy` | downloads | Most downloaded, relevance, recently added, by date |
| `includeFiles` | true | Direct download links |
| `includeFullText` | false | Full OCR text for books |
| `maxTextChars` | 200,000 | Text cap per item |
| `maxItems` | 100 | Cap per run |

***

### Pricing

**$0.003 per item delivered, download links and full text included.** 1,000 books with full text cost $3.

| Option | 1,000 books with metadata and text |
|---|---|
| **Public Domain Book & Media Finder** | **$3**, one run, CSV or JSON |
| Manual archive.org search | Days of clicking item pages and download tabs |
| Writing your own pipeline | Learning two APIs, OCR file naming, retries and pagination |

***

### Use cases

- **LLM training corpus**: pre-1929 English fiction with full text, sorted by popularity
- **Audiobook sourcing**: LibriVox recordings by author with MP3 links
- **Film archive research**: Prelinger and public domain feature films by decade
- **Reading lists**: most downloaded public domain titles on any subject

***

### Pairs well with

- [AI Training Dataset Builder](https://apify.com/Turboextract/ai-training-dataset-builder): turn URLs into cleaned, chunked training text
- [Research Citation Explorer](https://apify.com/Turboextract/research-citation-explorer): map academic papers and citations around a topic
- [Expired Domain Content Recovery](https://apify.com/Turboextract/wayback-site-recovery): restore old websites from the same archive

***

### FAQ

**Is everything public domain?** No. The Internet Archive hosts items under many licenses. Use `yearTo`, `openLicenseOnly` and the `licenseUrl` field, and check rights before republishing.

**Why are some items missing full text?** Only scanned books have OCR text. Audio, video and some uploads do not.

**Is there a result limit?** The search API pages up to 10,000 results per query. Split big jobs by year or collection.

**Do you download the files?** No, you get direct download URLs so you can fetch only what you need.

***

### Support

- Docs and examples: https://github.com/andersonjames38phd-cpu/public-domain-media-finder
- Community Discord: https://discord.gg/8SrXSCpvgj

Built and maintained by [Turboextract](https://apify.com/Turboextract) on the Apify platform.

# Actor input Schema

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

Keywords, or Internet Archive query syntax, e.g. "sherlock holmes" or title:(cookbook).

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

Type of Internet Archive items to search.

## `collections` (type: `array`):

Optional collection IDs, e.g. "gutenberg", "americana", "librivoxaudio", "prelinger".

## `creator` (type: `string`):

Optional, e.g. "Doyle, Arthur Conan".

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

Optional. Name ("English") or MARC code ("eng").

## `yearFrom` (type: `integer`):

Optional. e.g. 1800.

## `yearTo` (type: `integer`):

Optional. e.g. 1929 for works likely in the US public domain.

## `openLicenseOnly` (type: `boolean`):

Keep only items that declare a license URL (Creative Commons or Public Domain Mark).

## `excludeLendingLibrary` (type: `boolean`):

Skips in-copyright books that can only be borrowed, so every result is freely downloadable.

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

Order of results.

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

Adds direct links to PDF, EPUB, TXT, MP3, MP4 and other files.

## `includeFullText` (type: `boolean`):

Adds the full plain text of each book. Great for AI training and search indexes.

## `maxTextChars` (type: `integer`):

Full text longer than this is truncated.

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

Maximum items delivered (and charged) per run.

## Actor input object example

```json
{
  "query": "sherlock holmes",
  "mediaType": "texts",
  "openLicenseOnly": false,
  "excludeLendingLibrary": true,
  "sortBy": "downloads",
  "includeFiles": true,
  "includeFullText": false,
  "maxTextChars": 200000,
  "maxItems": 100
}
```

# Actor output Schema

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

One row per Internet Archive item with metadata, download links and optional full text.

# 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": "sherlock holmes"
};

// Run the Actor and wait for it to finish
const run = await client.actor("turboextract/public-domain-media-finder").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": "sherlock holmes" }

# Run the Actor and wait for it to finish
run = client.actor("turboextract/public-domain-media-finder").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": "sherlock holmes"
}' |
apify call turboextract/public-domain-media-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,turboextract/public-domain-media-finder"
        }
    }
}
```

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/eRCneBBLMDI6keO0B/builds/r6hrgbpmyFjaeXLPJ/openapi.json
