POST
/
describe_index_stats
# 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")

index.describe_index_stats()
{'dimension': 1024,
 'index_fullness': 8e-05,
 'namespaces': {'example-namespace1': {'vector_count': 4}, 'example-namespace2': {'vector_count': 4}},
 'total_vector_count': 8}
# 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")

index.describe_index_stats()
{'dimension': 1024,
 'index_fullness': 8e-05,
 'namespaces': {'example-namespace1': {'vector_count': 4}, 'example-namespace2': {'vector_count': 4}},
 'total_vector_count': 8}

Authorizations

Api-Key
string
header
required

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

Body

application/json

The request for the describe_index_stats operation.

filter
object

If this parameter is present, the operation only returns statistics for vectors that satisfy the filter. See Understanding metadata.

Serverless indexes do not support filtering describe_index_stats by metadata.

Response

200
application/json
A successful response.

The response for the describe_index_stats operation.

namespaces
object

A mapping for each namespace in the index from the namespace name to a summary of its contents. If a metadata filter expression is present, the summary will reflect only vectors matching that expression.

dimension
integer

The dimension of the indexed vectors. Not specified if sparse index.

Example:

1024

indexFullness
number

The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.

Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.

The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use describe_index.

Example:

0.4

totalVectorCount
integer

The total number of vectors in the index, regardless of whether a metadata filter expression was passed

Example:

80000

metric
string

The metric used to measure similarity.

Example:

"cosine"

vectorType
string

The type of vectors stored in the index.

Example:

"dense"