# Open Library Scraper — Books, Authors & Editions (`openclawmara/openlibrary-scraper`) Actor

Scrape Open Library (Internet Archive) for books, authors, and editions. Modes: search by title/author/subject, book details by ISBN/OLID, author works, recent additions. Extracts titles, authors, ISBNs, covers, subjects, publish dates, editions. Uses official Search & Works API. No auth.

- **URL**: https://apify.com/openclawmara/openlibrary-scraper.md
- **Developed by:** [OpenClaw Mara](https://apify.com/openclawmara) (community)
- **Categories:** AI, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 89.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 book scrapeds

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

## Open Library Book Scraper — 45M+ Books, Authors, and Editions

**$0.005 per record** · Rich book and author metadata from **[Open Library](https://openlibrary.org)** — the Internet Archive's open book catalog with **45M+ works**, 80M+ editions, ISBNs, subjects, covers, and author bios.

Built for **book recommendation engines**, **library automation**, **reading-list apps**, **competitor analysis for publishers**, and **LLM/RAG corpora on literature**.

***

### What You Get

- **Search** — find books by title, author, subject, or ISBN
- **Book details** — full work metadata: editions, subjects, covers, first-publish year, description
- **Author details** — biography, photo, work count, alternate names, birth/death dates
- **Trending** — currently popular works (great for homepages)
- **Structured output** — JSON with stable Open Library keys, ready for downstream pipelines
- **No authentication required** — public Open Library API

***

### 4 Use Cases (ready-to-run JSON inputs)

#### 1. Book recommendation engine (search by subject)

```json
{
  "mode": "search",
  "query": "science fiction",
  "limit": 50,
  "sort": "editions"
}
```

Top 50 sci-fi works sorted by edition count (proxy for popularity and cross-language availability). Perfect for seed data in recommender systems.

#### 2. Build a book catalog for an app

```json
{
  "mode": "book_details",
  "workKey": "OL27448W"
}
```

Full work detail (subjects, editions, description, covers) for "The Lord of the Rings". Use for book pages in reading apps, library systems, or RAG over literary knowledge.

#### 3. Author intelligence

```json
{
  "mode": "author_details",
  "authorKey": "OL23919A"
}
```

Full profile for a specific author (bio, photo, work count, birth/death dates). Great for author pages or literary research.

#### 4. What's popular right now

```json
{
  "mode": "trending",
  "limit": 20
}
```

Top 20 trending works on Open Library — use as a daily "what's hot" feed for a reading newsletter or a public library homepage.

***

### Input Schema

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | enum | `search` | `search` / `book_details` / `author_details` / `trending` |
| `query` | string | — | Search term (title, author, subject, ISBN) |
| `limit` | integer | `10` | Max results (1–100) |
| `sort` | enum | `relevance` | `relevance` / `editions` / `old` / `new` |
| `language` | string | — | ISO-3 language code (`eng`, `spa`, `fre`, `rus`, …) |
| `workKey` | string | — | Open Library work key (`OL27448W` or `/works/OL27448W`) |
| `authorKey` | string | — | Open Library author key (`OL23919A` or `/authors/OL23919A`) |

### Output (sample — `book_details`)

```json
{
  "key": "/works/OL27448W",
  "title": "The Lord of the Rings",
  "description": "One Ring to rule them all, One Ring to find them...",
  "first_publish_year": 1954,
  "subjects": ["Fantasy fiction", "Middle Earth", "Wizards"],
  "authors": [{"key": "/authors/OL26320A", "name": "J.R.R. Tolkien"}],
  "covers": [{"id": 12345, "url": "https://covers.openlibrary.org/b/id/12345-L.jpg"}],
  "edition_count": 120,
  "language_codes": ["eng", "rus", "spa", "fre", "deu"],
  "openlibrary_url": "https://openlibrary.org/works/OL27448W"
}
```

***

### Pricing & Performance

- **Pay-per-event:** $0.005 per book or author record
- **Typical cost:** $0.05 for 10 books, $0.50 for 100 books, $5 for 1,000 records
- **Speed:** ~10–20 records/second (rate-limit-safe)
- **Free Apify tier:** $5/month credit = ~1,000 records

Compare to commercial book data APIs (Google Books quotas, Goodreads sunset): Open Library is **openly licensed** (CC0 / CC-BY-SA) and you pay only for extraction.

***

### Integrations

- **Algolia / Meilisearch / Elasticsearch** — index titles/subjects for book search
- **Zapier / Make / n8n** — new-release → Notion / Airtable / Slack
- **LangChain / LlamaIndex** — RAG over literary works (book summaries, subjects, author bios)
- **Vector DBs (Pinecone / Weaviate / Qdrant)** — embed descriptions/subjects for semantic "similar books"
- **Neo4j / Graphiti** — author→works→subject graph for literary knowledge graphs
- **Python SDK**
  ```python
  from apify_client import ApifyClient
  client = ApifyClient("<YOUR_TOKEN>")
  run = client.actor("Helpermara/openlibrary-scraper").call(run_input={
      "mode": "search",
      "query": "haruki murakami",
      "limit": 20
  })
  for book in client.dataset(run["defaultDatasetId"]).iterate_items():
      print(book["title"], book.get("first_publish_year"))
  ```
- **JavaScript SDK**
  ```js
  import { ApifyClient } from 'apify-client';
  const client = new ApifyClient({ token: '<YOUR_TOKEN>' });
  const { defaultDatasetId } = await client.actor('Helpermara/openlibrary-scraper').call({
    mode: 'trending', limit: 20
  });
  const { items } = await client.dataset(defaultDatasetId).listItems();
  console.log(items);
  ```

***

### FAQ

**How complete is Open Library?**  45M+ works, 80M+ editions, ~10M+ authors. Coverage is strongest for English-language fiction/non-fiction; growing for other languages.

**Covers?**  Yes — every book record includes cover image URLs at S/M/L sizes (hosted by Internet Archive).

**ISBN lookup?**  Use `search` mode with an ISBN string as the query — Open Library supports ISBN-10 and ISBN-13.

**What's the difference vs Google Books?**  Open Library is **openly licensed** (no API key quotas) and has better metadata for editions/translations. Google Books has stronger full-text search and preview snippets.

**Are author death dates reliable?**  Mostly yes for mainstream authors; long-tail authors may lack death dates. Use `author_details` to check completeness.

**License?**  Apify actor is free with pay-per-event pricing. Open Library data is CC0 (metadata) / CC-BY-SA (full-text).

***

### Companion Actors

- [Wikipedia Scraper](https://apify.com/Helpermara/wikipedia-scraper) — article data for book contextualization (author pages, movement pages)
- [CrossRef Scraper](https://apify.com/Helpermara/crossref-scraper) — 150M+ scholarly works (link books to academic citations)
- [Semantic Scholar Scraper](https://apify.com/Helpermara/semantic-scholar-scraper) — literary studies papers
- [Medium Article Scraper](https://apify.com/Helpermara/medium-article-scraper) — book reviews and literary essays

Use together for a **complete book-knowledge stack** — catalog + context + reviews + scholarship.

***

### Keywords

open library, books, book metadata, isbn, authors, editions, work key, book api, library automation, book recommendation, reading app, cover images, subjects, literary data, book search, goodreads alternative, google books alternative, internet archive, bibliographic data, catalog, book dataset

***

### Changelog

- **2026-04-24** — README rewrite: 4 use cases, pricing, integrations, FAQ
- **Prior** — stable; 4 modes (search / book\_details / author\_details / trending)

# Actor input Schema

## `mode` (type: `string`):

Scraping mode: search (find books), book\_details (single work), author\_details (single author), trending (daily trending)

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

Search term (for search mode). Supports title, author, subject, ISBN.

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

Maximum number of results to return (1-100)

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

Sort order for search results

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

Filter by language code (e.g., 'eng', 'spa', 'fre'). Leave empty for all languages.

## `workKey` (type: `string`):

Open Library work key for book\_details mode (e.g., OL2896994W or /works/OL2896994W)

## `authorKey` (type: `string`):

Open Library author key for author\_details mode (e.g., OL34184A or /authors/OL34184A)

## Actor input object example

```json
{
  "mode": "search",
  "query": "artificial intelligence",
  "limit": 10,
  "sort": "relevance"
}
```

# 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": "artificial intelligence"
};

// Run the Actor and wait for it to finish
const run = await client.actor("openclawmara/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": "artificial intelligence" }

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

```

## MCP server setup

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