# ARINFO

> Inspect array size, storage layout, and append position.

## Arguments

<ParamField body="key" type="str" required>
  The array key.
</ParamField>

<ParamField body="full" type="bool">
  Include per-slice statistics. Defaults to False. Enabling this walks the whole array.
</ParamField>

## Response

<ResponseField type="Dict[str, int | float]" required>
  An object with camelCase field names in TypeScript, or a dictionary with snake_case field names in Python. A missing key raises an error.
</ResponseField>

| Field | Type | Meaning |
| --- | --- | --- |
| `len` | `int` | Highest occupied index plus one. |
| `count` | `int` | Number of occupied slots. |
| `slice_size` | `int` | Indexes covered by one slice. |
| `slices` | `int` | Allocated slices. |
| `directory_size` | `int` | Slice directory entries. |
| `super_dir_entries` | `int` | Top-level directory entries. |
| `next_insert_index` | `int` | Next append position. |
| `dense_slices` | `int` | Dense slices. Only with full statistics. |
| `sparse_slices` | `int` | Sparse slices. Only with full statistics. |
| `avg_dense_size` | `float` | Average values per dense slice. Only with full statistics. |
| `avg_dense_fill` | `float` | Average dense-slice fill ratio. Only with full statistics. |
| `avg_sparse_size` | `float` | Average values per sparse slice. Only with full statistics. |

<RequestExample>
```py Example
redis.arinsert("events", "boot", "ready")
info = redis.arinfo("events")
print(info["len"], info["count"], info["next_insert_index"])  # 2 2 2
full_info = redis.arinfo("events", full=True)
print(full_info["dense_slices"], full_info["sparse_slices"])
```
</RequestExample>

See the [server command reference](/redis/commands/array/arinfo) for protocol details.
