GET/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks

List Child Chunks

Returns a paginated list of child chunks under a specific parent chunk.

6 parameters
dataset_idstringrequired
Knowledge base ID, from [List Knowledge Bases](/en/api-reference/knowledge-bases/list-knowledge-bases). For a scoped key, [copy the ID from the Dify URL](/en/api-reference/guides/knowledge#knowledge-base-id).
document_idstringrequired
Document ID. Obtain it from [List Documents](/en/api-reference/documents/list-documents).
segment_idstringrequired
Parent chunk ID. Obtain it from [List Chunks](/en/api-reference/chunks/list-chunks).
pageintegeroptional
Page number.
Default:1
limitintegeroptional
Number of items per page. Server caps at `100`.
Default:20
keywordstringoptional
Search keyword.

3 status codes
200List of child chunks.
dataarray<object>optional
List of child chunks.
limitintegeroptional
Number of items per page.
pageintegeroptional
Current page number.
totalintegeroptional
Total number of child chunks.
total_pagesintegeroptional
Total number of pages.
403- `forbidden` : Dataset api access is not enabled. - `forbidden` : The API key is scoped to specific knowledge bases, and this knowledge base is not one of them.

One documented failure

  • forbidden

    Dataset api access is not enabled.

    forbidden (api access)

404- `not_found` : Dataset not found. - `not_found` : Document not found. - `not_found` : Segment not found.

One documented failure

  • not_found

    Dataset not found.

    not_found

Error handling

A 403 is returned: - forbidden : Dataset api access is not enabled.

  • forbidden : The API key is scoped to specific knowledge bases, and this knowledge base is not one of them. A 404 is returned: - not_found : Dataset not found.
  • not_found : Document not found.
  • not_found : Segment not found.