Skip to main content
This page shows you how to use the list endpoint to list documents in a collection. Use this when you need to iterate over documents (for example, to export or scan) without running a ranked search.
The response includes the total count, the current page of documents, and an optional token for the next page:

Extended list request

For filtering, partition filtering, field selection, or a JSON request body, use the extended list endpoint:
The SDK scoped list helpers (docs.list in Python and TypeScript, Docs().List in Go) use the extended list request automatically when you pass filter, partition filter, or field-selection options. In Go, pass these as Filter, PartitionFilter, Fields, and IncludeVectors on lambdadb.ListDocsOpts. The extended list request body supports: filter uses the same queryString and bool shapes as the query API. List filters do not run vector or ranking queries. Use partitionFilter only for collections configured with a partition field. Inside a bool filter, occur can be filter, must, must_not, or should; when omitted, it defaults to should.
When you use nextPageToken with the extended endpoint, keep the same filter, partitionFilter, fields, and includeVectors options across pages.
To fetch specific documents by ID, use the fetch endpoint. To run ranked text, vector, sparse-vector, or hybrid search, use the query API.