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.
| Parameter | Description | Type | Required | Default |
|---|
| size | Max number of documents to return per page (1–100). | integer | | 100 |
| pageToken | Token for the next page of results. | string | | |
| includeVectors | Indicates whether vector values are included in the response. | boolean | | false |
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:
| Parameter | Description | Type | Required | Default |
|---|
| size | Max number of documents to return per page (1–100). | integer | | 100 |
| pageToken | Token for the next page of results. | string | | |
| filter | Filter applied before pagination. Supports queryString and nested bool filters. | object | | |
| partitionFilter | Restricts the request to matching partition values. | object | | |
| fields | Field selector with include and/or exclude. Use dot notation for nested fields. | object | | |
| includeVectors | Indicates whether vector values are included in the response. | boolean | | false |
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.