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

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

# To iterate over all result pages using a generator function
for ids in index.list(prefix="document1#", namespace="example-namespace"):
    print(ids)

# For manual control over pagination
results = index.list_paginated(
    prefix="document1#",
    limit=3,
    namespace="example-namespace",
    pagination_token="eyJza2lwX3Bhc3QiOiIxMDEwMy0="
)
{
  "vectors": [
    {
      "id": "document1#abb"
    },
    {
      "id": "document1#abc"
    }
  ],
  "pagination": {
    "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
  },
  "namespace": "example-namespace",
  "usage": {
    "readUnits": 5
  }
}
# pip install pinecone-client[grpc]
from pinecone.grpc import PineconeGRPC as Pinecone

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

# To iterate over all result pages using a generator function
for ids in index.list(prefix="document1#", namespace="example-namespace"):
    print(ids)

# For manual control over pagination
results = index.list_paginated(
    prefix="document1#",
    limit=3,
    namespace="example-namespace",
    pagination_token="eyJza2lwX3Bhc3QiOiIxMDEwMy0="
)

Authorizations

Api-Key
string
headerrequired

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

Query Parameters

prefix
string

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

limit
integer
default: 100

Max number of IDs to return per page.

paginationToken
string

Pagination token to continue a previous listing operation.

namespace
string

Response

200 - application/json
vectors
object[]
pagination
object
namespace
string

The namespace of the vectors.

usage
object