---
title: "Get PDF page count"
method: POST
path: "/api/preview/page-count"
tags: ["Preview"]
---

# Get PDF page count

`POST /api/preview/page-count`

## Request

- Base URL: `https://api.dokmatiq.com`
- URL: `https://api.dokmatiq.com/api/preview/page-count`
- Auth: API key in header `X-API-Key`

Upload a PDF and get the total number of pages (without rendering).

## Response `200`

Page count

---

[API](https://skmtc.dev/dokmatiq/apis/docgen-api.md) · [All operations](https://skmtc.dev/dokmatiq/apis/docgen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dokmatiq/apis/docgen-api/revisions/3fa1a922764d?raw)
