---
type: api
title: Get field data cache information
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-cat-fielddata
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-cat-fielddata
products:
  - Elasticsearch
---

# Get field data cache information


## Paths

- `GET` `/_cat/fielddata/{fields}`
- `GET` `/_cat/fielddata`

#### Path parameters

- `fields` (union string | string[]) — optional, leave it out to use `/_cat/fielddata`
  Comma-separated list of fields used to limit returned information.
To retrieve all fields, omit this parameter.

## Description

Get the amount of heap memory currently used by the field data cache on every data node in the cluster.

IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
They are not intended for use by applications. For application consumption, use the nodes stats API.

## Required authorization

- Cluster privileges: `monitor`

## 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

- `fields` (union oneOf) — optional
  Comma-separated list of fields used to limit returned information.
  One of: `string[]` or `string`
- `h` (union oneOf) — optional
  A comma-separated list of columns names to display. It supports simple wildcards.

Supported values include:
  - `id`: The node ID.
  - `host` (or `h`): The host name of the node.
  - `ip`: The IP address of the node.
  - `node` (or `n`): The node name.
  - `field` (or `f`): The field name.
  - `size` (or `s`): The field data usage.
  Values: `id`, `host`, `h`, `ip`, `node`, `n`, `field`, `f`, `size`, `s`
- `s` (union oneOf) — optional
  List of columns that determine how the table should be sorted.
Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
  One of: `string[]` or `string`

## Response

`application/json`

Type: `object[]`

An array; each item has these fields:

- `id` (string)
  node id
- `host` (string)
  host name
- `ip` (string)
  ip address
- `node` (string)
  node name
- `field` (string)
  field name
- `size` (string)
  field data usage
## Code examples

#### Console

```console
GET /_cat/fielddata?v=true&fields=body&format=json
```

#### JavaScript

```javascript
const response = await client.cat.fielddata({
  v: "true",
  fields: "body",
  format: "json",
});
```

#### Python

```python
resp = client.cat.fielddata(
    v=True,
    fields="body",
    format="json",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_cat/fielddata?v=true&fields=body&format=json" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.cat().fielddata();
```

#### PHP

```php
$resp = $client->cat()->fielddata([
    "v" => "true",
    "fields" => "body",
    "format" => "json",
]);
```

#### Ruby

```ruby
response = client.cat.fielddata(
  v: "true",
  fields: "body",
  format: "json"
)
```

## Response examples

#### Single field data

A successful response from `GET /_cat/fielddata?v=true&fields=body&format=json`. You can specify an individual field in the request body or URL path. This example retrieves heap memory size information for the `body` field.

```json
[
  {
    "id": "Nqk-6inXQq-OxUfOUI8jNQ",
    "host": "127.0.0.1",
    "ip": "127.0.0.1",
    "node": "Nqk-6in",
    "field": "body",
    "size": "544b"
  }
]
```

#### Multiple fields data

A successful response from `GET /_cat/fielddata/body,soul?v=true&format=json`. You can specify a comma-separated list of fields in the request body or URL path. This example retrieves heap memory size information for the `body` and `soul` fields. To get information for all fields, run `GET /_cat/fielddata?v=true`.

```json
[
  {
    "id": "Nqk-6inXQq-OxUfOUI8jNQ",
    "host": "1127.0.0.1",
    "ip": "127.0.0.1",
    "node": "Nqk-6in",
    "field": "body",
    "size": "544b"
  },
  {
    "id": "Nqk-6inXQq-OxUfOUI8jNQ",
    "host": "127.0.0.1",
    "ip": "127.0.0.1",
    "node": "Nqk-6in",
    "field": "soul",
    "size": "480b"
  }
]
```

