This page shows you how to get index information.

You can view index information using the Pinecone console.

List all indexes in a project

Use the list_indexes operation to get a complete description of all indexes in a project:

The list_indexes operation returns a response like the following:

With the Python SDK, you can use the .names() helper function to iterate over the index names in the list_indexes() response, for example:

Python
from pinecone.grpc import PineconeGRPC as Pinecone
from pinecone import ServerlessSpec

pc = Pinecone(api_key="YOUR_API_KEY")

index_name = "example-index3"
if not pc.has_index(index_name):
  # Do something, such as create the index
  pc.create_index(
    name=index_name,
    dimension=1536,
    metric='cosine',
    spec=ServerlessSpec(
      cloud="aws",
      region="us-east-1"
    )
  )

Get information about an index

Use the describe_index endpoint to get a complete description of a specific index:

Do not target an index by name in production.

When you target an index by name for data operations such as upsert and query, the SDK gets the unique DNS host for the index using the describe_index operation. This is convenient for testing but should be avoided in production because describe_index uses a different API than data operations and therefore adds an additional network call and point of failure. Instead, you should get an index host once and cache it for reuse or specify the host directly.