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.

For guidance and examples, see [Manage namespaces](/guides/manage-data-manage-namespaces).

**Note:** This operation is not supported for pod-based indexes.

```python Python theme={null}
# Not supported with pinecone["grpc"] extras installed
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

index = pc.Index(host="INDEX_HOST")

# Implicit pagination using a generator function
for namespace in index.list_namespaces():
    print(namespace.name, ":", namespace.record_count)

# Manual pagination
namespaces = index.list_namespaces_paginated(
    limit=2,
    pagination_token="eyJza2lwX3Bhc3QiOiIxMDEwMy0="
)

print(namespaces)
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })

// To get the unique host for an index, 
// see https://docs.pinecone.io/guides/manage-data/target-an-index
const index = pc.index("INDEX_NAME", "INDEX_HOST")

const namespaceList = await index.listNamespaces();

console.log(namespaceList);
```

```java Java theme={null}
import io.pinecone.clients.AsyncIndex;
import io.pinecone.clients.Index;
import io.pinecone.configs.PineconeConfig;
import io.pinecone.configs.PineconeConnection;
import io.pinecone.proto.ListNamespacesResponse;
import org.openapitools.db_data.client.ApiException;

public class Namespaces {
    public static void main(String[] args) throws ApiException {
        PineconeConfig config = new PineconeConfig("YOUR_API_KEY");
        // To get the unique host for an index, 
        // see https://docs.pinecone.io/guides/manage-data/target-an-index
        config.setHost("INDEX_HOST");
        PineconeConnection connection = new PineconeConnection(config);

        Index index = new Index(config, connection, "docs-example");

        // List all namespaces with default pagination limit (100)
        ListNamespacesResponse listNamespacesResponse = index.listNamespaces(null, null);

        // List all namespaces with pagination limit of 2
        ListNamespacesResponse listNamespacesResponseWithLimit = index.listNamespaces(null,2);

        // List all namespaces with pagination limit and token
        ListNamespacesResponse listNamespacesResponsePaginated = index.listNamespaces("eyJza2lwX3Bhc3QiOiIxMDEwMy0=", 5);

        System.out.println(restoreJobListWithLimit);
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v4/pinecone"
)

func prettifyStruct(obj interface{}) string {
  	bytes, _ := json.MarshalIndent(obj, "", "  ")
    return string(bytes)
}

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    // To get the unique host for an index, 
    // see https://docs.pinecone.io/guides/manage-data/target-an-index
    idxConnection, err := pc.Index(pinecone.NewIndexConnParams{Host: "INDEX_HOST"})
    if err != nil {
        log.Fatalf("Failed to create IndexConnection for Host: %v", err)
    } 

    limit := uint32(10)
    namespaces, err := idxConnection.ListNamespaces(ctx, &pinecone.ListNamespacesParams{
        Limit: &limit,
    })
    if err != nil {
        log.Fatalf("Failed to list namespaces: %v", err)
    }
    fmt.Printf(prettifyStruct(namespaces))
}
```

```csharp C# theme={null}
using Pinecone;

var pinecone = new PineconeClient("PINECONE_API_KEY");

// To get the unique host for an index, 
// see https://docs.pinecone.io/guides/manage-data/target-an-index
var index = pinecone.Index(host: "INDEX_HOST");

var namespaces = await index.ListNamespacesAsync(new ListNamespacesRequest());

Console.WriteLine(namespaces);
```

```bash curl theme={null}
# To get the unique host for an index,
# see https://docs.pinecone.io/guides/manage-data/target-an-index
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"

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

```text Python theme={null}
# Implicit pagination
example-namespace : 20000
example-namespace2 : 10500
example-namespace3 : 10000
...

# Manual pagination
{
    "namespaces": [
        {
            "name": "example-namespace",
            "record_count": "20000"
        },
        {
            "name": "example-namespace2",
            "record_count": "10500"
        }
    ],
    "pagination": {
        "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
    }
}
```

```javascript JavaScript theme={null}
{
  "namespaces": [
    { "name": "example-namespace", "recordCount": "20000" },
    { "name": "example-namespace2", "recordCount": "10500" }
  ],
  "pagination": "Tm90aGluZyB0byBzZWUgaGVyZQo="
}
```

```java Java theme={null}
namespaces {
  name: "example-namespace"
  record_count: 20000
}
namespaces {
  name: "example-namespace2"
  record_count: 10500
}
```

```go Go theme={null}
{
  "Namespaces": [
    {
      "name": "example-namespace",
      "record_count": 20000
    },
    {
      "name": "example-namespace2",
      "record_count": 10500
    },
    ...
  ],
  "Pagination": {
    "next": "eyJza2lwX3Bhc3QiOiIyNzQ5YTU1YS0zZTQ2LTQ4MDItOGFlNi1hZTJjZGNkMTE5N2IiLCJwcmVmaXgiOm51bGx9"
  }
}
```

```csharp C# theme={null}
{
  "namespaces":[
    {"name":"example-namespace","recordCount":20000},
    {"name":"example-namespace2","recordCount":10500},
    ...
  ],
  "pagination":"Tm90aGluZyB0byBzZWUgaGVyZQo="
}
```

```json curl theme={null}
{
  "namespaces": [
    {
      "name": "example-namespace",
      "record_count": 20000
    },
    {
      "name": "example-namespace2",
      "record_count": 10500
    },
    ...
  ],
  "pagination": {
    "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
  }
}
```

`GET /namespaces`

:::code-group
```bash title="cURL"
curl --request GET \
  --url https://{index_host}/namespaces \
  --header 'Authorization: Bearer <token>'
```

```json title="200"
{
  "namespaces": [
    {
      "name": "example-namespace",
      "record_count": 20000
    }
  ],
  "pagination": {
    "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
  }
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Query Parameters

- `limit` (query, integer) — Max number namespaces to return per page.
- `paginationToken` (query, string) — Pagination token to continue a previous listing operation.

## Response

- `200` — A successful response
- `4XX` — An unexpected error response.
- `5XX` — An unexpected error response.

## Related pages

- [List namespaces](./database-2026-07-data-plane-listnamespaces.md)
- [Create a namespace](./database-2026-07-data-plane-createnamespace.md)
- [Describe a namespace](./database-2026-07-data-plane-describenamespace.md)
- [Delete a namespace](./database-2026-07-data-plane-deletenamespace.md)
- [List namespaces](./database-2026-04-data-plane-listnamespaces.md)
- [Create a namespace](./database-2026-04-data-plane-createnamespace.md)
- [Describe a namespace](./database-2026-04-data-plane-describenamespace.md)
- [Delete a namespace](./database-2026-04-data-plane-deletenamespace.md)
- [List namespaces](./database-2025-10-data-plane-listnamespaces.md)
- [Create a namespace](./database-2025-10-data-plane-createnamespace.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
