---
title: "Get Document"
method: GET
path: "/v2/collections/{collection_name}/documents/{document_id}"
tags: ["collections"]
---

# Get Document

`GET /v2/collections/{collection_name}/documents/{document_id}`

Retrieve a single document by ID using the v2 compatibility shape.

## Path parameters

- `collection_name` string, required
- `document_id` string, required

## Query parameters

- `include_bbox` boolean

## Response `200`

Successful Response

- GetDocumentResponse
  - `chunk_count` integer, required
  - `chunks` DocumentChunk[], required
    - `chunk_id` string, required
    - `chunk_index` integer, nullable
    - `content` string, required
    - `location` FileSearchLocation — Source position for a returned chunk. Fields that do not apply to the source type are returned as null.
      - `page_start` integer, nullable — First page covered by the chunk for paged documents.
      - `page_end` integer, nullable — Last page covered by the chunk for paged documents.
      - `start_sec` number, double, nullable
      - `end_sec` number, double, nullable
      - `sheet_name` string, nullable — Worksheet name for spreadsheet chunks.
      - `section` string, nullable
      - `row_start` integer, nullable — First spreadsheet row covered by the chunk.
      - `row_end` integer, nullable — Last spreadsheet row covered by the chunk.
      - `col_start` integer, nullable — First spreadsheet column covered by the chunk.
      - `col_end` integer, nullable — Last spreadsheet column covered by the chunk.
      - `columns` string[], nullable
      - `row_role` string, nullable
    - `regions` FileSearchRegion[], nullable
      - `region_id` string, nullable
      - `type` string, nullable — Region category, such as `text`, `title`, `section_header`, `key_value`, `table`, `chart`, or `image`.
      - `page` integer, nullable — Page number where the region appears.
      - `bbox` FileSearchRegionBbox — Bounding box for rendering the region. The origin is the top-left corner of the rendered page or image. Values are expressed as fractions of rendered dimensions, so draw with `x = left * renderedWidth`, `y = top * renderedHeight`, `width = width * renderedWidth`, and `height = height * renderedHeight`.
        - `top` number, double
        - `left` number, double
        - `width` number, double
        - `height` number, double
      - `text` string, nullable — Text extracted from the region when available.
      - `description` string, nullable — Generated description of the region when available.
      - `image_url` string, nullable — Image URL for the region when the extraction pipeline produced one.
      - `confidence` number, double, nullable — Extraction confidence for the region when available.
      - `metadata` object, nullable
      - `extraction` 'ok' | 'unavailable' — Whether this region's parsed content is included. "unavailable" marks a region whose extracted text was withheld because it could not be verified as reliable (for example a chart the parser could not read accurately): its text and description are null while bbox and image_url remain valid, so the original region can still be rendered. Null or absent means the content is included ("ok"); the field is never backfilled onto older data. When present, extraction supersedes confidence.
    - `custom_metadata` object, nullable
    - `relations` ChunkRelation[], nullable
      - `relation_id` string, required — Relation identifier.
      - `source_chunk_id` string, required — Chunk ID where the relation starts.
      - `target_chunk_id` string, required — Chunk ID where the relation points.
      - `target_document_id` string, nullable — Document ID for the target chunk when known.
      - `target_status` string, required — Whether the target chunk could be resolved.
      - `relation_type` string, required — Application-defined relation label.
      - `metadata` object, required — Application-supplied metadata for the relation.
      - `created_at` string, nullable — Relation creation timestamp.
      - `updated_at` string, nullable — Relation update timestamp.
    - `related_chunks` RelatedChunk[], nullable
      - `chunk_id` string, required
      - `document_id` string, nullable
      - `text` string, nullable
      - `location` FileSearchLocation — Source position for a returned chunk. Fields that do not apply to the source type are returned as null.
        - `page_start` integer, nullable — First page covered by the chunk for paged documents.
        - `page_end` integer, nullable — Last page covered by the chunk for paged documents.
        - `start_sec` number, double, nullable
        - `end_sec` number, double, nullable
        - `sheet_name` string, nullable — Worksheet name for spreadsheet chunks.
        - `section` string, nullable
        - `row_start` integer, nullable — First spreadsheet row covered by the chunk.
        - `row_end` integer, nullable — Last spreadsheet row covered by the chunk.
        - `col_start` integer, nullable — First spreadsheet column covered by the chunk.
        - `col_end` integer, nullable — Last spreadsheet column covered by the chunk.
        - `columns` string[], nullable
        - `row_role` string, nullable
      - `metadata` object, nullable
    - `metadata` object, nullable
    - `page_start` integer, nullable
    - `page_end` integer, nullable
    - `start_sec` number, double, nullable
    - `end_sec` number, double, nullable
    - `tokens` integer, nullable
    - `category` string, nullable
    - `parent_chunk_index` integer, nullable
  - `collection_name` string, required
  - `document_id` string, required
  - `metadata` DocumentMetadata, required
    - `created_at` string, nullable
    - `file_size` integer, nullable
    - `file_type` string, nullable
    - `filename` string, nullable
    - `indexed_at` string, nullable
    - `indexing_status` string, nullable
    - `mime_type` string, nullable
    - `summary` string, nullable
    - `tags` string[], nullable
    - `uri` string, nullable
    - `custom_metadata` object, nullable
  - `regions` FileSearchRegion[], nullable
    - `region_id` string, nullable
    - `type` string, nullable — Region category, such as `text`, `title`, `section_header`, `key_value`, `table`, `chart`, or `image`.
    - `page` integer, nullable — Page number where the region appears.
    - `bbox` FileSearchRegionBbox — Bounding box for rendering the region. The origin is the top-left corner of the rendered page or image. Values are expressed as fractions of rendered dimensions, so draw with `x = left * renderedWidth`, `y = top * renderedHeight`, `width = width * renderedWidth`, and `height = height * renderedHeight`.
      - `top` number, double
      - `left` number, double
      - `width` number, double
      - `height` number, double
    - `text` string, nullable — Text extracted from the region when available.
    - `description` string, nullable — Generated description of the region when available.
    - `image_url` string, nullable — Image URL for the region when the extraction pipeline produced one.
    - `confidence` number, double, nullable — Extraction confidence for the region when available.
    - `metadata` object, nullable
    - `extraction` 'ok' | 'unavailable' — Whether this region's parsed content is included. "unavailable" marks a region whose extracted text was withheld because it could not be verified as reliable (for example a chart the parser could not read accurately): its text and description are null while bbox and image_url remain valid, so the original region can still be rendered. Null or absent means the content is included ("ok"); the field is never backfilled onto older data. When present, extraction supersedes confidence.

---

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