# Open Library Book Scraper — Search, Works & ISBN API (`bovi/openlibrary-scraper`) Actor

Scrape book data from Open Library (openlibrary.org) via the official public API. No auth, no proxy, no browser. Supports keyword search, work ID lookup, and ISBN lookup. Returns title, authors, publish year, ISBNs, subjects, edition count, ratings, cover URLs, and more. Pay per result.

- **URL**: https://apify.com/bovi/openlibrary-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (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.97 / 1,000 open library book scraper — search, works & isbns

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 Book Scraper — Search, Works & ISBN | from $0.50/1K

**Built for reading-app developers, academic researchers, and LLM dataset builders** who need structured book metadata by ISBN, keyword, or Open Library work ID. Official public API — no proxy, no auth, zero COGS.

Scrape book data from **Open Library** (openlibrary.org) via the **official public API**. No proxy. No auth. No browser. Pay per result.

### Features

- **Keyword search** — full-text across title, author, subject, or all fields
- **Work lookup** — direct fetch by Open Library work ID with description + subjects
- **ISBN lookup** — resolve ISBN-10 or ISBN-13 to edition data + parent work link
- **Ratings** — optional star ratings (average + count) via the ratings API
- **Cover images** — cover URLs in S / M / L size
- **`parse_confidence`** — machine-readable quality score in every record
- **Flat schema** — 19 fields, ready for CSV/JSON/BigQuery

### Why this beats the alternatives

| Actor | Price | API | Ratings | `parse_confidence` | Proxy needed |
|---|---|---|---|---|---|
| **This actor** | **$0.50/1k** | Official OL API | ✓ | ✓ | No |
| Most OL scrapers | $3–10/1k | HTML scraping | — | No | Required |
| Generic book scrapers | $5+/1k | DOM | — | No | Required |

**Our edge**: official Open Library JSON API (zero-auth, extremely stable), ratings support, `parse_confidence` field for drift detection, multi-mode batch processing.

### Input modes

| Mode | How to use | Returns |
|---|---|---|
| `searchQueries` | List of keyword queries | Work records matching query |
| `workIds` | List of OL work IDs (e.g. `OL893415W`) | Full work data + optional ratings |
| `isbns` | List of ISBN-10 or ISBN-13 | Edition data + parent work link |

### Output schema

| Field | Type | Description |
|---|---|---|
| `work_key` | string | Open Library work ID (e.g. `/works/OL893415W`) |
| `title` | string | Book title |
| `authors` | array | Author names (search) or author OL IDs (work/isbn) |
| `first_publish_year` | integer | Year of first publication |
| `isbn_list` | array | ISBNs (up to 20) |
| `subjects` | array | Subject / genre tags (up to 30) |
| `edition_count` | integer | Number of editions |
| `language` | array | Language codes (e.g. `["eng", "spa"]`) |
| `cover_url` | string | Cover image URL (S/M/L size) |
| `ratings_avg` | number | Star rating average (0–5) |
| `ratings_count` | integer | Number of ratings |
| `number_of_pages` | integer | Page count (median for search, edition for ISBN) |
| `description` | string | Work synopsis (work mode) or publisher info (isbn mode) |
| `url` | string | Canonical Open Library URL |
| `source` | string | `search` | `work` | `isbn` |
| `query` | string | Input that produced this record |
| `scraped_at` | string | ISO 8601 UTC run timestamp |
| `parse_confidence` | number | Quality score 0–1 (1.0 = perfect) |
| `warnings` | array | Machine-readable quality warnings |

### Pricing

Pay-per-result: **from $0.50 per 1,000 books** (`book-item` event). No subscription. Pay only for what you extract.

| Volume | Cost |
|--------|------|
| 100 books | ~$0.05 |
| 1,000 books | ~$0.50 |
| 10,000 books | ~$5.00 |

Open Library is a public archive — no compute-heavy rendering, minimal latency.
A typical run of 1,000 search results costs approximately $0.002 in compute.

***

### FAQ

**Do I need a proxy or API key?**
No. Open Library is a fully public API hosted by the Internet Archive — no authentication or proxy required.

**What output formats are available?**
JSON, CSV, and Excel — downloadable from the Apify dataset UI or via the REST API.

**Can I schedule this to run automatically?**
Yes. Use Apify's scheduler to refresh your book catalog on a cron schedule, and push updates via webhook.

**What if a barcode or work ID returns no result?**
The actor logs a warning and skips the record — it does not crash. Sparse or community-contributed entries (rare/old books) may have some fields null; `parse_confidence` flags these automatically.

### Notes

