---
title: "Read one chunk in full"
method: GET
path: "/api/rag/chunk"
tags: ["search"]
---

# Read one chunk in full

`GET /api/rag/chunk`

## Request

- Base URL: `https://telawiki.com`
- URL: `https://telawiki.com/api/rag/chunk`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `tela_session`

Expands a search hit into its whole section — the cheap way to ground an answer without pulling an entire page.

## Query parameters

- `chunk_id` integer, required

## Response `200`

The chunk, with `content` populated.

- object
  - `chunk` ChunkWithContent, required: An indexed section of a page, or of the extracted text of a file.
    - `chunk_id` integer, required: Pass to `/api/rag/chunk` to read the section in full.
    - `source_kind` 'page' | 'file', required
    - `page_id` integer, required: For a file chunk, the parent page — `0` when the file sits at the space root.
    - `space_id` integer, required
    - `title` string, required: Page title, or the file name for a file chunk.
    - `heading_path` string, required: Where in the document this chunk sits, e.g. `Deployment > Rollback`.
    - `snippet` string, required
    - `score` number, required
    - `updated_at` string, required
    - `file_id` integer: File chunks only.
    - `file_name` string: File chunks only.
    - `download_url` string: File chunks only.
    - `share_url` string: File chunks only.
    - `content` string, required: The chunk's full text.

## Other responses

- `400`: Malformed request. `code` is usually `bad_request` or `invalid_json`.
- `404`: `not_found` — deliberately the same answer for "no such chunk" and "you cannot read it".
- `500`: `internal` — server error.
- `503`: `rag_disabled` — semantic retrieval is not configured on this instance.

---

[API](https://skmtc.dev/telawiki/apis/tela-rest-api.md) · [All operations](https://skmtc.dev/telawiki/apis/tela-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telawiki/apis/tela-rest-api/revisions/f316f31f6fcb?raw)
