> ## 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="str" required>
  The array key.
</ParamField>

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

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

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

## Response

<ResponseField type="List[Tuple[int, str]]" 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>

<RequestExample>
  ```py Example theme={"system"}
  redis.armset("readings", {10: "a", 1000: "b"})
  print(redis.arscan("readings", 0, 1000, limit=2))
  # [(10, "a"), (1000, "b")]
  ```
</RequestExample>

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