List documents.
List documents with optional grouping support.
Supports two modes:
- Regular listing: Returns flat list of documents with pagination
- Grouped listing: When group_by is specified, returns documents grouped by field value
When using group_by:
- Requires a payload index on the specified field in Qdrant
- Pagination applies to groups, not individual documents
- Each group contains all documents sharing the same field value
Headers
Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.
"Bearer YOUR_MIXPEEK_API_KEY"
Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'. Falls back to ?namespace= query parameter if the header is omitted.
"ns_abc123def456"
"production"
"my-namespace"
Path Parameters
The ID of the collection to list documents from.
Query Parameters
Generate presigned URLs for S3-backed blobs and url-shaped fields. Also accepted as a body field — if either is true, presigning is enabled.
Include vector embeddings in results. Also accepted as a body field — if either is true, vectors are returned.
1 <= x <= 10000 <= x <= 10000Body
Request model for listing documents.
Supports two pagination strategies:
Offset-based (default): Use query params ?page=2&page_size=10
- Simple and familiar
- Works well for shallow pagination (first ~100 pages)
- Less efficient for deep pagination with sorting
Cursor-based (optional): Pass cursor from previous response's next_cursor
- More efficient for deep pagination (page 100+)
- Required for consistent results when sorting large datasets
- When cursor is provided, offset is ignored
Filters to apply.
Sort options.
Search term.
OPTIONAL cursor for efficient deep pagination. Pass the 'pagination.next_cursor' value from a previous response to fetch the next page. When cursor is provided, the page/offset query params are ignored. Use cursor-based pagination when: (1) paginating beyond page ~100, (2) sorting large datasets, or (3) you need consistent iteration. Use offset-based pagination (default) for: simple use cases, random page access, or when page numbers are needed in the UI.
Whether to return presigned URLs for object keys.
Whether to return vector embeddings in the document results.
Controls vector data in the response. Pass true to get a _vectors field listing available vector names (no embedding data). Pass a list of vector names (e.g. ["fashionsiglip_v1_embedding"]) to return the actual float arrays for those specific vectors, keyed by name.
OPTIONAL. Field to group documents by. Supports dot notation for nested fields (e.g., 'metadata.category', 'source_type'). Accepts either a bare string ('metadata.category') or an object form ({'field': 'metadata.category'}) for consistency with other API parameters. When specified, documents are grouped by the field value and returned as grouped results. Requires a payload index on the field in Qdrant for optimal performance. If no index exists, the operation will fail with a validation error. Common groupable fields: 'source_object_id', 'root_object_id', 'collection_id', 'metadata.category'.
"source_object_id"
OPTIONAL. List of fields to include in the response. Supports dot notation for nested fields (e.g., 'metadata.title', 'content'). When specified, only the selected fields will be returned in the document results, reducing response size. System fields like '_id' and 'document_id' are always included. Use this to optimize response size when working with large documents.
["metadata.title", "content"]
OPTIONAL. List of fields containing document IDs to resolve inline. Referenced documents are fetched and attached under an '_expanded' key. Supports dot-notation for nested fields (e.g., 'items.product_id'). Max 50 unique references per request. Depth is limited to 1 (no recursive expansion).
["customer_id"]
Number of documents to return per page. Capped at 1000. Accepts page_size as an alias (POST body only).
1 <= x <= 1000Number of documents to skip (offset-based pagination).
x >= 0Response
Successful Response
Response model for listing documents.
Supports both regular document lists and grouped results based on the group_by parameter. When group_by is specified, results are returned as groups instead of a flat list.
Pagination strategies:
- Offset-based (default): Use
pagination.pageandpagination.page_size - Cursor-based (optional): Use
pagination.next_cursorfor efficient deep pagination
Pagination information. Includes next_cursor for cursor-based pagination. When group_by is used, pagination applies to groups (not individual documents). total_count reflects total number of groups, not total documents.
List of documents when group_by is NOT specified. Contains flat list of documents with pagination applied. Mutually exclusive with 'groups' field.
List of document groups when group_by IS specified. Each group contains documents sharing the same field value. Pagination applies to groups, not individual documents. Mutually exclusive with 'results' field.
Total number of documents matching the query (across all pages). Alias for stats.total_documents — included at the top level for convenience.
Aggregate statistics across all documents in the result
The field that was used for grouping when group_by was specified. None for non-grouped results. Useful for clients to understand the grouping structure.
"source_object_id"

