# OnchainExpat x402 Books Search API

> OnchainExpat x402 Books Search API is a paid API for AI agents from x402.onchainexpat.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Search for books by title, author, or keyword using a pay-per-request x402-gated endpoint

## Facts

- Endpoint: POST https://x402.onchainexpat.com/api/x402-tools/books/search
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchainexpat-x402-books-search-api-0198e663
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K2HgY6NGtXoa0ysuAVtf0

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 onchainexpat-x402-books-search-api-0198e663 -d '<json body>'
```

Example prompt: Search for books by George Orwell and give me the titles, authors, and descriptions you find.

## When to prefer this

Use this endpoint when you need to search a book catalog by title, author, or keyword in a pay-per-use model via x402 micropayment protocol, especially when building crypto-native or agent-driven reading or research workflows.

## Known failure modes

- Payment not provided or insufficient — 402 Payment Required response
- Invalid or missing search query — 400 Bad Request
- No books found matching the query — empty results array
- Upstream book data source unavailable — 503 or 500 error
- Rate limiting or quota exceeded — 429 Too Many Requests

## How this service works

Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol

## Output

Returns a JSON array of book results matching the query, including metadata such as title, author, description, and potentially cover images or other book details.

## Example request

```json
{
 "query": "artificial intelligence"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "limit": {
   "type": "integer",
   "description": "Max results (default 10, max 50)"
  },
  "query": {
   "type": "string",
   "description": "Book search by title, author, or ISBN. Alias: 'q'"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "books": {
   "type": "array"
  },
  "count": {
   "type": "integer"
  },
  "query": {
   "type": "string"
  },
  "cached": {
   "type": "boolean"
  },
  "total_results": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchainexpat-x402-books-search-api-0198e663/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onchainexpat.com](https://www.zero.xyz/host/x402.onchainexpat.com/llms.txt)
