Upstash Documentation home page
Search...
⌘K
Ask AI
Discord
Blog
X
Console
Console
Search...
Navigation
Generic
KEYS
General
Redis
Kafka
Vector
QStash
SDKs
Developer API
Overall
Overview
SDKs
Typescript
Python
upstash-ratelimit
upstash-vector
upstash-redis
Overview
Getting Started
Features
Commands
Overview
Auth
Bitmap
Generic
DEL
EXISTS
EXPIRE
EXPIREAT
KEYS
PERSIST
PEXPIRE
PEXPIREAT
PTTL
RANDOMKEY
RENAME
RENAMENX
SCAN
TOUCH
TTL
TYPE
UNLINK
Hash
List
PubSub
Scripts
Server
Set
Sorted Set
String
upstash-qstash
DevOps
Terraform
Pulumi
CLI
Example
Match All
Copy
Ask AI
keys
=
redis.keys(
"prefix*"
)
Generic
KEYS
Returns all keys matching pattern.
Example
Match All
Copy
Ask AI
keys
=
redis.keys(
"prefix*"
)
This command may block the DB for a long time, depending on its size. We advice against using it in production. Use
SCAN
instead.
Arguments
match
str
required
A glob-style pattern. Use
*
to match all keys.
Response
Array of keys matching the pattern.
Example
Match All
Copy
Ask AI
keys
=
redis.keys(
"prefix*"
)
Was this page helpful?
Yes
No
Suggest edits
Raise issue
EXPIREAT
PERSIST
Assistant
Responses are generated using AI and may contain mistakes.