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. Large responses may return documents through docsUrl instead of inline docs. See Large results for REST download instructions and SDK behavior. Treat pageToken as opaque and return it unchanged to the same endpoint. When selecting a ref, supply refKind and refName together; omitting both reads from main. Tokens record a search position, not a snapshot pin. A branch may advance or an alias may be retargeted between pages. For a stable multi-page export, select the same immutable tag on every page and keep filter, partition, field-selection, and vector options unchanged. Restart pagination when the environment, project, collection, ref, or those options change. List requests do not support consistentRead.
The response includes total (the number of documents returned in this page, including any delivered through docsUrl), the current page of documents, and an optional token for the next page. total is not the collection size:

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, includeVectors, and ref 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.