> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-fix-template-upload-size-guidance.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Child Chunks

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



## OpenAPI

````yaml /en/api-reference/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks
openapi: 3.0.1
info:
  description: >-
    REST API for Dify applications and knowledge bases. Application endpoints
    authenticate with an app API key; knowledge endpoints authenticate with a
    dataset API key.
  title: Dify Service API
  version: 1.0.0
servers:
  - description: >-
      Base URL of the Dify Service API. For self-hosted deployments, replace it
      with your own API base URL.
    url: https://{api_base_url}
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: Host and path of the API base URL, without the `https://` prefix.
security:
  - ApiKeyAuth: []
tags:
  - description: Operations related to chat messages and interactions.
    name: Chat Messages
  - description: File upload and preview operations.
    name: Files
  - description: Operations related to end user information.
    name: End Users
  - description: User feedback operations.
    name: Feedback
  - description: Operations related to managing conversations.
    name: Conversations
  - description: Text-to-Speech and Speech-to-Text operations.
    name: Audio
  - description: Operations to retrieve application settings and information.
    name: Applications
  - description: Operations related to managing annotations for direct replies.
    name: Annotations
  - description: Endpoints for resuming paused workflows that require human input.
    name: Human Input
  - description: Operations for executing and managing workflows.
    name: Workflow Runs
  - description: Operations related to text generation and completion.
    name: Completion Messages
  - description: >-
      Operations for managing knowledge bases, including creation,
      configuration, and retrieval.
    name: Knowledge Bases
  - description: >-
      Operations for creating, updating, and managing documents within a
      knowledge base.
    name: Documents
  - description: Operations for managing document chunks and child chunks.
    name: Chunks
  - description: >-
      Operations for managing knowledge base metadata fields and document
      metadata values.
    name: Metadata
  - description: Operations for managing knowledge base tags and tag bindings.
    name: Tags
  - description: Operations for retrieving available models.
    name: Models
  - description: >-
      Operations for managing and running knowledge pipelines, including
      datasource plugins and pipeline execution.
    name: Knowledge Pipeline
paths:
  /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks:
    get:
      tags:
        - Chunks
      summary: List Child Chunks
      description: Returns a paginated list of child chunks under a specific parent chunk.
      operationId: getChildChunks
      parameters:
        - description: >-
            Knowledge base ID. Obtain it from [List Knowledge
            Bases](/en/api-reference/knowledge-bases/list-knowledge-bases).
          in: path
          name: dataset_id
          required: true
          schema:
            format: uuid
            type: string
        - description: >-
            Document ID. Obtain it from [List
            Documents](/en/api-reference/documents/list-documents).
          in: path
          name: document_id
          required: true
          schema:
            format: uuid
            type: string
        - description: >-
            Parent chunk ID. Obtain it from [List
            Chunks](/en/api-reference/chunks/list-chunks).
          in: path
          name: segment_id
          required: true
          schema:
            format: uuid
            type: string
        - description: Page number.
          in: query
          name: page
          schema:
            default: 1
            minimum: 1
            type: integer
        - description: Number of items per page. Server caps at `100`.
          in: query
          name: limit
          schema:
            default: 20
            minimum: 1
            type: integer
        - description: Search keyword.
          in: query
          name: keyword
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                success:
                  summary: Response Example
                  value:
                    data:
                      - content: Dify is an open-source platform.
                        created_at: 1741267200
                        id: d7e8f9a0-1b2c-3d4e-5f6a-7b8c9d0e1f2a
                        position: 1
                        segment_id: f3d1c7be-9f3a-40d8-8eb8-3a1ef9c3f2c1
                        type: customized
                        updated_at: 1741267200
                        word_count: 6
                    limit: 20
                    page: 1
                    total: 1
                    total_pages: 1
              schema:
                properties:
                  data:
                    description: List of child chunks.
                    items:
                      $ref: '#/components/schemas/ChildChunk'
                    type: array
                  limit:
                    description: Number of items per page.
                    type: integer
                  page:
                    description: Current page number.
                    type: integer
                  total:
                    description: Total number of child chunks.
                    type: integer
                  total_pages:
                    description: Total number of pages.
                    type: integer
                type: object
          description: List of child chunks.
        '403':
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden (api access)
                  value:
                    code: forbidden
                    message: Dataset api access is not enabled.
                    status: 403
          description: '`forbidden` : Dataset api access is not enabled.'
        '404':
          content:
            application/json:
              examples:
                not_found_1:
                  summary: not_found
                  value:
                    code: not_found
                    message: Dataset not found.
                    status: 404
                not_found_2:
                  summary: not_found
                  value:
                    code: not_found
                    message: Document not found.
                    status: 404
                not_found_3:
                  summary: not_found
                  value:
                    code: not_found
                    message: Segment not found.
                    status: 404
          description: |-
            - `not_found` : Dataset not found.
            - `not_found` : Document not found.
            - `not_found` : Segment not found.
components:
  schemas:
    ChildChunk:
      properties:
        content:
          description: Text content of the child chunk.
          type: string
        created_at:
          description: Creation timestamp (Unix epoch in seconds).
          type: number
        id:
          description: Unique identifier of the child chunk.
          type: string
        position:
          description: Position of the child chunk within the parent chunk.
          type: integer
        segment_id:
          description: ID of the parent chunk this child chunk belongs to.
          type: string
        type:
          description: >-
            How the child chunk was created. Child chunks created or updated
            through the API are always `customized`. System-generated child
            chunks are `automatic`.
          type: string
        updated_at:
          description: Last update timestamp (Unix epoch in seconds).
          type: number
        word_count:
          description: Word count of the child chunk content.
          type: integer
      type: object
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: API_KEY
      description: >-
        Every request authenticates with an API key: `Authorization: Bearer
        {API_KEY}`. App endpoints take an app API key; knowledge endpoints take
        a knowledge base API key ([Get
        Started](/en/api-reference/guides/get-started)).


        Keep keys server-side; never embed them in client code. Requests with a
        missing or invalid key fail with HTTP `401` (`unauthorized`).
      scheme: bearer
      type: http

````