Skip to main content
GET
/
vectors
/
fetch
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

# To get the unique host for an index, 
# see https://docs.pinecone.io/guides/manage-data/target-an-index
index = pc.Index(host="INDEX_HOST")

index.fetch(ids=["vec1", "vec2"], namespace="example-namespace")

Documentation Index

Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt

Use this file to discover all available pages before exploring further.

from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

# To get the unique host for an index, 
# see https://docs.pinecone.io/guides/manage-data/target-an-index
index = pc.Index(host="INDEX_HOST")

index.fetch(ids=["vec1", "vec2"], namespace="example-namespace")

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:202601-alpha
required

Required date-based version header

Query Parameters

ids
string[]
required

The vector IDs to fetch. Does not accept values containing spaces.

namespace
string

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

Response

A successful response.

The response for the fetch operation.

vectors
The fetched vectors, in the form of a map between the fetched ids and the fetched vectors · object
namespace
string

The namespace of the vectors.

Example:

"example-namespace"

usage
object