---
title: "Get knowledge graph for document (path param)"
method: GET
path: "/document_intelligence/knowledge_graph/document/{pofid}"
tags: ["Analytics AI — Knowledge Graph"]
---

# Get knowledge graph for document (path param)

`GET /document_intelligence/knowledge_graph/document/{pofid}`

## Request

- Base URL: `https://api.paperoffice.ai/latest`
- URL: `https://api.paperoffice.ai/latest/document_intelligence/knowledge_graph/document/{pofid}`
- Auth: HTTP bearer

Returns an interactive graph centered on one document — nodes, edges, group styling, and layout options.

## Path parameters

- `pofid` string, required

## Query parameters

- `depth` string
- `include_entities` string
- `max_nodes` string

## Response `200`

Success

- object: Document graph
  - `status` 'success' | 'error', required: HTTP-Level Status
  - `job_id` string, required
  - `message` string: Human-readable status message
  - `pipeline` string: Name of the executed pipeline
  - `operation` string: Executed operation
  - `processing_time` string: Total processing time including queue (format: 123.45ms)
  - `result` object, required: The actual processing result
    - `status` 'completed' | 'failed' | 'timeout': Job-Level Status
    - `message` string: Pipeline-specific status message
    - `duration_ms` string: Pure pipeline processing time in ms
    - `output` object: Output
      - `nodes` object[]
      - `edges` object[]
      - `node_count` number
      - `edge_count` number

## 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)
