This page describes how to list, describe, and delete a namespace in Pinecone.

These operations are available in API versions 2025-04 and later.

List all namespaces in an index

To list all namespaces in a serverless index:

curl
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"

curl -X GET "https://$INDEX_HOST/namespaces" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-API-Version: 2025-04"

The response will look like the following:

{
  "namespaces": [
    {
      "name": "example-namespace",
      "record_count": 20000
    },
    {
      "name": "example-namespace-2",
      "record_count": 10500
    }
  ],
  "pagination": {
    "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
  }
}

Up to 100 namespaces are returned at a time by default, in sorted order (bitwise “C” collation). If the limit parameter is set, up to that number of namespaces are returned instead. Whenever there are additional namespaces to return, the response also includes a pagination_token that you can use to get the next batch of namespaces. When the response does not include a pagination_token, there are no more namespaces to return.

Describe a namespace

To get details about a namespace in a serverless index, including the total number of vectors in the namespace:

curl
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="YOUR_INDEX_HOST"
NAMESPACE="YOUR_NAMESPACE"  # To target the default namespace, use "__default__".

curl -X GET "https://$INDEX_HOST/namespaces/$NAMESPACE" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-API-Version: 2025-04"

The response will look like the following:

{
  "name": "example-namespace",
  "record_count": 20000
}

Delete a namespace

To delete a namespace in a serverless index:

Deleting a namespace is irreversible. All data in the namespace will be permanently deleted.

curl
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="YOUR_INDEX_HOST"
NAMESPACE="YOUR_NAMESPACE" # To target the default namespace, use "__default__".

curl -X DELETE "https://$INDEX_HOST/namespaces/$NAMESPACE" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-API-Version: 2025-04"

Was this page helpful?