- `authors` field: **search mode** returns human-readable names. **Work/ISBN mode** returns Open Library author IDs (e.g. `/authors/OL79034A`) — a subsequent work lookup per author would be needed for names.
- `fetchRatings=true` adds one extra HTTP request per book — use only when ratings data is essential.
- Open Library has no official rate limit for read access. The actor makes sequential requests to stay well within reasonable limits.
- Data is community-contributed and may be incomplete for rare/old books.

### Example use cases

- Academic research — find all editions of a work by ISBN or subject
- Library catalog augmentation — enrich ISBN lists with metadata
- Reading apps — build book recommendation datasets
- Data journalism — analyze publishing trends by year, language, subject

*Not affiliated with the Internet Archive or openlibrary.org.*

***

### Use with AI agents (MCP)

This actor is available as an MCP tool for Claude, GPT-4, and other AI agents that support the Model Context Protocol:

```
https://mcp.apify.com/?tools=bovi/openlibrary-scraper
```

Pass an ISBN or keyword and get back structured book records — ideal for reading-app AI features and bibliographic RAG pipelines.

### Integrations

Built for reading-app developers and LLM dataset builders resolving ISBNs and keywords to structured book metadata — the JSON/dataset output drops into the tools you already run, no glue code:

- **n8n / Make / Zapier** — trigger a run or pipe every new dataset item into 500+ apps (Google Sheets, Airtable, Slack, HubSpot, your database) with no code: [n8n](https://docs.apify.com/platform/integrations/n8n), [Make](https://docs.apify.com/platform/integrations/make), [Zapier](https://docs.apify.com/platform/integrations/zapier).
- **Webhooks** — fire your own endpoint the moment a run finishes, to push results straight into your pipeline ([docs](https://docs.apify.com/platform/integrations/webhooks)).
- **MCP server** — expose this actor as a tool to Claude, Cursor, or any [MCP client](https://mcp.apify.com) so an AI agent can pull this data mid-conversation ([guide](https://blog.apify.com/how-to-use-mcp/)).
- **API & SDKs** — fetch the dataset as JSON, CSV, or Excel through the Apify REST API or the Python / JS SDKs.

See all [Apify integrations](https://apify.com/integrations).

# Actor input Schema

## `searchQueries` (type: `array`):

Keyword search terms (e.g. "dune herbert", "foundation asimov"). Each query searches Open Library's full catalog. Use workIds or isbns for direct lookups.

## `workIds` (type: `array`):

Open Library work IDs to fetch directly (e.g. OL893415W, OL46125W). Found in any Open Library URL: openlibrary.org/works/<ID>. Fetches full work data including description and subjects.

## `isbns` (type: `array`):

ISBN-10 or ISBN-13 values to look up (e.g. 9780441013593, 0441013597). Returns edition metadata and links to the parent work.

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

Maximum total book records to return across all queries/IDs. 0 = no limit (up to API maximum per query). Default 50.

## `fetchRatings` (type: `boolean`):

For search results: fetch star ratings (average + count) via the /works/<id>/ratings.json endpoint. Adds one extra request per book. Default false to keep costs low.

## `searchFields` (type: `string`):

Restrict keyword search to a specific field. all: full-text across all fields. title: book title only. author: author name only. subject: subject/genre. Default: all.

## `coverSize` (type: `string`):

Size of the cover\_url image returned. S: small (~50px), M: medium (~180px), L: large (~350px). Default M.

## Actor input object example

```json
{
  "searchQueries": [
    "dune frank herbert",
    "foundation asimov"
  ],
  "workIds": [],
  "isbns": [],
  "maxItems": 50,
  "searchFields": "all",
  "coverSize": "M"
}
```

# Actor output Schema

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

Dataset containing Openlibrary Scraper records (title, authors, first\_publish\_year, edition\_count, ratings\_avg, ratings\_count, subjects, language, cover\_url, url, parse\_confidence).

# 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 = {
    "searchQueries": [
        "dune frank herbert",
        "foundation asimov"
    ],
    "workIds": [],
    "isbns": [],
    "maxItems": 50,
    "fetchRatings": false,
    "searchFields": "all",
    "coverSize": "M"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/openlibrary-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 = {
    "searchQueries": [
        "dune frank herbert",
        "foundation asimov",
    ],
    "workIds": [],
    "isbns": [],
    "maxItems": 50,
    "fetchRatings": False,
    "searchFields": "all",
    "coverSize": "M",
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/openlibrary-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 '{
  "searchQueries": [
    "dune frank herbert",
    "foundation asimov"
  ],
  "workIds": [],
  "isbns": [],
  "maxItems": 50,
  "fetchRatings": false,
  "searchFields": "all",
  "coverSize": "M"
}' |
apify call bovi/openlibrary-scraper --silent --output-dataset

```

## MCP server setup

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