---
title: "Returns specific chunks in a collection."
method: GET
path: "/collections/{collection_id}/chunks/{chunk_ids}"
tags: ["Collections"]
---

# Returns specific chunks in a collection.

`GET /collections/{collection_id}/chunks/{chunk_ids}`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/collections/{collection_id}/chunks/{chunk_ids}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/collections/:collection_id/chunks/:chunk_ids/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns specific chunks in a collection.

## Path parameters

- `collection_id` string, required
- `chunk_ids` integer[], required

## Response `200`

Successful operation

- Chunk[]
  - `text` string, required: The text represented by the chunk
  - `id` integer, required: The identifier of the chunk
  - `name` string, required
  - `size` integer, required: The size in bytes.
  - `pages` string, required
  - `start_time` number, double, nullable: For audio/video transcript chunks, the start time in seconds of the chunk's content, located within the document's diarization segments: exact at a speaker segment's boundary, and linearly interpolated by character position when a segment spans multiple chunks. Populated for transcript chunks returned by the get_chunks endpoint (including a mid-segment continuation chunk); null for non-transcript chunks and documents without captured segment timestamps. Chunk search and match results do not carry per-chunk times — use get_chunks, or get_audio_timestamps for full exact per-segment timing.
  - `end_time` number, double, nullable: For audio/video transcript chunks, the end time in seconds of the chunk's content, located within the document's diarization segments: exact at a speaker segment's boundary (so the final chunk ends at the true segment end) and linearly interpolated by character position within a segment that spans multiple chunks, so it never overshoots the text the chunk holds. Populated for transcript chunks returned by the get_chunks endpoint; null for non-transcript chunks and documents without captured segment timestamps. Chunk search and match results do not carry per-chunk times.

## Other responses

- `400`: Bad request
- `401`: Unauthorized - Invalid or missing API key
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
