Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

List namespaces

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 includes pagination.next, a token you pass as paginationToken to get the next batch of namespaces. When the response has no pagination, there are no more namespaces to return.

For guidance and examples, see Manage namespaces.

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

curl
# 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: 2026-07"

GET /namespaces

cURL
curl --request GET \
  --url https://{index_host}/namespaces \
  --header 'Authorization: Bearer <token>'
200
{
  "namespaces": [
    {
      "name": "example-namespace",
      "record_count": "20000",
      "schema": {
        "fields": {
          "description": {
            "filterable": true
          },
          "genre": {
            "filterable": true
          },
          "year": {
            "filterable": true
          }
        }
      },
      "indexed_fields": {
        "fields": [
          "genre",
          "year",
          "author"
        ]
      },
      "size_bytes": "1048576"
    }
  ],
  "pagination": {
    "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
  },
  "total_count": 25
}
  • Authorization (header, string, required) — Bearer authentication header of the form Bearer <token>.
  • limit (query, integer) — Max number of namespaces to return per page. Defaults to 100.
  • paginationToken (query, string) — Pagination token to continue a previous listing operation.
  • prefix (query, string) — Prefix of the namespaces to list. Acts as a filter to return only namespaces that start with this prefix. Must be ASCII and must not contain the NUL character, matching the namespace names it filters. An empty prefix matches every namespace.
  • X-Pinecone-Api-Version (header, string, required) — Required date-based version header
  • 200 — A successful response
  • 400 — Bad request. The request included invalid request parameters.
  • 401 — Unauthorized. Possible causes: missing or invalid API key.
  • 4XX — An unexpected error response.
  • 5XX — An unexpected error response.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu