Skip to main content
Pinecone Docs
current

Search documentation

Type to search this documentation.

Fetch records

Look up and return records by ID from a single namespace. The returned records include the vector data and/or metadata.

For on-demand indexes, since vector values are retrieved from object storage, fetch operations may have increased latency. If you only need metadata or IDs, consider using the query operation with includeValues set to false instead. For guidance and examples, see Fetch data.

curl
# To get the unique host for an index,
# see https://docs.pinecone.io/guides/manage-data/target-an-index
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"

curl -X GET "https://$INDEX_HOST/vectors/fetch?ids=id-1&ids=id-2&namespace=example-namespace" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "X-Pinecone-Api-Version: 2026-07"

GET /vectors/fetch

200
{
  "namespace": "example-namespace",
  "usage": {
    "egressBytes": 1024,
    "readUnits": 1
  },
  "vectors": {
    "id-1": {
      "id": "id-1",
      "values": [
        1,
        1.5
      ]
    },
    "id-2": {
      "id": "id-2",
      "values": [
        2,
        1
      ]
    }
  }
}
400
{
  "code": 123,
  "message": "<string>",
  "details": [
    {
      "typeUrl": "<string>",
      "value": "<string>"
    }
  ]
}
4XX
{
  "code": 123,
  "message": "<string>",
  "details": [
    {
      "typeUrl": "<string>",
      "value": "<string>"
    }
  ]
}
5XX
{
  "code": 123,
  "message": "<string>",
  "details": [
    {
      "typeUrl": "<string>",
      "value": "<string>"
    }
  ]
}
Api-Keystringrequired

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

X-Pinecone-Api-Versionstringrequired

Required date-based version header

Typestring
Default2026-07
idsstring[]required

The vector IDs to fetch.

Typestring[]
namespace?string

The namespace to fetch records from. If not provided, the default namespace is used.

Typestring

200 — A successful response.

The response for the fetch operation.

vectors?object
namespace?string

The namespace that served the fetch: the request's namespace, or the alias's target namespace when the request named a namespace alias.

Example: example-namespace

Typestring
usage?object
Show child attributes
readUnits?integer

The number of read units consumed by this operation.

Example: 5

Typeinteger
egressBytes?integer

The billed egress for this response, in bytes. Measured on the encoded response payload.

Required range: 0 <= x. Example: 1024

Typeinteger
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu