# Open Library Book Intelligence (`benthepythondev/book-intelligence`) Actor

Extract book metadata from Open Library's catalog of 20+ million books. Search by title, author, subject, or ISBN. Get cover images, ratings, edition counts, and publication data. Perfect for publishers, bookstores, libraries, app developers, and researchers.

- **URL**: https://apify.com/benthepythondev/book-intelligence.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Developer tools, Other, AI
- **Features:** Limited permissions
- **Stats:** 11 total users, 1 monthly users, 90.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Book Intelligence

**Extract book metadata, author information, and publication data from Open Library's 20M+ book catalog. Search by title, author, subject, ISBN, or keywords. Get covers, ratings, and availability.**

> **Data use.** This Actor can return personal data (such as names, handles or contact details). You are the controller of the data you collect with it: make sure you have a lawful basis under the GDPR and similar laws, collect only what you need, and do not use it for unsolicited marketing.

### What you get

- **26 structured fields per record** — `already_read_count`, `author_keys`, `authors`, `cover_id`, `cover_url`, `currently_reading_count`, `ebook_access`, `edition_count`…
- **Clean, validated JSON** ready for your pipeline
- **Pre-built dataset Overview** in the Apify Console for instant inspection
- **Reliable & maintained** — patched whenever the source changes

### Why this actor (vs. alternatives)

| | Build your own | Generic scraper | **This actor** |
|---|---|---|---|
| Maintenance | You patch every change | Often broken | Patched continuously |
| Structured output | Manual parsing | Inconsistent | Validated schema |
| Setup time | Days | Hours | Minutes |
| Pay only for results | N/A | Varies | Yes (pay-per-use) |

### Input

| Field | Type | Description |
|---|---|---|
| `mode` **(required)** | `string` | How to search for books Options: `search`, `by_isbn`, `by_subject`, `authors` |
| `query` | `string` | General search query (searches title, author, subject, etc.) |
| `title` | `string` | Search by book title |
| `author` | `string` | Search by author name |
| `subject` | `string` | Filter by subject (e.g., science_fiction, mystery, biography) |
| `language` | `string` | Filter by language code (e.g., eng, spa, fra, deu) |
| `isbns` | `array` | List of ISBNs to look up (ISBN-10 or ISBN-13) |
| `maxResults` | `integer` | Maximum number of books to return |

### Example Input

```json
{
  "mode": "search",
  "maxResults": 100
}
```

### Output (sample)

```json
{
  "key": "/works/OL1168083W",
  "title": "Nineteen Eighty-Four",
  "subtitle": null,
  "authors": [
    "George Orwell"
  ],
  "author_keys": [
    "OL118077A"
  ],
  "first_publish_year": 1949,
  "edition_count": 535,
  "ebook_access": "borrowable",
  "has_fulltext": true,
  "cover_id": 9267242,
  "cover_url": "https://covers.openlibrary.org/b/id/9267242-M.jpg",
  "isbn": [],
  "languages": [
    "ger",
    "pol",
    "spa",
    "cat",
    "jpn",
    "rum",
    "urd",
    "dut",
    "gre",
    "eng",
    "tur",
    "ind",
    "per",
    "swe",
    "por",
    "rus",
    "chi",
    "ukr",
    "nor",
    "ita",
    "ara",
    "fre"
  ],
  "subjects": [],
  "publishers": [],
  "publish_places": [],
  "number_of_pages_median": null,
  "ratings_average": null
}
```

### Use cases

- **Content / catalog apps** — populate listings with rich metadata
- **AI assistants** — ground LLM responses in real reference data
- **Education platforms** — teach with structured real-world data
- **Research** — analyze trends across the dataset
- **Recommendation engines** — power suggestions with metadata

### Pricing

**Pay-Per-Event:**

- $0.001 per result
- $0.00005 actor-start fee

#### Example runs

| Use case | Results | Cost |
|---|---|---|
| Quick scan | 100 | **$0.10** |
| Standard run | 500 | **$0.50** |
| Bulk dataset | 2,000 | **$2.00** |

### FAQ

**Q: How fresh is the data?**\
A: Real-time — every run fetches live from the source.

**Q: Do I pay for failed or empty runs?**\
A: You pay per result returned, plus a tiny actor-start fee.

**Q: Can I schedule recurring runs?**\
A: Yes — use the Apify Console scheduler for daily/weekly automation.

**Q: Can I export the data?**\
A: Yes — JSON, CSV, Excel, and API access are all supported by Apify.

### Related actors

- **[openlibrary-book-intelligence](https://apify.com/benthepythondev/openlibrary-book-intelligence)** — Open Library books
- **[recipe-intelligence](https://apify.com/benthepythondev/recipe-intelligence)** — recipe database
- **[cocktail-intelligence](https://apify.com/benthepythondev/cocktail-intelligence)** — cocktail recipes
- **[art-museum-intelligence](https://apify.com/benthepythondev/art-museum-intelligence)** — museum art collections

### Legal & compliance

This actor retrieves publicly accessible data only. You are responsible for respecting the source's Terms of Service, honoring robots.txt, and complying with GDPR / applicable regulations for any personal data.

### Support & feature requests

Open an issue on the Actor page or contact via Apify Console messaging. Custom features welcome.

# Actor input Schema

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

How to search for books

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

General search query (searches title, author, subject, etc.)

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

Search by book title

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

Search by author name

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

Filter by subject (e.g., science_fiction, mystery, biography)

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

Filter by language code (e.g., eng, spa, fra, deu)

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

List of ISBNs to look up (ISBN-10 or ISBN-13)

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

Maximum number of books to return

## Actor input object example

```json
{
  "mode": "search",
  "query": "dune",
  "maxResults": 10
}
```

# 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 = {
    "query": "dune",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/book-intelligence").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": "dune",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/book-intelligence").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": "dune",
  "maxResults": 10
}' |
apify call benthepythondev/book-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,benthepythondev/book-intelligence"
        }
    }
}
```

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/OSsa1S3URuVUxJln4/builds/V8v30s9yVIfU3bjGO/openapi.json
