---
title: "Get document components"
method: GET
path: "/api/v0/documents/{document_id}/components"
tags: ["Documents"]
---

# Get document components

`GET /api/v0/documents/{document_id}/components`

Retrieves all components associated with a document.

## Path parameters

- `document_id` string, uuid, required

## Response `200`

Successful Response

- OpCoreApiEndpointsDocumentsPagesComponentGetResponse[]
  - `id` string, uuid, required — The ID of the component
  - `type` string, required — The type of the component
  - `document_id` string, uuid, required — The ID of the document
  - `page_number` integer, required — The page number of the component
  - `label` string, required — The label of the component
  - `text` string, nullable, required — Detailed text or HTML for the component
  - `bbox` BoundingBox, required
    - `x0` integer, required
    - `y0` integer, required
    - `x1` integer, required
    - `y1` integer, required
    - `dpi` integer
    - `class_name` string, nullable
    - `text` string, nullable
    - `confidence` number, nullable
  - `metadata` object, nullable, required — The metadata of the component

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) · [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/outerport/outerport-api/revisions/f565b46daaea/schema)
