Documents

List Documents

Returns a paginated list of documents in a knowledge base.

get/datasets/{dataset_id}/documents

Request

  • Base URL
    https://api.dify.ai/v1
  • URL
    https://api.dify.ai/v1/datasets/{dataset_id}/documents
  • Auth
    HTTP bearer

Path parameters

dataset_idstring uuid required

Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.

Query parameters

pageinteger

Page number. Values below 1 are treated as 1.

limitinteger

Number of items per page. Server caps at 100, and values below 1 are treated as 1.

keywordstring

Search keyword to filter by document name.

status'queuing' | 'indexing' | 'paused' | 'error' | 'available' | 'disabled' | 'archived'

Filter by display status.

Response

List of documents.

has_moreboolean

Whether more items exist on the next page.

limitinteger

Number of items per page.

pageinteger

Current page number.

totalinteger

Total number of matching items.

Changes

No recorded changes to this operation across all 17 revisions of this API.