---
type: api
title: Get searchable snapshot statistics
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats
products:
  - Elasticsearch
---

# Get searchable snapshot statistics


Availability: Generally available since 7.10

## Paths

- `GET` `/{index}/_searchable_snapshots/stats`
- `GET` `/_searchable_snapshots/stats`

#### Path parameters

- `index` (union string | string[]) — optional, leave it out to use `/_searchable_snapshots/stats`
  A comma-separated list of data streams and indices to retrieve statistics for.

## Required authorization

- Index privileges: `manage`
- Cluster privileges: `manage`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/token-based-authentication-services)

## Query string parameters

- `level` (enum · default: indices) — optional
  Return stats aggregated at cluster, index or shard level
  Values: `cluster`, `indices`, `shards`

## Response

`application/json`

- `stats` (object)
- `total` (object)
## Code examples

#### Console

```console
GET /my-index/_searchable_snapshots/stats
```

#### JavaScript

```javascript
const response = await client.searchableSnapshots.stats({
  index: "my-index",
});
```

#### Python

```python
resp = client.searchable_snapshots.stats(
    index="my-index",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/my-index/_searchable_snapshots/stats" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.searchableSnapshots().stats(s -> s
    .index("my-index")
);
```

#### C#

```c#
var response = await client.SearchableSnapshots
    .StatsAsync(d1 => d1
        .Indices(new[] { "my-index" })
    );
```

#### PHP

```php
$resp = $client->searchableSnapshots()->stats([
    "index" => "my-index",
]);
```

#### Ruby

```ruby
response = client.searchable_snapshots.stats(
  index: "my-index"
)
```

