# Open Library Book Search & Lookup API

> Open Library Book Search & Lookup API is a paid API for AI agents from api.scrapeforagents.tech, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Searches and retrieves structured book/work records from the Open Library public catalog by keyword, title, ISBN, or direct work URL

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/open?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/open-library-book-search-lookup-api-c612fec6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZHpU4OF4xx5g1-KxF7PWR

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability open-library-book-search-lookup-api-c612fec6 -d '<json body>'
```

Example prompt: Search Open Library for books about 'machine learning' in English, return up to 20 results, and include full work details like descriptions for each one.

## When to prefer this

Choose this endpoint when you need structured bibliographic data from the Open Library public catalog — especially for ISBN lookups, author bibliography searches, or enriching a list of book titles with metadata like edition counts and publication years. Prefer it over general web scraping when you want deduplicated, schema-consistent book records without parsing HTML.

## Known failure modes

- Empty results array when no catalog matches found for the search query
- Missing fields (e.g. subtitle, firstPublishYear) for works with incomplete Open Library records
- Rate limiting or timeout if many work detail fetches are requested simultaneously
- Invalid language code returns no filtered results or falls back to unfiltered
- Malformed work URL input causes that entry to be skipped silently

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

Returns a JSON object with a count and an array of work records, each containing the work ID, work URL, title, subtitle, author keys, author names, edition count, first publish year, and optionally a description if includeWorkDetails was true.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "language": {
   "type": "string",
   "default": "",
   "description": "Optional three-letter catalog language code, such as eng or spa, to filter searches. Direct work URLs are unaffected."
  },
  "maxItems": {
   "type": "integer",
   "default": 100,
   "minimum": 0,
   "description": "Maximum unique work records across all inputs. Set to 0 for no explicit limit."
  },
  "startUrls": {
   "type": "array",
   "description": "Optional public work URLs or IDs, such as https://openlibrary.org/works/OL66554W. Work records are processed before searches."
  },
  "searchQueries": {
   "type": "array",
   "description": "Keywords, titles, or ISBNs to search in the public catalog. Results are deduplicated by work ID."
  },
  "includeWorkDetails": {
   "type": "boolean",
   "default": false,
   "description": "Fetch each matching work record to add a description and fill some missing details. This uses an extra request per result."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "title": null,
    "workId": null,
    "workUrl": null,
    "subtitle": null,
    "authorKeys": null,
    "authorNames": null,
    "editionCount": null,
    "firstPublishYear": null
   }
  ],
  "product": "open"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/open-library-book-search-lookup-api-c612fec6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scrapeforagents.tech](https://www.zero.xyz/host/api.scrapeforagents.tech/llms.txt)
