---
title: "Inspect a PDF"
method: POST
path: "/pdf/inspect"
tags: ["PDF tools"]
---

# Inspect a PDF

`POST /pdf/inspect`

## Request

- Base URL: `https://api.podpdf.com`
- URL: `https://api.podpdf.com/pdf/inspect`
- Auth: API key in header `X-API-Key`

Page count, page sizes and whether the file is encrypted or carries forms. Free — no credit is spent.

With `for: edit` it also returns what an editor recipe needs: a stable id for every page
(`p0`, `p1`, …) with its size and rotation, and the document's form fields. That mode
refuses documents over 200 pages and needs a plan that includes the editor.

## Request body

- object
  - `s3_key` string: Key from `/pdf/upload-url` (up to 150 MB).
  - `filename` string
  - `input` InlinePdf: A PDF sent with the request instead of uploaded first. Up to 4 MB.
    - `pdf_base64` string, byte, required
    - `filename` string
  - `for` 'edit': Add page ids, geometry and form fields for the editor.

## Response `200`

What the file contains

- InspectResult
  - `filename` string, nullable
  - `size_bytes` integer
  - `page_count` integer, nullable: `null` for an encrypted file.
  - `encrypted` boolean
  - `has_forms` boolean, nullable
  - `has_signatures` boolean, nullable
  - `has_xfa` boolean
  - `first_page` object
    - `width` number
    - `height` number
  - `warnings` string[]
  - `max_pages` integer: The page limit for the path this file would take.
  - `pages` object[]: With `for: edit`. The ids every recipe refers to pages by.
    - `id` string
    - `index` integer
    - `width` number
    - `height` number
    - `rotation` 0 | 90 | 180 | 270
  - `form` object: With `for: edit`. The document's form fields, up to 500.
    - `has_form` boolean
    - `has_xfa` boolean
    - `field_count` integer
    - `truncated` boolean
    - `fields` FormField[]
      - `name` string: The full name `form.fill` takes.
      - `type` 'text' | 'checkbox' | 'radio' | 'dropdown' | 'optionlist' | 'button' | 'signature' | 'unsupported'
      - `fillable` boolean
      - `value` union
        - string
        - boolean
        - string[]
      - `options` string[]
      - `required` boolean
      - `read_only` boolean
      - `max_length` integer, nullable
      - `multiline` boolean
      - `multiselect` boolean
      - `page_id` string, nullable
      - `page_index` integer, nullable
      - `rect` PdfRect: A rectangle in PDF user space — points, bottom-left origin, page rotation not applied.
        - `x` number, required
        - `y` number, required
        - `width` number, required
        - `height` number, required
      - `widgets` integer
      - `flattenable` boolean

## Other responses

- `400`: The request was invalid
- `401`: Missing or invalid API key
- `403`: `INSUFFICIENT_CREDITS`, `CONVERSION_TYPE_NOT_ENABLED`, `PDF_TOOLS_NOT_ENABLED`, `RATE_LIMIT_EXCEEDED` or `ACCOUNT_NOT_FOUND`. Note that a plan's rate limit is a 403, not a 429.
- `404`: No such resource for this account
- `422`: The values did not validate; `error.details` says which

---

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