# Open Library Scraper — Books & ISBN Data (`ponderable_hydrometer/openlibrary-scraper`) Actor

Search books from Open Library — title, authors, year, editions, ratings, subjects, ISBN & covers. Look up editions by ISBN. Free keyless API. For catalogs, apps & datasets.

- **URL**: https://apify.com/ponderable_hydrometer/openlibrary-scraper.md
- **Developed by:** [Ponderable Hydrometer](https://apify.com/ponderable_hydrometer) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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?

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 Scraper — Books & ISBN Data

**Search the full Open Library catalogue for books and look up editions by ISBN — with community ratings, subjects, cover images and cross-IDs.** By query, title, author, subject or ISBN. Free, keyless, no proxies.

Google Books blocks keyless requests from datacenter IPs — this actor wins the **no-key book-data niche** with a full search surface plus direct ISBN edition lookup.

### What you get

**Works** (from search) — one row per work:

- `title`, `authors`, `firstPublishYear`, `editionCount`
- **Ratings** — `ratingsAverage`, `ratingsCount` (community reading-log data)
- `pagesMedian`, `subjects` (up to 20), `isbns` (up to 5), `publishers`, `languages`
- `firstSentence`, `coverUrl` (large cover image), Open Library `url` and `key`

**Editions** (from ISBN lookup) — one row per edition:

- `isbn`, `title`, `subtitle`, `authors` (refs), `publishers`, `publishDate`
- `numberOfPages`, `isbn10`, `isbn13`, `languages`, `subjects`, `coverUrl`, `url`, `key`

Every row carries a `type` field (`work` or `edition`) so mixed runs are easy to split.

### Output sample

Work (search result):

```json
{
  "type": "work",
  "key": "/works/OL1917071W",
  "title": "Clean Code",
  "authors": ["Robert C. Martin"],
  "firstPublishYear": 2008,
  "editionCount": 18,
  "ratingsAverage": 4.12,
  "ratingsCount": 176,
  "pagesMedian": 431,
  "subjects": ["Computer programming", "Software engineering"],
  "isbns": ["9780132350884", "0132350882"],
  "publishers": ["Prentice Hall"],
  "languages": ["eng"],
  "firstSentence": "You are reading this book for two reasons.",
  "coverUrl": "https://covers.openlibrary.org/b/id/8479576-L.jpg",
  "url": "https://openlibrary.org/works/OL1917071W"
}
```

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `query` | string | `clean code` | Free-text search across title, author, etc. |
| `title` | string | — | Search within titles |
| `author` | string | — | Search by author name |
| `subject` | string | — | Browse by subject/genre (e.g. `science_fiction`) |
| `language` | string | — | 3-letter language code (`eng`, `fre`, `ger`) |
| `sort` | string | — | `rating`, `new`, `old`, `editions`, `readinglog` (empty = relevance) |
| `isbns` | array | — | ISBN-10/13 for direct edition lookup |
| `maxResults` | integer | `100` | Cap on works returned from search |

Provide a search (`query`/`title`/`author`/`subject`) or `isbns`.

### Example input

```json
{
  "subject": "science_fiction",
  "sort": "rating",
  "maxResults": 100
}
```

ISBN enrichment:

```json
{ "isbns": ["9780132350884", "9780201616224"] }
```

### Why this actor

- **Keyless where Google Books isn't** — Open Library's open API, no key, no datacenter-IP blocks.
- **Full search surface** — title, author, subject, language and sort in one actor.
- **Ratings + covers + ISBNs** — community ratings and large cover URLs, plus ISBN edition lookup for catalog matching.
- **Reliable** — auto-retry and pagination up to your `maxResults`.

### Pricing

Pay per result — **$1.50 per 1,000 results** (one work or edition = one result), plus Apify's standard per-run start event ($0.00005 per GB of memory, so a fraction of a cent per run). No subscription.

### Related actors

- **Google Books Scraper** — books, ISBNs and prices via the Google Books API (bring your own key).
- **CrossRef Scholarly Works Scraper** — academic works and citations.
- **Discogs Scraper** — music releases, vinyl and price data.

### Notes

- Data is Open Library's free public API; the actor sets a descriptive User-Agent and retries on 429/5xx.
- Field completeness depends on contributors — popular titles are rich; obscure ones may miss ratings or covers.
- Edition `authors` and `languages` are Open Library key refs (e.g. `/authors/OL...A`), not plain names.
- This actor is an independent tool and is not affiliated with or endorsed by the Internet Archive / Open Library.

# Actor input Schema

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

Free-text search across title, author, etc., e.g. "clean code".

## `title` (type: `string`):

Search within book titles, e.g. "the pragmatic programmer".

## `author` (type: `string`):

Search by author name, e.g. "Isaac Asimov".

## `subject` (type: `string`):

Browse by subject/genre, e.g. "science_fiction", "machine_learning".

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

Filter by 3-letter language code, e.g. "eng", "fre", "ger".

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

e.g. rating, new, old, editions, readinglog. Empty = relevance.

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

Look up specific editions by ISBN-10 or ISBN-13, e.g. \["9780132350884"].

## `maxResults` (type: `integer`):

Cap on number of works returned from search.

## Actor input object example

```json
{
  "query": "clean code",
  "maxResults": 100
}
```

# Actor output Schema

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

All rows produced by this run, as JSON.

# 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": "clean code"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ponderable_hydrometer/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 = { "query": "clean code" }

# Run the Actor and wait for it to finish
run = client.actor("ponderable_hydrometer/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 '{
  "query": "clean code"
}' |
apify call ponderable_hydrometer/openlibrary-scraper --silent --output-dataset

```

## MCP server setup

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