Skip to main content
Use the list endpoint to scan or export documents from a collection. Large responses may return documents through docsUrl instead of inline docs. See Large results for REST download instructions and SDK behavior. To read the next page, repeat the request with the returned nextPageToken as pageToken. Keep the endpoint and all other options the same. If the project, collection, ref, or options change, start from the first page to avoid a 400 BadRequest. See the sorted list example. To select a ref, supply refKind and refName together. Omitting both reads from main. See Read from a ref for examples. Documents are returned in ascending document ID order unless an extended list request sorts them. A list request on a branch reads its published snapshot. On a tag, or an alias that targets a tag, it also includes the pending writes the tag captured. To include a branch’s pending writes, set consistentRead in an extended list request. Pending bulk imports become visible after they are published. A read that includes pending writes can return 429 when that pending payload reaches the configured threshold. Page tokens record a position in the requested order. A branch can gain documents or an alias can point to a different tag between pages. For a stable multi-page export, use a tag created with source.asOf.
Python: LambdaDB supports context manager usage. __enter__ returns the client, and __exit__ calls client.close() (closing the SDK-owned HTTP client) and makes the client unusable after the with block. If you don’t use with, call client.close() when you’re done. If you pass a custom client=/async_client=, you own closing it.
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, sorting, field selection, pending writes, or a JSON request body, use the extended list endpoint:
The SDKs use POST for document or partition filters, field selection, sorting, and consistent reads. Python (consistent_read=False) and TypeScript 0.15.1 or later (consistentRead: false) choose the same endpoint as when the option is omitted. In TypeScript 0.15.0, adding consistentRead: false switches a basic list from GET to POST, which invalidates its page token. Go 0.11.0 uses POST if Ref or ConsistentRead is set, including lambdadb.Bool(false). 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.

Sort and read pending writes

These requests sort by category and include pending writes to main.
To paginate automatically, use list_pages in Python, listPages or listAll in TypeScript, or ListIterator or ListAll in Go. Python and TypeScript reject invalid sort directions and tag refs with consistent reads enabled before sending the request. Go returns the server’s 400 in both cases. Fields are compared in the order given, and ascending document ID breaks ties. Omit sort or send null for the default order; an empty array returns 400 BadRequest. For a keyword array, asc uses the smallest indexed value and desc the largest. A document without a keyword value sorts last for asc and first for desc; a missing numeric or datetime value sorts as zero (the Unix epoch for datetime). If a document’s sort value changes between pages, that document can be returned again or skipped.
To fetch specific documents by ID, use the fetch endpoint. To run ranked text, vector, sparse-vector, or hybrid search, use the query API.