# Open Library Books Scraper - ISBN, Authors & Editions (`eliai/open-library-books-scraper`) Actor

Search Open Library by title, author, subject or ISBN and get one row per work: authors, first publish year, edition count, a real ISBN-13, subjects, ratings, cover image and whether it can be read online now. $0.008 per book.

- **URL**: https://apify.com/eliai/open-library-books-scraper.md
- **Developed by:** [Broke to Built](https://apify.com/eliai) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.40 / 1,000 scraped books

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

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

## Open Library Books Scraper — ISBN, Authors & Editions

Search **Open Library** by title, author, subject or ISBN and get **one row per work**: authors,
first publish year, edition count, a real **ISBN-13**, subjects, ratings, a cover image, and
whether the book **can be read online right now**.

No API key, no account. **$0.008 per book** — a search that matches nothing is recorded and
**not charged**.

### Input

```json
{ "query": "dune", "searchBy": "title", "maxBooks": 50 }
```

Bulk, by author:

```json
{ "queries": ["Ursula K. Le Guin", "Octavia Butler"], "searchBy": "author", "maxBooks": 100 }
```

| Field | Type | Notes |
|---|---|---|
| `query` | string | A title, author, subject or ISBN. |
| `queries` | string\[] | Up to 10 searches per run. |
| `searchBy` | enum | `general`, `title`, `author`, `subject`, `isbn`. |
| `maxBooks` | integer | 1–200 per search. **You are charged per book returned.** |

### Output

```json
{
  "ok": true,
  "workId": "OL893415W",
  "url": "https://openlibrary.org/works/OL893415W",
  "title": "Dune",
  "authors": ["Frank Herbert"],
  "firstPublishYear": 1965,
  "editionCount": 218,
  "isbn13": "9780441013593",
  "isbnCount": 94,
  "languages": ["eng", "ger"],
  "medianPages": 528,
  "subjects": ["Science fiction", "Desert ecology"],
  "ratingsAverage": 4.24,
  "ratingsCount": 512,
  "coverUrl": "https://covers.openlibrary.org/b/id/12345-L.jpg",
  "ebookAccess": "borrowable",
  "readableOnline": true,
  "totalMatches": 1834
}
```

### What it gets right

- ⭐ **`isbn13` is really an ISBN-13.** A popular work carries dozens of ISBNs across printings and
  formats, and taking the first one hands you a 1970s ISBN-10 at random. This picks a genuine
  13-character identifier — the one every modern catalogue and retailer keys on — and reports
  `isbnCount` so you know how many editions sit behind it.
- **`workId` is bare**, not the `/works/OL…W` path, so it joins cleanly to other Open Library data.
- **`readableOnline` answers the actual question.** "Can I read this now?" is what a books dataset
  is usually for; it is derived from `ebook_access` and asserted to agree with it.
- **Only the fields you need are requested.** Open Library returns enormous documents by default;
  a scoped field list keeps runs fast and cheap.
- **Search is field-scoped**, so an author search does not drag in every book that mentions them.

### Pricing

**$0.008 per book returned.** A search matching nothing produces a `bookCount: 0` record with
`totalMatches` and **is not charged**.

### Limits

- 10 searches per run, up to 200 books each.
- Returns **work-level** records — the book, not a specific printing. `editionCount` and
  `isbnCount` tell you how much variation sits underneath.
- Ratings are Open Library's own and are sparse; many works have none.
- Open Library is community-maintained, so coverage and subject tagging vary by title.

### FAQ

**Do I need an API key?** No — Open Library is open data from the Internet Archive.

**Why is `ratingsAverage` often null?** Few works have been rated there.

**Can I get a specific edition?** Search `searchBy: "isbn"` for the printing you mean.

### Changelog

- **0.1 (2026-09-10)** — first release. Field-scoped search, real ISBN-13 selection, bare work ids,
  read-online status, offset paging.

# Actor input Schema

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

What to look for: a title, an author, a subject or an ISBN, depending on Search by.

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

Several searches in one run. Up to 10.

## `searchBy` (type: `string`):

Which field to search. General searches everything; the others are exact-field lookups.

## `maxBooks` (type: `integer`):

Pages 100 at a time. You are charged per book returned.

## Actor input object example

```json
{
  "query": "dune",
  "queries": [],
  "searchBy": "general",
  "maxBooks": 25
}
```

# Actor output Schema

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

Every item this run produced, as JSON.

## `resultsCsv` (type: `string`):

The same items as a spreadsheet-ready CSV.

# 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": "dune",
    "queries": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("eliai/open-library-books-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": "dune",
    "queries": [],
}

# Run the Actor and wait for it to finish
run = client.actor("eliai/open-library-books-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": "dune",
  "queries": []
}' |
apify call eliai/open-library-books-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eliai/open-library-books-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/0grHJg3SVjk9BSe7O/builds/VJ4cT1F3sYx5LbsnG/openapi.json
