Skip to main content
This method returns a ListDocsResponse object. Access documents via response.documents.

Parameters

  • skip (int, optional): Number of documents to skip for pagination. Defaults to 0.
  • limit (int, optional): Maximum number of documents to return. Defaults to 100.
  • filters (Dict[str, Any], optional): Metadata filters to apply
  • folder_name (str | List[str], optional): Optional folder scope. Accepts a canonical path (e.g., /projects/alpha) or a list of paths/names.
  • folder_depth (int, optional): Folder scope depth. None/0 = exact match, -1 = include all descendants, n > 0 = include descendants up to n levels deep.
  • include_total_count (bool, optional): Include total count of matching documents. Defaults to False.
  • include_status_counts (bool, optional): Include counts grouped by processing status. Defaults to False.
  • include_folder_counts (bool, optional): Include counts grouped by folder. Defaults to False.
  • completed_only (bool, optional): Only return documents with completed status. Defaults to False.
  • sort_by (str, optional): Field to sort by (created_at, updated_at, filename, external_id). Defaults to “updated_at”.
  • sort_direction (str, optional): Sort direction (asc or desc). Defaults to “desc”.

Metadata Filters

Pass any JSON filter described in the Metadata Filtering guide via the filters argument. Example:

Returns

ListDocsResponse object with the following properties:
  • documents (List[Document]): The list of documents
  • skip (int): Pagination offset used
  • limit (int): Limit used
  • returned_count (int): Number of documents in this response
  • total_count (Optional[int]): Total matching documents (if include_total_count=True)
  • has_more (bool): Whether more documents exist beyond this page
  • next_skip (Optional[int]): Skip value to use for the next page
  • status_counts (Optional[Dict[str, int]]): Document counts by status (if requested)
  • folder_counts (Optional[List]): Document counts by folder (if requested)

Examples

Basic Usage

Pagination with Total Count

Sorting and Filtering

Nested Folder Queries

Aggregates and Counts

Document Properties

The Document objects returned by this method have the following properties:
  • external_id (str): Unique document identifier
  • content_type (str): Content type of the document
  • filename (Optional[str]): Original filename if available
  • metadata (Dict[str, Any]): User-defined metadata
  • storage_info (Dict[str, str]): Storage-related information
  • system_metadata (Dict[str, Any]): System-managed metadata
  • chunk_ids (List[str]): IDs of document chunks
  • folder_name (Optional[str]): Folder leaf name
  • folder_path (Optional[str]): Canonical folder path (includes nested parents)