Search Inside Books
openlibrary_search_insideSearch the full text of books scanned by the Internet Archive — the "which book contains this passage?" lookup that the metadata tools cannot answer. Quote a phrase for an exact-phrase match; bare terms match anywhere in the text. Each result is an Internet Archive item with the matching passages as snippets, plus a relevance score. The full-text index is an order of magnitude slower than the metadata endpoints (seconds, not milliseconds), so reach for it when the passage is the question, not as a general book search — use openlibrary_search_books for title, author, or subject. Results key on Internet Archive items rather than Open Library works: chain the returned ia_identifier to archive.org, or match it against the ia_identifiers on openlibrary_search_books results to reach the catalogue record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max matching items to return. Each carries its own snippets, so higher values grow the response quickly — prefer 10–20. | |
| query | Yes | Text to find inside scanned books. Wrap in double quotes for an exact-phrase match (e.g., "the spice must flow"); unquoted terms match independently and return far broader results. | |
| offset | No | Zero-based offset for pagination. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| total | No | Total matching Internet Archive items across all pages. | |
| notice | No | Guidance when the page is empty (how to broaden a query that matched nothing, or which offset to retry when offset ran past the end) or when the text output capped a per-item snippet list. Absent when neither applies. | |
| offset | No | Zero-based offset of the first returned match. | |
| matches | No | Matching items, up to limit, ordered by relevance. | |
| totalCount | No | Total matching items across all pages — the upstream match count, reported even when this page is empty because offset ran past the end. |