GET
/
vectors
/
fetch
# pip install "pinecone[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")
{
  "namespace": "example-namespace",
  "usage": {
    "readUnits": 1
  },
  "vectors": {
    "id-1": {
      "id": "id-1",
      "values": [
        1,
        1.5
      ]
    },
    "id-2": {
      "id": "id-2",
      "values": [
        2,
        1
      ]
    }
  }
}
# pip install "pinecone[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")

Query Parameters

ids
string[]
required

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

namespace
string

Response

200
application/json
A successful response.

The response for the fetch operation.

vectors
object
namespace
string

The namespace of the vectors.

usage
object