# Open Library Books: ISBN lookup and book search (`examsens.ai/open-library-books`) Actor

Looks up books by ISBN or searches Open Library by title, author, subject or keyword, and returns title, authors, edition, publisher, dates, subjects, languages, ratings and cover links, within Open Library's API rules.

- **URL**: https://apify.com/examsens.ai/open-library-books.md
- **Developed by:** [Ed Rayyis](https://apify.com/examsens.ai) (community)
- **Categories:** Education
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 book returneds

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

## Open Library Books: ISBN lookup and book search

Turn a list of ISBNs into full book records, or search Open Library's catalog by title, author, subject, publisher or keyword. It uses Open Library's own search API and follows its rules for applications.

For each ISBN you get the work and the matching edition:

- Title, subtitle, authors and Open Library author keys
- First publication year, number of editions, median page count
- The edition's title, publishers, publication date, languages, ISBN-10 and ISBN-13
- Subjects, languages, ratings average and count, ebook availability
- Cover image links for the work and the edition, and links to both pages
- `worksSharingIsbn`: how many works carry the same ISBN, so you can spot ISBNs that publishers reused

Searches return the same work fields for each result, with its rank and the total number of matches.

### Input

- ISBNs: ISBN-10 or ISBN-13, with or without hyphens. Check digits are verified, and an ISBN-10 also matches its ISBN-13 form. Up to 500 per run.
- Searches: up to 25 per run, searching everything or only the title, author, subject or publisher.
- Sort searches by relevance, newest, oldest, rating or number of editions.
- Results per search: 1 to 100 (default 20).
- Your contact email, optional. Open Library asks applications to identify themselves with one and allows them 3 requests a second instead of 1. It is sent in the User-Agent header and nowhere else.

### Output

One dataset item per book, with `inputType` (`isbn` or `search`), `input`, `workKey`, `workUrl`, `title`, `subtitle`, `authors`, `authorKeys`, `firstPublishYear`, `editionCount`, `medianPages`, `subjects`, `languages`, `publishers`, `ratingsAverage`, `ratingsCount`, `ebookAccess` and `coverUrl`. ISBN lookups add `matchedIsbn`, `worksSharingIsbn`, `editionKey`, `editionUrl`, `editionTitle`, `editionPublishers`, `editionPublishDate`, `editionLanguages`, `isbn10`, `isbn13` and `editionCoverUrl`; searches add `searchRank` and `totalResults`. An invalid ISBN, an ISBN Open Library does not hold, and a search with no results each give an item with `error`. An ISBN given twice, in any format, is looked up once.

### Open Library's rules

Open Library asks applications to batch lookups instead of sending hundreds of single book requests, to identify themselves, and not to use its API as a bulk data backend. This actor looks ISBNs up 50 to a request, sends one request at a time from one address, waits at least a second between requests (0.4 seconds when you give a contact email), and limits each run to 500 ISBNs and 25 searches. For whole catalog copies, Open Library publishes free monthly data dumps.

The actor is not affiliated with or endorsed by Open Library or the Internet Archive.

### Pricing

Pay per event: one `book-returned` event per book returned. Errors and empty searches are not charged. The run stops when it reaches the maximum charge you set.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

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

ISBN-10 or ISBN-13, with or without hyphens. Up to 500 per run, looked up 50 to a request.

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

Search terms. Up to 25 per run.

## `searchField` (type: `string`):

Which part of the record the searches look in.

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

Order of search results.

## `maxResultsPerSearch` (type: `integer`):

Books kept for each search.

## `contactEmail` (type: `string`):

Open Library asks applications to give a contact email in the User-Agent and then allows 3 requests a second instead of 1. It is sent in that header and nowhere else.

## Actor input object example

```json
{
  "isbns": [
    "9780140328721",
    "0-451-52653-8"
  ],
  "searchField": "all",
  "sortBy": "relevance",
  "maxResultsPerSearch": 20
}
```

# 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 = {
    "isbns": [
        "9780140328721",
        "0-451-52653-8"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/open-library-books").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 = { "isbns": [
        "9780140328721",
        "0-451-52653-8",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("examsens.ai/open-library-books").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 '{
  "isbns": [
    "9780140328721",
    "0-451-52653-8"
  ]
}' |
apify call examsens.ai/open-library-books --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,examsens.ai/open-library-books"
        }
    }
}
```

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/0IePEMy1lBw70iNVN/builds/RTGxHQarfZrENpVZm/openapi.json
