# Open Library Book Search (x402)

> Open Library Book Search (x402) is a paid API for AI agents from x402-v2-mint-openlibrary-search.vercel.app, paid per call via x402, $0.020143/call, status unknown (last checked 2026-11-20).

Searches the Open Library catalog by query string and returns book metadata results, gated by x402 micropayment.

## Facts

- Endpoint: POST https://x402-v2-mint-openlibrary-search.vercel.app/v1/openlibrary-search?utm_source=zero.xyz
- Price: $0.020143/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/open-library-book-search-x402-37d9635f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UEFVlk6hSAPl-iehezexX

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-x402-37d9635f -d '<json body>'
```

Example prompt: Search Open Library for books about 'machine learning' and give me the top 5 results including title, author, and publication year.

## When to prefer this

Use this endpoint when you need programmatic, pay-per-call access to Open Library book search without requiring an API key. Ideal for agents that need bibliographic lookups on demand without managing credentials. Prefer over direct Open Library API calls when operating in an x402-compatible payment environment or when keyless access is required.

## Known failure modes

- No payment settled → 402 response with empty body (unpaid)
- Invalid or missing query after payment → 400 with charged:false
- Query returns zero results → empty docs array with charged:true
- Offset exceeds 10000 → request rejected
- Limit exceeds 50 → request rejected
- Open Library upstream unavailable → proxied error

## How this service works

Open Library search.json (keyless). POST {q}/{limit?}/{offset?}/{fields?}. Unpaid empty → 402; after settle empty/invalid → 400 charged:false. No catalog adjacency.

## Output

Returns a JSON object with ok:true, charged:true, and a summary field, along with matching book records from Open Library including titles, authors, subjects, edition counts, and Open Library keys, up to the requested limit.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "q": {
   "type": "string",
   "maxLength": 256
  },
  "limit": {
   "type": "integer",
   "maximum": 50,
   "minimum": 1
  },
  "fields": {
   "type": "string",
   "maxLength": 256
  },
  "offset": {
   "type": "integer",
   "maximum": 10000,
   "minimum": 0
  },
  "request_id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "openlibrary-search",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/open-library-book-search-x402-37d9635f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-openlibrary-search.vercel.app](https://www.zero.xyz/host/x402-v2-mint-openlibrary-search.vercel.app/llms.txt)
