---
title: "zrank · RUAL Documentation"
description: "Reads a member's position in a sorted set. A RUAL redis block in the redis sorted sets group. See its 4 input and 6 output pins and its version history."
canonical: https://docs.rual.nl/block-types/redis/redis_zrank
language: en
---

# zrank

This block is part of the [`redis`](https://docs.rual.nl/block-types/redis) group and was last modified in core [`v15.0.3`](https://docs.rual.nl/core-versions/150003).

## Redis Key Selection Required

This block relies on a Redis key to perform its redis releated actions. You must manually select the Redis key you want to use in the flow in the blueprint using the Redis key selector modal. To access the modal, click the white button on the block.

Reads a member's position in a sorted set.

- flow

- set `value` required key of the sorted set

- member `value` required

- from highest score `condition`

- flow

- rank `number`

- exists `condition`

- success `condition`

- error `value`

- key `value`

rank is 0-based, counted from the lowest score, or from the highest when reverse is true. When the set or the member is missing exists is false and rank is -1.

| `redis zrank` |
| --- |
| `zrank` |
| `zrevrank` |

## Version history

Introduced in [`v15.0.3`](https://docs.rual.nl/core-versions/150003).

## Service documentation

- [External API reference](https://redis.io/commands/zrank/): This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.

- [Back to `redis`](https://docs.rual.nl/block-types/redis): Return to the main group to view all sub-groups

- [Back to `redis sorted sets`](https://docs.rual.nl/block-types/redis?group=redis%20sorted%20sets): Return to the group to view all blocks within this group
