Skip to main content
POST
Text match operators ($match_phrase, $match_all, $match_any) aren’t supported in a filtered fetch; they’re only available in search.

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours from the console.

Headers

X-Pinecone-Api-Version
string
default:2026-07
required

Required date-based version header

Path Parameters

namespace
string
required

The namespace to fetch documents from.

Body

application/json

The request for the fetch_documents operation. Exactly one of ids or filter must be specified.

ids
string[]
required

A list of document IDs to fetch. Mutually exclusive with filter.

Required array length: 1 - 1000 elements
Required string length: 1 - 512
Pattern: ^[\x01-\x7F]+$
filter
object

A metadata filter expression selecting the documents to fetch. Must not be empty; an empty filter is rejected rather than matching every document. Mutually exclusive with ids.

Example:
include_fields
string[]

The document fields to return on each document. When omitted or empty, all fields are returned; ["*"] also returns every field.

pagination_token
string

A pagination token from a previous fetch response, used to retrieve the next page of matching documents. Only valid together with filter.

limit
integer<int32>
default:100

The maximum number of documents to return per page. Only applies to a fetch by filter; a fetch by ids is already bounded by ids and ignores an in-range value, but a value outside 1-10000 is rejected on either form. Defaults to 100.

Required range: 1 <= x <= 10000
Example:

100

Response

A successful fetch response.

The response for the fetch_documents operation.

documents
object
required

A map of document IDs to their fetched documents.

namespace
string
required

The namespace the documents were fetched from.

Example:

"my-namespace"

usage
object
required

Usage information for the fetch_documents operation.

Example:
pagination
object