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

pc = Pinecone(api_key='YOUR_API_KEY')

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

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

# For manual control over pagination
results = index.list_paginated(
    prefix="doc1#",
    limit=3,
    namespace="example-namespace",
    pagination_token="eyJza2lwX3Bhc3QiOiIxMDEwMy0="
)
['doc1#chunk1', 'doc1#chunk2', 'doc1#chunk3', ...]
eyJza2lwX3Bhc3QiOiIxMDEwMy0=
{'read_units': 1}
# pip install pinecone[grpc]
from pinecone.grpc import PineconeGRPC as Pinecone

pc = Pinecone(api_key='YOUR_API_KEY')

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

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

# For manual control over pagination
results = index.list_paginated(
    prefix="doc1#",
    limit=3,
    namespace="example-namespace",
    pagination_token="eyJza2lwX3Bhc3QiOiIxMDEwMy0="
)
['doc1#chunk1', 'doc1#chunk2', 'doc1#chunk3', ...]
eyJza2lwX3Bhc3QiOiIxMDEwMy0=
{'read_units': 1}

Authorizations

Api-Key
string
header
required

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
A successful response.

The response for the list operation.

vectors
object[]
pagination
object
namespace
string

The namespace of the vectors.

usage
object