List namespaces
List all namespaces in a serverless index.
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.
Note: This operation is not supported for pod-based indexes.
# 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-10"GET /namespaces
{
"namespaces": [
{
"name": "example-namespace",
"record_count": 20000,
"schema": {
"fields": {
"description": {
"filterable": true
},
"genre": {
"filterable": true
},
"year": {
"filterable": true
}
}
},
"indexed_fields": {
"fields": [
"genre",
"year",
"author"
]
}
}
],
"pagination": {
"next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
},
"total_count": 25
}{
"code": 123,
"message": "<string>",
"details": [
{
"typeUrl": "<string>",
"value": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"typeUrl": "<string>",
"value": "<string>"
}
]
}Authorizations
Section titled “Authorizations”Api-KeystringrequiredAn API Key is required to call Pinecone APIs. Get yours from the console.
Headers
Section titled “Headers”X-Pinecone-Api-VersionstringrequiredRequired date-based version header
Query Parameters
Section titled “Query Parameters”limit?integerMax number namespaces to return per page.
paginationToken?stringPagination token to continue a previous listing operation.
prefix?stringPrefix of the namespaces to list. Acts as a filter to return only namespaces that start with this prefix.
Response
Section titled “Response”200 — A successful response
namespaces?object[]The list of namespaces belonging to this index.
Show child attributes
name?stringThe name of the namespace.
Example: example-namespace
record_count?integerThe total amount of records within the namespace.
Example: 20000
schema?objectSchema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when schema is present, only fields which are present in the fields object with a filterable: true are indexed. Note that filterable: false is not currently supported.
Show child attributes
fieldsobjectrequiredA map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique.
indexed_fields?objectA list of all indexed metatadata fields in the namespace
Show child attributes
fields?string[]pagination?objectShow child attributes
next?stringExample: Tm90aGluZyB0byBzZWUgaGVyZQo=
total_count?integerThe total number of namespaces in the index matching the prefix
Example: 25