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

# ARSCAN

> Read occupied array slots with their indexes.

## Arguments

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

<ParamField body="start" type="number | string" required>
  The first index of the inclusive range.
</ParamField>

<ParamField body="end" type="number | string" required>
  The last index of the inclusive range.
</ParamField>

<ParamField body="options" type="Object">
  <ParamField body="limit" type="number">
    Maximum number of occupied slots to return. If provided, it must be greater than zero.
  </ParamField>
</ParamField>

## Response

<ResponseField type="[string, TData][]" required>
  Index-value pairs for occupied slots. Empty slots are skipped; a missing key returns an empty list. TypeScript returns indexes as strings; Python returns integers.
</ResponseField>

Values use the SDK's automatic deserialization. Use `TData` to describe stored JSON values; it defaults to `string`.

<RequestExample>
  ```ts Example theme={"system"}
  await redis.armset("readings", { 10: "a", 1000: "b" });
  console.log(await redis.arscan("readings", 0, 1000, { limit: 2 }));
  // [["10", "a"], ["1000", "b"]]
  ```
</RequestExample>

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