Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- JSON Get
- JSON Set
- Keys
- List Length
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Scan
AI-generatedSummary
Scan keys incrementally in Redis starting from a specified cursor, optionally matching a key pattern and limiting the count of keys returned per call.
Inputs
- Cursor — Cursor position for scanning; use 0 to start a new scan iteration.
- Pattern — Glob-style pattern to match keys against; defaults to '*' to match all keys.
- Count — Approximate number of keys to return in this scan iteration; defaults to 10.
Output shape
A single JSON object containing the 'cursor' for the next scan position and an array of matched 'keys'.
The scan command is incremental and production-safe for large datasets. The returned cursor must be used in subsequent calls to continue scanning until the cursor returns to 0, indicating the complete iteration over the keys.