# pip install "pinecone[grpc]"
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
pc.list_indexes()
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone'
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })
await pc.listIndexes();
import io.pinecone.clients.Pinecone;
import org.openapitools.client.model.*;
public class ListIndexesExample {
public static void main(String[] args) {
Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
IndexList indexList = pc.listIndexes();
System.out.println(indexList);
}
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X GET "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2024-04"
{
"indexes": [
{
"name": "semantic-search",
"dimension": 384,
"metric": "cosine",
"host": "semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io",
"status": {
"ready": true,
"state": "Ready"
},
"spec": {
"pod": {
"environment": "us-west1-gcp",
"replicas": 2,
"shards": 2,
"pod_type": "p1.x1",
"pods": 4
}
}
},
{
"name": "image-search",
"dimension": 200,
"metric": "dotproduct",
"host": "image-search-a31f9c1.svc.us-east1-gcp.pinecone.io",
"status": {
"ready": false,
"state": "Initializing"
},
"spec": {
"serverless": {
"cloud": "aws",
"region": "us-east-1"
}
}
}
]
}Indexes
List indexes
This operation returns a list of all indexes in a project.
GET
/
indexes
# pip install "pinecone[grpc]"
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
pc.list_indexes()
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone'
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })
await pc.listIndexes();
import io.pinecone.clients.Pinecone;
import org.openapitools.client.model.*;
public class ListIndexesExample {
public static void main(String[] args) {
Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
IndexList indexList = pc.listIndexes();
System.out.println(indexList);
}
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X GET "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2024-04"
{
"indexes": [
{
"name": "semantic-search",
"dimension": 384,
"metric": "cosine",
"host": "semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io",
"status": {
"ready": true,
"state": "Ready"
},
"spec": {
"pod": {
"environment": "us-west1-gcp",
"replicas": 2,
"shards": 2,
"pod_type": "p1.x1",
"pods": 4
}
}
},
{
"name": "image-search",
"dimension": 200,
"metric": "dotproduct",
"host": "image-search-a31f9c1.svc.us-east1-gcp.pinecone.io",
"status": {
"ready": false,
"state": "Initializing"
},
"spec": {
"serverless": {
"cloud": "aws",
"region": "us-east-1"
}
}
}
]
}# pip install "pinecone[grpc]"
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
pc.list_indexes()
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone'
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })
await pc.listIndexes();
import io.pinecone.clients.Pinecone;
import org.openapitools.client.model.*;
public class ListIndexesExample {
public static void main(String[] args) {
Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
IndexList indexList = pc.listIndexes();
System.out.println(indexList);
}
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X GET "https://api.pinecone.io/indexes" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2024-04"
Authorizations
Response
This operation returns a list of all the indexes that you have previously created, and which are associated with the given project
The list of indexes that exist in the project.
Show child attributes
Show child attributes
Was this page helpful?
⌘I