# ocrpdf: OCR PDF – Extract Text from PDF

> ocrpdf (OCR PDF – Extract Text from PDF) is a 1001fx API function in the group Files & PDF: POST https://api.1001fx.com/files/ocrpdf, 6 credits per item. It works as a ready-made module in Make or as a plain HTTP call.

Reads the text of a PDF – also scanned PDFs – as Markdown or plain text, with tables, headings and embedded images. Works with scanned documents, photos, tables and handwriting. Processed in the EU by Mistral AI (no training on your data). Charged per page (6 credits), at most 8 pages per call.

- Group: Files & PDF
- Endpoint: `POST https://api.1001fx.com/files/ocrpdf`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: multipart/form-data
- Credits: 6 credits per item
- Ready-made in: Make
- Service provider: Mistral
- Docs: https://1001fx.com/functions/ocrpdf

## Parameters

- `file` (file, optional) – File: The PDF to read. Either file or fileUrl.
- `fileUrl` (string, optional) – File URL: Public URL of the PDF. Either file or fileUrl.
- `pages` (string, optional) – Pages: Pages to read, e.g. 1-3,7 (first page = 1). At most 8 pages per call; without it all pages (documents up to 8 pages).
- `outputFormat` (enum, optional, one of `markdown`, `text`, default `markdown`) – Output format: markdown (default) keeps headings and tables; text is plain text.
- `tableFormat` (enum, optional, one of `inline`, `markdown`, `html`, default `inline`) – Table format: inline (default): tables as Markdown in the text; markdown or html: tables separately in pages[].tables.
- `extractHeaderFooter` (boolean, optional, default `false`) – Separate header and footer: Return page headers and footers separately instead of in the text.
- `extractImages` (enum, optional, one of `urls`, `none`, `base64`, default `urls`) – Embedded images: urls (default): photos and figures as download links (48 h) in the text and in pages[].images; base64: inline; none: left out.
- `describeImages` (boolean, optional, default `false`) – Describe images: Adds a short description of every image, chart and figure. Costs 18 instead of 6 credits per page.

## Use cases

- Make scanned contracts searchable and store the text in a database
- Feed scanned documents as Markdown into an AI step
- Read tables from PDF reports and process them further

## Example: OCR PDF

```bash
curl -X POST 'https://api.1001fx.com/files/ocrpdf' \
  -H 'X-API-KEY: YOURSECRETAPIKEY'
```

## FAQ

**How many pages can I read per call?**

At most 8. Select the pages with pages, for example 1-3,7. Longer documents are read in several calls.

**Markdown or plain text?**

outputFormat markdown (default) keeps headings and tables, text returns plain text. Tables can also be returned separately as Markdown or HTML.

**Where is the PDF processed?**

In the EU by Mistral AI, without training on your data. Pass the file as upload or its public URL in fileUrl.
