Get an index endpoint
For each Pinecone index, there is a unique DNS endpoint for performing data operations such as upsert, query, update, and delete. The Python and Node SDKs construct these index endpoints for you. However, when using the API directly, you need to explicitly specify these endpoints.
There are two ways to get an index endpoint for direct API calls: the Pinecone console or use the describe_index
endpoint.
Use the Pinecone console
To get an index endpoint from the Pinecone console:
- Open the Pinecone console.
- Select the project containing the index.
- Select the index.
- Copy the URL under HOST.
Use describe_index
The describe_index
operation uses a different API (api.pinecone.io
) than data plane operations such as upsert
and query
. In production, you should therefore not rely on describe_index
to programmatically get an index endpoint for data manipulation operations. Instead, you should get an index endpoint once and cache it for reuse or specify the endpoint directly.
The describe_index
operation returns the index endpoint as the host
value:
Was this page helpful?