# extractpdfdata: Extract Data from PDF

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

Extracts the fields you name (e.g. invoice number, total, date) from a PDF – also scanned – as structured JSON. Name the fields with a short description; missing values come back as null. Works with scanned documents, photos, tables and handwriting. Processed in the EU by Mistral AI (no training on your data). Charged per page (13 credits), at most 8 pages per call.

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

## 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).
- `fields` (array<object>, optional) – Fields: Fields to extract. Either fields or jsonSchema.
  - `name` (string, required) – Name: Key in the result (letters, digits, _).
  - `type` (enum, optional, one of `string`, `number`, `boolean`, `date`, `array`, `object`, default `string`) – Type: string (default), number, boolean, date (YYYY-MM-DD), array, object.
  - `description` (string, optional) – Description: What to look for – the clearer, the better the result.
- `jsonSchema` (object, optional) – JSON schema: For experts: a JSON schema of the result instead of fields.

## Example: Extract Data from PDF

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