---
title: "Extract PDF metadata and per-page text as JSON"
method: POST
path: "/api/v1/pdf-to-json"
tags: ["PDF Intelligence"]
---

# Extract PDF metadata and per-page text as JSON

`POST /api/v1/pdf-to-json`

## Request

- Base URL: `https://exactpdf.com`
- URL: `https://exactpdf.com/api/v1/pdf-to-json`
- Auth: HTTP bearer

Upload one text-layer PDF and return metadata, per-page text, full text, page count, and extraction notes. Costs 1 credit on success. Scanned PDFs need OCR first; table cell reconstruction is not guaranteed.

## Response `200`

PDF JSON output.

- object
  - `ok` true, required
  - `page_count` integer, required
  - `metadata` object, required
  - `pages` object[], required
    - `page_number` integer, required
    - `text` string, required
    - `char_count` integer, required
  - `text` string, required
  - `extraction_mode` 'pdfjs_text_layer', required
  - `note` string

## Other responses

- `400`: Structured ExactPDF API error.
- `401`: Structured ExactPDF API error.
- `402`: Structured ExactPDF API error.
- `413`: Structured ExactPDF API error.

---

[API](https://skmtc.dev/exactpdf/apis/exactpdf-api.md) · [All operations](https://skmtc.dev/exactpdf/apis/exactpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/exactpdf/apis/exactpdf-api/revisions/98874db17413?raw)
