{
  "schema_version": 2,
  "id": "commands/argetrange",
  "title": "ARGETRANGE",
  "url": "https://redis.io/docs/latest/commands/argetrange/",
  "summary": "Gets values in a range of indices.",
  "since": "8.8.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-07-24T11:07:00+02:00",
  "page_type": "content",
  "content_hash": "a208f4ca40e59db7f99de1635e8ba86dad9d5c2a2e9525901cea5aa506cd715e",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Gets values in a range of indices."
    },
    {
      "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 array.\n\n</details>\n\n<details open><summary><code>start</code></summary>\n\nThe zero-based integer index of the first element to return. If `start` is greater than `end`, elements are returned in reverse index order.\n\n</details>\n\n<details open><summary><code>end</code></summary>\n\nThe zero-based integer index of the last element to return (inclusive). If `end` is less than `start`, elements are returned in reverse index order.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> ARMSET myarray 0 \"a\" 1 \"b\" 3 \"d\"\n(integer) 3\nredis> ARGETRANGE myarray 0 3\n1) \"a\"\n2) \"b\"\n3) (nil)\n4) \"d\"\nredis> ARGETRANGE myarray 3 0\n1) \"d\"\n2) (nil)\n3) \"b\"\n4) \"a\""
    },
    {
      "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=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays)\n\n**RESP3:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays)"
    }
  ],
  "examples": []
}
