GET
/
vectors
/
fetch
# pip install pinecone-client[grpc]
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")
index = pc.Index("pinecone-index")

index.fetch(ids=["id-1", "id-2"], namespace="example-namespace")
{
  "vectors": {
    "id-1": {
      "id": "id-1",
      "values": [
        1,
        1.5
      ]
    },
    "id-2": {
      "id": "id-2",
      "values": [
        2,
        1
      ]
    }
  },
  "namespace": "example-namespace",
  "usage": {
    "readUnits": 1
  }
}
# pip install pinecone-client[grpc]
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")
index = pc.Index("pinecone-index")

index.fetch(ids=["id-1", "id-2"], namespace="example-namespace")

Authorizations

Api-Key
string
headerrequired

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

Query Parameters

ids
string[]
required

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

namespace
string

Response

200 - application/json
vectors
object
namespace
string

The namespace of the vectors.

usage
object