# OpenLibrary Book Scraper — Titles, Authors & ISBNs (`hipersoft/openlibrary-scraper`) Actor

Search millions of books on OpenLibrary by keyword, author, subject or ISBN and get title, authors, publisher, year, subjects, ISBNs, edition count, ratings, page count and cover. Clean, no key.

- **URL**: https://apify.com/hipersoft/openlibrary-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Developer tools, Other
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0008 / book scraped

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/platform/actors/running/actors-in-store#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

## OpenLibrary Book Scraper — Titles, Authors, ISBNs & Ratings, structured JSON, no API key

Search millions of books on **OpenLibrary** (Internet Archive) by keyword, author, subject or ISBN and get back clean, structured JSON — title, authors, publishers, first publish year, subjects, languages, edition count, ISBNs, page count, ratings and a cover image URL. Mix and match search types in a single run and collect up to 1,000 books per query. **No account, no API key.** Great for catalog building, book discovery apps, research and metadata enrichment.

### Features

- 🔎 **Four ways to search** — combine `searchTerms` (keyword), `authors`, `subjects` and `isbns` in one run; every query is labeled in the output.
- 🧹 **Automatic dedup** — books appearing across multiple queries are deduplicated by their OpenLibrary work key.
- ↕️ **Sort control** — order results by `relevance`, `new`, `old`, `rating` or `editions`.
- 🏷️ **ISBN lookups** — resolve specific editions by ISBN, with digits normalized automatically.
- ⭐ **Ratings & reach** — average rating, rating count, edition count and median page count on every record.
- 🖼️ **Cover images** — a ready-to-use large cover URL plus full-text availability flag.
- 📈 **Scales cleanly** — up to 1,000 books per query with automatic pagination and retries.

### What you get

Each dataset row is one book:

```json
{
  "query": "machine learning",
  "title": "Deep Learning",
  "subtitle": "Adaptive Computation and Machine Learning",
  "authors": ["Ian Goodfellow", "Yoshua Bengio", "Aaron Courville"],
  "firstPublishYear": 2016,
  "publishers": ["MIT Press"],
  "subjects": ["Machine learning", "Neural networks (Computer science)"],
  "languages": ["eng"],
  "editionCount": 7,
  "isbn": "9780262035613",
  "isbns": ["9780262035613", "0262035618"],
  "pages": 775,
  "ratingAverage": 4.32,
  "ratingCount": 210,
  "hasFulltext": true,
  "coverUrl": "https://covers.openlibrary.org/b/id/8231856-L.jpg",
  "olKey": "/works/OL17860744W",
  "url": "https://openlibrary.org/works/OL17860744W"
}
```

### Input

```json
{
  "searchTerms": ["machine learning"],
  "authors": ["J.R.R. Tolkien"],
  "subjects": ["fantasy"],
  "isbns": ["9780262035613"],
  "sort": "relevance",
  "maxResultsPerQuery": 50
}
```

| Field | Description |
| --- | --- |
| `searchTerms` | General keyword searches across title, author and content. |
| `authors` | Find books by these authors. |
| `subjects` | Find books in these subjects (e.g. `fantasy`, `history`). |
| `isbns` | Look up specific books by ISBN. |
| `sort` | Result ordering: `relevance`, `new`, `old`, `rating` or `editions`. |
| `maxResultsPerQuery` | Maximum books per search/author/subject/ISBN (1–1,000). |

### Use cases

- Build or enrich a book catalog with clean metadata, ISBNs and cover images.
- Power a book-discovery or recommendation feature filtered by subject and rating.
- Compile an author's bibliography with edition counts and publish years.
- Resolve a list of ISBNs into full structured records for a library or retail dataset.

### Pricing

Pay-per-event: you're billed a small amount per run and per item scraped — you only pay for what you get. See the **Pricing** tab for current rates.

### FAQ

**Do I need an API key?**
No. This Actor uses the public [OpenLibrary](https://openlibrary.org) search API — no account, login or API key required.

**How many books can I scrape per run?**
Up to 1,000 books per query via `maxResultsPerQuery`, and you can combine keyword, author, subject and ISBN queries in one run, so a single run can return several thousand books (deduped by OpenLibrary work key).

**Is scraping OpenLibrary legal?**
Yes. OpenLibrary (a project of the Internet Archive) openly publishes its catalog through a public search API, and this Actor reads only those openly available records and returns them as-is.

**What format is the output?**
Structured JSON — one record per book — exportable as JSON, CSV or Excel. Each record includes title, authors, publishers, first publish year, subjects, languages, edition count, ISBNs, page count, ratings and a cover image URL.

**Can I search by author, subject or ISBN?**
Yes. Combine `searchTerms` (keyword), `authors`, `subjects` and `isbns` in a single run, and order results with `sort` by `relevance`, `new`, `old`, `rating` or `editions`.

### Related Actors

Building a catalog or metadata dataset? These other hipersoft scrapers may be useful alongside this one:

- [OpenAlex Scraper](https://apify.com/hipersoft/openalex-scraper) — 250M+ scholarly works with citations, authors and abstracts
- [Crossref Scraper](https://apify.com/hipersoft/crossref-scraper) — DOIs, citation counts and metadata from 150M+ works
- [Wikipedia Scraper](https://apify.com/hipersoft/wikipedia-scraper) — structured article content and metadata from Wikipedia
- [arXiv Papers Scraper](https://apify.com/hipersoft/arxiv-scraper) — preprints with full abstracts and PDF links

### Notes

This Actor uses the public OpenLibrary search API and returns that catalog's own data as-is, over openly available records with no login required. It is an independent tool and is not affiliated with, endorsed by, or sponsored by OpenLibrary or the Internet Archive.

# Actor input Schema

## `searchTerms` (type: `array`):

General book searches (title, author, content).

## `authors` (type: `array`):

Find books by these authors.

## `subjects` (type: `array`):

Find books in these subjects, e.g. "fantasy", "history".

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

Look up specific books by ISBN.

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

Result ordering.

## `maxResultsPerQuery` (type: `integer`):

Maximum books to collect per search / author / subject / ISBN.

## Actor input object example

```json
{
  "searchTerms": [
    "science fiction",
    "cooking"
  ],
  "authors": [
    "J.R.R. Tolkien"
  ],
  "subjects": [
    "fantasy"
  ],
  "isbns": [
    "9780262035613"
  ],
  "sort": "relevance",
  "maxResultsPerQuery": 50
}
```

# 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 = {
    "searchTerms": [
        "machine learning"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/openlibrary-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "machine learning"
  ]
}' |
apify call hipersoft/openlibrary-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=hipersoft/openlibrary-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/38LbprWd2IyRB7Onj/builds/stKqTW6lTc0brf8mH/openapi.json
