{
  "schema_version": 2,
  "id": "commands/geopos",
  "title": "GEOPOS",
  "url": "https://redis.io/docs/latest/commands/geopos/",
  "summary": "Returns the longitude and latitude of members from a geospatial index.",
  "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": "5b87871e09fc1f39a56bc5f9bc0dfd8c3bebed14d2682b5c2e4cbeb0ddc2197a",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at *key*.\n\nGiven a sorted set representing a geospatial index, populated using the [`GEOADD`](https://redis.io/docs/latest/commands/geoadd) command, it is often useful to obtain back the coordinates of specified members. When the geospatial index is populated via [`GEOADD`](https://redis.io/docs/latest/commands/geoadd) the coordinates are converted into a 52 bit geohash, so the coordinates returned may not be exactly the ones used in order to add the elements, but small errors may be introduced.\n\nThe command can accept a variable number of arguments so it always returns an array of positions even when a single element is specified."
    },
    {
      "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 [member ...]</code></summary>\n\nOne or more members whose longitude and latitude to return.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> GEOADD Sicily 13.361389 38.115556 \"Palermo\" 15.087269 37.502669 \"Catania\"\n(integer) 2\nredis> GEOPOS Sicily Palermo Catania NonExisting\n1) 1) \"13.361389338970184\"\n   2) \"38.1155563954963\"\n2) 1) \"15.087267458438873\"\n   2) \"37.50266842333162\"\n3) (nil)"
    },
    {
      "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> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non-existing elements are reported as [Nil reply](../../develop/reference/protocol-spec#bulk-strings) elements of the array.\n\n**RESP3:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non-existing elements are reported as [Null reply](../../develop/reference/protocol-spec#nulls) elements of the array."
    }
  ],
  "examples": []
}
