Upstash Documentation home page
Search...
⌘K
Ask AI
Discord
Blog
X
Console
Console
Search...
Navigation
Sorted Set
ZRANK
General
Redis
Kafka
Vector
QStash
SDKs
Developer API
Overall
Overview
SDKs
Typescript
@upstash/redis
Overview
Get Started
Commands
Overview
Auth
Bitmap
Generic
Hash
Json
List
PubSub
Scripts
Server
Set
Sorted Set
ZADD
ZCARD
ZCOUNT
ZDIFFSTORE
ZINCRBY
ZINTERSTORE
ZLEXCOUNT
ZMSCORE
ZPOPMAX
ZPOPMIN
ZRANGE
ZRANK
ZREM
ZREMRANGEBYLEX
ZREMRANGEBYRANK
ZREMRANGEBYSCORE
ZREVRANK
ZSCAN
ZSCORE
ZUNIONSTORE
Stream
String
Transactions
Deployment
Pipeline
Advanced
Retries
Troubleshooting
Developing or Testing
@upstash/query
@upstash/vector
@upstash/edge-flags
@upstash/ratelimit
@upstash/kafka
@upstash/qstash
Python
DevOps
Terraform
Pulumi
CLI
Example
Copy
Ask AI
const
rank
=
await
redis
.
rank
(
"key"
,
"member"
);
Sorted Set
ZRANK
Returns the rank of a member
Example
Copy
Ask AI
const
rank
=
await
redis
.
rank
(
"key"
,
"member"
);
Arguments
key
string
required
The key to get.
member
TMember
required
The member to get the rank of.
Response
The rank of the member.
Example
Copy
Ask AI
const
rank
=
await
redis
.
rank
(
"key"
,
"member"
);
Was this page helpful?
Yes
No
Suggest edits
Raise issue
ZRANGE
ZREM
Assistant
Responses are generated using AI and may contain mistakes.