Skip to main content

KEYS

Returns all keys matching pattern.
1 min read
Warning

This command can block the database for an extended period, especially with large datasets. We recommend using SCAN instead for production environments.

This command will return an error for databases containing more than 100,000 entries.

Arguments#

matchstrrequired#

A glob-style pattern. Use * to match all keys.

Response#

List[str]

Array of keys matching the pattern.

Was this page helpful?