# Book Scraper — Titles, Authors & ISBNs (Open Library) (`eins332570/book-scraper`) Actor

Scrape book data — titles, authors, ISBNs, subjects, covers, ratings, and editions — from the Open Library public API into one unified dataset. Search by keyword or look up by ISBN or work ID. Great for book catalogs, library apps, and metadata enrichment. No login, no API key, no proxy.

- **URL**: https://apify.com/eins332570/book-scraper.md
- **Developed by:** [thanachit singruang](https://apify.com/eins332570) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Book Scraper — Titles, Authors & ISBNs (Open Library)

Scrape **book data** — titles, authors, ISBNs, subjects, covers, ratings, and editions — into **one unified dataset** using the free, public **Open Library API**. No login, no proxies, no browser. Just clean, structured book metadata.

Search by title/author/keyword, or look up specific books by **ISBN** or **Open Library work ID**.

### What you get

Every book is returned as one row (`recordType: "book"`), from whichever source it came:

| Field | Description |
|---|---|
| `bookId` | work ID or ISBN, whichever identifies the record |
| `workId` | Open Library work ID (e.g. `OL27482W`) |
| `isbn` | an ISBN for the book (when available) |
| `title` | book title |
| `authors` | list of author names |
| `firstPublishYear` | earliest publication year |
| `publishDate` | edition publish date (from ISBN/work lookup) |
| `publishers` | publisher names |
| `editionCount` | number of known editions |
| `pages` | page count (median across editions, or the edition's own) |
| `rating` / `ratingCount` | average Open Library rating and vote count |
| `languages` | language codes |
| `subjects` | subjects / genres |
| `description` | synopsis (from ISBN/work lookup) |
| `coverUrl` | cover image |
| `url` | Open Library page |
| `origin` | which lookup produced the row: `search` / `isbn` / `work` |

### Input

```json
{
  "search": ["the hobbit"],
  "isbns": ["9780547928227"],
  "workIds": ["OL27482W"],
  "language": "eng",
  "limit": 20
}
```

- **search** — titles, authors, or keywords to search on Open Library.
- **isbns** — ISBN-10 or ISBN-13 (hyphens/spaces are ignored).
- **workIds** — Open Library work IDs (the `OL...W` in the work URL).
- **language** — optional 3-letter code to filter search results (e.g. `eng`).
- **limit** — max books per search query (1–100).

Provide at least one of `search`, `isbns`, or `workIds`. Books found across multiple sources are de-duplicated.

### Sample output

One dataset row (a book from a search query):

```json
{
  "recordType": "book",
  "origin": "search",
  "bookId": "OL893414W",
  "workId": "OL893414W",
  "isbn": "9780441007493",
  "title": "Dune",
  "authors": ["Frank Herbert"],
  "firstPublishYear": 1965,
  "editionCount": 161,
  "pages": 606,
  "rating": 4.3031673,
  "ratingCount": 442,
  "languages": ["eng", "fre", "spa", "rus", "pol"],
  "subjects": ["Dune (Imaginary place)", "Fiction", "Science fiction"],
  "coverUrl": "https://covers.openlibrary.org/b/id/11481354-L.jpg",
  "url": "https://openlibrary.org/works/OL893414W"
}
```

### Why it's reliable & cheap

Every request hits the **public Open Library JSON API** — no headless browser, no anti-bot walls, no API key. Transient errors (rate limits, 5xx, network blips) are retried automatically, and an unreachable or unknown source is reported and skipped — one bad source never fails the whole run.

### Use cases

- **Book catalogs & library apps** — build a dataset of titles, authors, and covers
- **Metadata enrichment** — resolve an ISBN to full book details
- **Research & analytics** — subjects, publication years, edition counts, ratings
- **Recommendation pipelines** — subject and author overlap across a reading list

Data courtesy of [Open Library](https://openlibrary.org/developers/api) (a project of the Internet Archive).

### FAQ

**Do I need an API key or login?** No. It uses the free, public Open Library API — no key, no account, no proxy.

**Is it free to try?** Yes — click **Try for free** and run the prefilled search (`the hobbit`) in seconds.

**Does an ISBN lookup return the author?** Yes — the Actor follows the edition to its work and resolves author names for you.

**What's an Open Library work ID?** The `OL…W` in the work URL (`openlibrary.org/works/OL27482W` → `OL27482W`).

**Is this allowed?** Open Library (a project of the Internet Archive) provides this public API for developers; attribution is included in the output docs.

### Pricing

**Pay per result — $5 per 1,000 books.** Runs that return nothing cost nothing. No monthly fee, no proxy costs.

# Actor input Schema

## `search` (type: `array`):

Search Open Library by title, author, or keyword. Each query returns up to `limit` books. Example: \["the hobbit", "tolkien"].

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

Look up specific editions by ISBN-10 or ISBN-13 (hyphens/spaces are ignored), e.g. "9780547928227".

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

Look up works by their Open Library ID (the OL...W in the openlibrary.org/works/<id> URL), e.g. "OL27482W".

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

Optional 3-letter language code to filter search results (e.g. eng, spa, fre). Applies to search queries only.

## `limit` (type: `integer`):

Cap the number of books returned per search query (1–100). Ignored for ISBN/work lookups.

## Actor input object example

```json
{
  "search": [
    "the hobbit"
  ],
  "limit": 20
}
```

# Actor output Schema

## `items` (type: `string`):

All scraped book records as dataset items.

# 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 = {
    "search": [
        "the hobbit"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eins332570/book-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 = { "search": ["the hobbit"] }

# Run the Actor and wait for it to finish
run = client.actor("eins332570/book-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 '{
  "search": [
    "the hobbit"
  ]
}' |
apify call eins332570/book-scraper --silent --output-dataset

```

## MCP server setup

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