> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-dx-3009-array-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ARNEXT

> Read the next append index without moving the cursor.

## Arguments

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

## Response

<ResponseField type="string | null" required>
  The next append index. A missing key or an array without appends returns `"0"` in TypeScript or `0` in Python. Returns `null` / `None` when the cursor has reached the highest supported index.
</ResponseField>

<RequestExample>
  ```ts Example theme={"system"}
  await redis.arinsert("events", "boot", "ready");
  console.log(await redis.arnext("events")); // "2"
  ```
</RequestExample>

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