---
title: "Get Document Chunks"
method: GET
path: "/knowledge_bases/v2/{kb_id}/documents/{doc_id}/chunks"
tags: ["Knowledge Bases V2"]
---

# Get Document Chunks

`GET /knowledge_bases/v2/{kb_id}/documents/{doc_id}/chunks`

Get all chunks for a specific document.

Returns all chunks for the specified document ordered by chunk_order_index.
Each chunk includes:
- Chunk ID and order index
- Content text
- Token count
- File path (if available)

## Path parameters

- `kb_id` integer, required
- `doc_id` integer, required

## Response `200`

Successful Response

- DocumentChunksResponse — Response for document chunks
  - `document_id` integer, required
  - `document_public_id` string, required
  - `document_name` string, required
  - `version` integer, required
  - `total_chunks` integer, required
  - `chunks` ChunkModel[], required
    - `chunk_id` string, required
    - `chunk_order_index` integer, required
    - `content` string, required
    - `tokens` integer, required
    - `file_path` string, nullable
    - `title` string, nullable
    - `summary` string, nullable
    - `tags` string[], nullable
    - `knowledge_type` string, nullable
    - `code_snippets` object[], nullable
    - `retrieval_count` integer, nullable

## Other responses

- `403` — Access denied
- `404` — Document not found
- `422` — Validation Error

---

[API](https://skmtc.dev/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.dev/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/myaltimate/fastapi/revisions/82206441f16e/schema)
