---
name: "documents_read_pdf"
area: "documents"
title: "Read a PDF"
price: "free"
method: "POST"
url: "https://api.conecto.chat/v1/tools/documents_read_pdf"
mcp_server: "https://api.conecto.chat/mcp/documents"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/documents/documents_read_pdf"
---

# Read a PDF (`documents_read_pdf`)

The text of a PDF in the store, page by page, up to 50 pages a call.

The text of a PDF in the store, page by page (up to 50 pages a call; ask for later pages with first_page). Scanned pages without a text layer come back empty: files_ocr reads them ($0.005 a page).

Price: Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads. A call that fails costs nothing.

## Use it when

A PDF's words are needed: terms, a contract, a report.

- For a scan without a text layer, use [files_ocr](https://conecto.chat/tools/files/files_ocr.md).
- For looking at the pages as pictures, use [documents_page_images](https://conecto.chat/tools/documents/documents_page_images.md).

## Say this to your agent

> What do the delivery terms from our freight company say about damaged goods?

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `file_id` | string | yes | A file in the store (files_upload or files_list give its file_id). Exactly 36 characters. |  |  |
| `first_page` | integer | no | At least 1. |  | `1` |
| `last_page` | integer | no | At least 1. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `documents_read_pdf` on the MCP server `https://api.conecto.chat/mcp/documents` with these arguments:

```json
{
  "file_id": "7e9a1c3e-5b7d-4f9b-8d1f-4a6c8e0a2b5f"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/documents_read_pdf \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": "7e9a1c3e-5b7d-4f9b-8d1f-4a6c8e0a2b5f"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "documents_read_pdf",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.00",
  "balance_usd": "$19.75",
  "result": {
    "pages": [
      {
        "page": 1,
        "text": "Delivery terms"
      },
      {
        "page": 2,
        "text": "7. Damaged goods: report visible damage on the delivery receipt at once, hidden damage within 7 days in writing."
      }
    ],
    "page_count": 2
  }
}
```

`result`: pages: each with its number and text; and page_count, the pages in the PDF.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No file in the store has that file_id. | Find it with files_list, or upload it first. |
| `invalid_input` | 400 | first_page is past the end of the PDF. | Ask for pages it has. |
| `invalid_pdf` | 422 | The PDF could not be read (damaged, or password-protected). | Ask for another copy. |
| `pdf_locked` | 422 | The PDF is password-protected. | Ask for a copy without a password. |
| `busy` | 503 | PDFs are being read for other calls right now. | Try again in a minute; nothing was charged. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [documents_create_pdf](https://conecto.chat/tools/documents/documents_create_pdf.md): Makes a PDF from Markdown or HTML and saves it in the file store with a download link. $0.02 a call.
- [documents_convert_to_pdf](https://conecto.chat/tools/documents/documents_convert_to_pdf.md): Turns a Word, Excel, PowerPoint, OpenDocument, RTF, CSV, text, Markdown or HTML file into a PDF; the original stays. $0.02 a call.
- [documents_template_fields](https://conecto.chat/tools/documents/documents_template_fields.md): The placeholders in a Word (.docx) template, so you know what data filling it needs. Free up to 1,000,000 reads a month.
- [documents_fill_template](https://conecto.chat/tools/documents/documents_fill_template.md): Makes a new Word file from a .docx template, its placeholders filled from data. $0.02 a call.
- [documents_merge_pdfs](https://conecto.chat/tools/documents/documents_merge_pdfs.md): Makes one PDF from several in the store, in the order given. $0.01 a call.
- [documents_page_images](https://conecto.chat/tools/documents/documents_page_images.md): The pages of a scanned PDF or a photo of a document as images to look at, up to 10 pages a call. $0.005 a call.
- [documents_create_deck](https://conecto.chat/tools/documents/documents_create_deck.md): A PowerPoint deck from your slides, plain or in the business's template, with editable charts, tables and each slide's sources. $0.10 a call.
