***

title: getChunk
slug: /reference/typescript/rest/datasphere/get-chunk
description: Retrieve a specific chunk from a document.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Retrieve a specific chunk from a document.

<EndpointSchemaSnippet endpoint="GET /api/datasphere/documents/{documentId}/chunks/{chunkId}" />

## **Response Example**

<EndpointResponseSnippet endpoint="GET /api/datasphere/documents/{documentId}/chunks/{chunkId}" />

## **Example**

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

const chunk = await client.datasphere.documents.getChunk("document-id", "chunk-id");
console.log(chunk.text);
```