Read Book Text
get_book_textREAD PIPELINE step 2 — READ. Read a book's text. Call get_book first (step 1) for the chapter list, then come here. Preferred: use the chapter param to read one chapter at a time (includes [Page N] markers for citation). Alternatively, use from/to for explicit page ranges (e.g. from=1 to=50). When you find passages worth quoting, hand the page numbers to get_quote / get_quotes (step 3) for verbatim text + a citation link. TRUNCATION: the response always includes truncated: true/false. When truncated=true, the truncation_note field gives the exact next from/to values to call — this means content was cut short by a page-budget limit, NOT that the book ended. An AI agent MUST NOT infer end-of-book from pages_returned alone; check truncated first. Daily page budgets apply across get_book_text/get_quote/get_quotes: anonymous 500 pages/24h, signed-in 1,000, free Explorer keys 2,000, paid keys uncapped — sign in at sourcelibrary.org/auth/signin or get a key at sourcelibrary.org/developers. Corpus-scale text belongs on the dataset API (sourcelibrary.org/dataset), not on this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End page number (inclusive). Recommended chunk size: 50 pages. If the response has truncated=true, use the next from/to from truncation_note. | |
| from | No | Start page number (inclusive). Use with to for explicit page ranges. | |
| lang | No | ISO code of the EDITION to read, e.g. "es". Default "en". Resolved PER PAGE: a page with no text in that language comes back as English, labelled `translation_lang: "en"` (json) or `[Translation — en]` (plain), and the response carries lang_coverage. Chapter text is materialized in English only, so `chapter` with a non-English `lang` is served from the chapter's page range instead. | |
| part | No | Part number (1-based) for large chapters split into multiple parts | |
| format | No | json (default, structured with per-page fields) or plain (concatenated text with page markers) | |
| book_id | Yes | The book ID | |
| chapter | No | Chapter index (0-based). Preferred over from/to — returns pre-structured chapter text with embedded [Page N] markers. | |
| content | No | Which text to include: ocr (original language), translation (English), or both (default) |