v1.0 Breaking Change: This method now returns a
ListDocsResponse object instead of List[Document].
Access documents via response.documents. See Migration Guide.- Sync
- Async
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 applyinclude_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 (ascordesc). Defaults to “desc”.
Metadata Filters
Pass any JSON filter described in the Metadata Filtering guide via thefilters argument. Example:
Returns
ListDocsResponse object with the following properties:
documents(List[Document]): The list of documentsskip(int): Pagination offset usedlimit(int): Limit usedreturned_count(int): Number of documents in this responsetotal_count(Optional[int]): Total matching documents (ifinclude_total_count=True)has_more(bool): Whether more documents exist beyond this pagenext_skip(Optional[int]): Skip value to use for the next pagestatus_counts(Optional[Dict[str, int]]): Document counts by status (if requested)folder_counts(Optional[List]): Document counts by folder (if requested)
Examples
Basic Usage
- Sync
- Async
Pagination with Total Count
- Sync
- Async
Sorting and Filtering
- Sync
- Async
Aggregates and Counts
- Sync
- Async
Document Properties
TheDocument objects returned by this method have the following properties:
external_id(str): Unique document identifiercontent_type(str): Content type of the documentfilename(Optional[str]): Original filename if availablemetadata(Dict[str, Any]): User-defined metadatastorage_info(Dict[str, str]): Storage-related informationsystem_metadata(Dict[str, Any]): System-managed metadatachunk_ids(List[str]): IDs of document chunks

