---
title: "Document outline (headings and page ranges)"
method: GET
path: "/documents/structure-get"
tags: ["Document AI — DMS"]
---

# Document outline (headings and page ranges)

`GET /documents/structure-get`

## Request

- Base URL: `https://api.paperoffice.ai/latest`
- URL: `https://api.paperoffice.ai/latest/documents/structure-get`
- Auth: HTTP bearer

Read the outline of ONE document: headings with page ranges, no full text. Use first on long documents, then po_documents_section_text_get with node_id. depth 1-4 (default 2). Optional node_id returns that subtree. Optional pages (comma...

## Query parameters

- `pofid` string, required
- `depth` integer
- `node_id` string
- `pages` string
- `build` '0' | '1'

## Response `200`

Success

- object
  - `status` string, required
  - `pofid` string, required
  - `built` boolean, required
  - `mode` string: headings, page_groups, headings_capped or empty
  - `node_count` integer
  - `truncated` boolean
  - `outline` unknown[], required
    - unknown
  - `page_nodes` unknown[]
    - unknown
  - `total_pages` integer
  - `built_at` string: UTC time the cached outline was built (ISO 8601)
  - `pages_truncated` boolean: true when more than 20 pages were requested
  - `pages_ignored` string[]: pages entries that were not mapped (not a number, below 1 or beyond the last page)

## Other responses

- `4XX`: Error
- `5XX`: Error

---

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