# ARINFO

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

## Arguments

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

<ParamField body="options" type="Object">
  <ParamField body="full" type="boolean">
    Include per-slice statistics. Defaults to false. Enabling this walks the whole array.
  </ParamField>
</ParamField>

## Response

<ResponseField type="ArInfoResult" 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` | `string` | Highest occupied index plus one. |
| `count` | `number` | Number of occupied slots. |
| `sliceSize` | `number` | Indexes covered by one slice. |
| `slices` | `number` | Allocated slices. |
| `directorySize` | `number` | Slice directory entries. |
| `superDirEntries` | `number` | Top-level directory entries. |
| `nextInsertIndex` | `string` | Next append position. |
| `denseSlices` | `number` | Dense slices. Only with full statistics. |
| `sparseSlices` | `number` | Sparse slices. Only with full statistics. |
| `avgDenseSize` | `number` | Average values per dense slice. Only with full statistics. |
| `avgDenseFill` | `number` | Average dense-slice fill ratio. Only with full statistics. |
| `avgSparseSize` | `number` | Average values per sparse slice. Only with full statistics. |

<RequestExample>
```ts Example
await redis.arinsert("events", "boot", "ready");
const info = await redis.arinfo("events");
console.log(info.len, info.count, info.nextInsertIndex); // "2", 2, "2"
const fullInfo = await redis.arinfo("events", { full: true });
console.log(fullInfo.denseSlices, fullInfo.sparseSlices);
```
</RequestExample>

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