Skip to main content
This page shows you how to list the IDs in an index namespace, either all of them or just those with a common ID prefix. Listing IDs without the data behind them is a cheap and fast way to check upserts. For a legacy vector index, see List vector IDs.
The list endpoint is supported only for serverless indexes.

List document IDs

In an index with a document schema, list returns document IDs in sorted order, 100 per page, which is also the maximum page size. Each entry carries only an _id. To get the fields of a document, fetch it.

List all document IDs

The response holds one entry per document, and a pagination.next token when more pages follow:

List document IDs by prefix

To limit results to documents whose IDs start with a given string, pass a prefix. Combined with structured IDs, this lets you list every chunk of a source document:
The Python SDK returns a paginator, so iterating it walks every page for you. In the REST API, a response with more results to follow carries a pagination.next token. Pass it back as pagination_token to get the next page, and stop when the response has no pagination token. For the full request and response schema, see List documents.