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.
# 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
{
"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
]
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"typeUrl": "<string>",
"value": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"typeUrl": "<string>",
"value": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"typeUrl": "<string>",
"value": "<string>"
}
]
}Authorizations
Section titled “Authorizations”Api-KeystringrequiredAn API Key is required to call Pinecone APIs. Get yours from the console.
Headers
Section titled “Headers”X-Pinecone-Api-VersionstringrequiredRequired date-based version header
Query Parameters
Section titled “Query Parameters”idsstring[]requiredThe vector IDs to fetch.
namespace?stringThe namespace to fetch records from. If not provided, the default namespace is used.
Response
Section titled “Response”200 — A successful response.
The response for the fetch operation.
vectors?objectnamespace?stringThe 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
usage?objectShow child attributes
readUnits?integerThe number of read units consumed by this operation.
Example: 5
egressBytes?integerThe billed egress for this response, in bytes. Measured on the encoded response payload.
Required range: 0 <= x. Example: 1024