***

title: list_chunks
slug: /reference/python/rest/datasphere/list-chunks
description: List chunks belonging to a document.
max-toc-depth: 3
---------------------

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

List chunks belonging to a document. Chunks are the individual text segments
created when a document is processed for vector search.

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

## **Response Example**

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

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

chunks = client.datasphere.documents.list_chunks("document-id")
for chunk in chunks.get("data", []):
    print(chunk.get("id"), chunk.get("text")[:80])
```