About this endpoint
What it does
Reads one page of a PDF, scanned or digital, and returns it as Markdown, plain text, typed blocks with bounding boxes, and tables as HTML, Markdown, and cell rows, all in reading order.
Every response includes the total number of pages (page.count and the X-Page-Count header), so you can read a whole document by requesting page: 1, 2, 3, and so on. Each page is a separate request, and the document must be sent with each request.
Request Body Parameter(s)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| document | Object | Yes | The PDF to read. Provide exactly one of document.url or document.base64. |
| document.url | String | No* | Public http(s) URL of the PDF, up to 2,048 characters. The file must be 20 MiB or smaller. Private and internal addresses are refused. |
| document.base64 | String | No* | The PDF as base64 (a data: URI is also accepted), 20 MB or smaller once decoded. |
| page | Integer | No | The 1-based page number to read. Range: 1-1000. Default: 1. |
| dpi | Integer | No | Resolution used to render the page. Range: 72-300. Default: 200. The rendered page is capped at 25 megapixels; if the requested dpi would exceed this, a lower dpi is used automatically. |
| format | String | No | Response format: json (full result), markdown (page as text/markdown), or text (page as text/plain). Default: json. |
| mode | String | No | Reading mode: auto for varied documents, layout for structured blocks, or plain for a single text block. Default: auto. |
| include_blocks | Boolean | No | Whether to include blocks in the JSON response. Default: true. |
| charts | Boolean | No | Whether to convert bar, line, and pie charts into data tables. Default: true. |
* Exactly one of document.url or document.base64 must be provided. Sending both, or neither, returns an error.
Supported documents: PDFs up to 20 MiB and 1,000 pages. Password-protected PDFs are not supported.
Response
When format is json, the response contains all fields listed in Common Response Fields. For PDFs:
When format is markdown or text, the response is the page as text/markdown or text/plain, and the total page count is still available in the X-Page-Count header.



