{
  "schema_version": 2,
  "id": "commands/georadiusbymember",
  "title": "GEORADIUSBYMEMBER",
  "url": "https://redis.io/docs/latest/commands/georadiusbymember/",
  "summary": "Queries a geospatial index for members within a distance from a member, optionally stores the result.",
  "since": "3.2.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:43+01:00",
  "page_type": "content",
  "content_hash": "c540b706da107058db53395ec8dbf1eecb56fb85a5ed02f6b957f1fc3da96f8c",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "> [!NOTE]\n> This command's behavior varies in clustered Redis environments. See the [multi-key operations](https://redis.io/docs/latest/develop/using-commands/multi-key-operations) page for more information.\n\n\nThis command is exactly like [`GEORADIUS`](https://redis.io/docs/latest/commands/georadius) with the sole difference that instead\nof taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.\n\nThe position of the specified member is used as the center of the query.\n\nPlease check the example below and the [`GEORADIUS`](https://redis.io/docs/latest/commands/georadius) documentation for more information about the command and its options.\n\nNote that [`GEORADIUSBYMEMBER_RO`](https://redis.io/docs/latest/commands/georadiusbymember_ro) is also available since Redis 3.2.10 and Redis 4.0.0 in order to provide a read-only command that can be used in replicas. See the [`GEORADIUS`](https://redis.io/docs/latest/commands/georadius) page for more information."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key that holds the geospatial index (a sorted set).\n\n</details>\n\n<details open><summary><code>member</code></summary>\n\nThe member whose position is used as the center of the search.\n\n</details>\n\n<details open><summary><code>radius</code></summary>\n\nThe radius of the search circle, in the unit given by the following argument.\n\n</details>\n\n<details open><summary><code>M | KM | FT | MI</code></summary>\n\nThe unit for `radius`: meters (`M`), kilometers (`KM`), feet (`FT`), or miles (`MI`).\n\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>WITHCOORD</code></summary>\n\nAlso return the longitude and latitude of each matching item.\n\n</details>\n\n<details open><summary><code>WITHDIST</code></summary>\n\nAlso return the distance of each matching item from the center, in the same unit as the radius.\n\n</details>\n\n<details open><summary><code>WITHHASH</code></summary>\n\nAlso return the raw 52-bit geohash-encoded score of each matching item.\n\n</details>\n\n<details open><summary><code>COUNT count [ANY]</code></summary>\n\nReturn at most `count` matches. With `ANY`, the command returns as soon as enough matches are found — faster, but the results may be unsorted.\n\n</details>\n\n<details open><summary><code>ASC | DESC</code></summary>\n\nSort the results by distance from the center: nearest first (`ASC`) or farthest first (`DESC`).\n\n</details>\n\n<details open><summary><code>STORE key</code></summary>\n\nStore the results as a geospatial index in `key` instead of returning them. `STORE` and `STOREDIST` are mutually exclusive.\n\n</details>\n\n<details open><summary><code>STOREDIST key</code></summary>\n\nStore the results in `key` as a sorted set of distances from the center, instead of returning them.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> GEOADD Sicily 13.583333 37.316667 \"Agrigento\"\n(integer) 1\nredis> GEOADD Sicily 13.361389 38.115556 \"Palermo\" 15.087269 37.502669 \"Catania\"\n(integer) 2\nredis> GEORADIUSBYMEMBER Sicily Agrigento 100 km\n1) \"Agrigento\"\n2) \"Palermo\""
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | Deprecated as of Redis v6.2.0. |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names\n* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:\n    * The distance from the center as a floating point number, in the same unit specified in the radius.\n    * The Geohash integer.\n    * The coordinates as a two items x,y array (longitude,latitude).\n\n**RESP3:**\n\nOne of the following:\n* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names\n* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:\n    * The distance from the center as a floating point number, in the same unit specified in the radius.\n    * The Geohash integer.\n    * The coordinates as a two items x,y array (longitude,latitude)."
    }
  ],
  "examples": []
}
