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

# SCAN

> Scan the database for keys.

## Arguments

<ParamField body="cursor" type="number">
  The cursor, use `0` in the beginning and then use the returned cursor for subsequent calls.
</ParamField>

<ParamField body="options" type="Object">
  <ParamField body="match" type="string">
    Glob-style pattern to filter by field names.
  </ParamField>

  <ParamField body="count" type="number">
    Number of fields to return per call.
  </ParamField>

  <ParamField body="type" type="string">
    Filter by type.
    For example `string`, `hash`, `set`, `zset`, `list`, `stream`.
  </ParamField>
</ParamField>

## Response

<ResponseField type="[number, string[]]" required>
  The new cursor and the keys.
  If the new cursor is `0` the iteration is complete.
</ResponseField>

<RequestExample>
  ```ts Basic
  const [newCursor, keys] = await redis.scan(0, {match: "*"});
  ```
</RequestExample>
