---
type: api
title: Get enrich stats
description: Returns enrich coordinator statistics and information about enrich policies that are currently executing.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-enrich-stats
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-enrich-stats
products:
  - Elasticsearch
---

# Get enrich stats

Availability: Generally available since 7.5

## Paths

- `GET` `/_enrich/_stats`

## Description

Returns enrich coordinator statistics and information about enrich policies that are currently executing.

## 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/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Query string parameters

- `master_timeout` (string · default: 30s) — optional
  Period to wait for a connection to the master node.

## Response

`application/json`

- `coordinator_stats` (object[])
  Objects containing information about each coordinating ingest node for configured enrich processors.
  - `executed_searches_total` (number)
  - `node_id` (string)
  - `queue_size` (number)
  - `remote_requests_current` (number)
  - `remote_requests_total` (number)
- `executing_policies` (object[])
  Objects containing information about each enrich policy that is currently executing.
  - `name` (string)
  - `task` (object)
    - `action` (string)
    - `cancelled` (boolean)
    - `cancellable` (boolean)
    - `description` (string)
      Human readable text that identifies the particular request that the task is performing.
For example, it might identify the search request being performed by a search task.
Other kinds of tasks have different descriptions, like `_reindex` which has the source and the destination, or `_bulk` which just has the number of requests and the destination indices.
Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.
    - `headers` (map string to string)
    - `id` (number)
    - `node` (string)
    - `running_time` (string)
    - `running_time_in_nanos` (number)
    - `start_time_in_millis` (number)
    - `status` (object)
      The internal status of the task, which varies from task to task.
The format also varies.
While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes.
Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.
    - `type` (string)
    - `parent_task_id` (number | string)
- `cache_stats` (object[])
  Objects containing information about the enrich cache stats on each ingest node.
  - `node_id` (string)
  - `count` (number)
  - `hits` (number)
  - `hits_time_in_millis` (number)
  - `misses` (number)
  - `misses_time_in_millis` (number)
  - `evictions` (number)
  - `size_in_bytes` (number)
## Code examples

#### Console

```console
GET /_enrich/_stats
```

#### JavaScript

```javascript
const response = await client.enrich.stats();
```

#### Python

```python
resp = client.enrich.stats()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_enrich/_stats" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.enrich().stats(s -> s);
```

#### C#

```c#
var response = await client.Enrich.StatsAsync();
```

#### PHP

```php
$resp = $client->enrich()->stats();
```

#### Ruby

```ruby
response = client.enrich.stats
```

