---
title: "GET /api/v1/{context_id}/documents/{id}/chunks"
method: GET
path: "/api/v1/{context_id}/documents/{id}/chunks"
---

# GET /api/v1/{context_id}/documents/{id}/chunks

`GET /api/v1/{context_id}/documents/{id}/chunks`

Lists chunks for a document

## Path parameters

- `context_id` string, required
- `id` string, required

## Query parameters

- `limit` integer
- `cursor` string
- `count` boolean
- `page` integer
- `pageSize` integer

## Response `200`

- ChunkPageJson
  - `chunks` ChunkJson[], required
    - `charEnd` integer, required
    - `charStart` integer, required
    - `document` string, required
    - `id` string, required
    - `position` integer, required
    - `section` string, nullable
    - `text` string, required
    - `tokenCount` integer, nullable
  - `page` PageMeta, required — The pagination block returned beside a page's rows.
    - `hasMore` boolean, required — Whether a further page exists.
    - `nextCursor` string, nullable — Token for the next page; absent on the last page.
    - `totalSize` integer, nullable — Total rows matching the filters, present only when the request asked for it with `count=true`.

## Other responses

- `401` — Unauthorized
- `404` — Document not found
- `422` — Invalid context id
- `500` — Unexpected error
- `503` — Server too busy: the per-pod in-flight request cap was exceeded. Retry per the `Retry-After` header.

## Changes

- **2026-08-24** `9f1598713067` — 3 breaking, 7 info
  - the `page` response's property type/format changed from `integer`/`int32` to `object`/`` for status `200`
  - removed the required property `pageSize` from the response with the `200` status
  - removed the required property `total` from the response with the `200` status
  - added the new optional `query` request parameter `count`
  - …6 more
- **2026-06-16** `52b41ab517b6` — 1 warning, 1 info
  - deleted the `query` request parameter `page_size`
  - added the new optional `query` request parameter `pageSize`
- **2026-06-08** `741d58b9ef89` — 1 warning, 1 info
  - deleted the `query` request parameter `pageSize`
  - added the new optional `query` request parameter `page_size`

[Change history](https://skmtc.dev/surrealdb/apis/spectron/changes/api/v1/:context_id/documents/:id/chunks/get.md)

---

[API](https://skmtc.dev/surrealdb/apis/spectron.md) · [All operations](https://skmtc.dev/surrealdb/apis/spectron/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/surrealdb/spectron/revisions/9f1598713067/schema)
