{
  "schema_version": 2,
  "id": "commands/arinsert",
  "title": "ARINSERT",
  "url": "https://redis.io/docs/latest/commands/arinsert/",
  "summary": "Inserts one or more values at consecutive indices.",
  "since": "8.8.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T16:45:12+01:00",
  "page_type": "content",
  "content_hash": "7b1d0b67977ab8f617f42173ebc4a0d88dba30f8d260b67850f909b42061abcd",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Inserts one or more values at consecutive 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>value</code></summary>\n\nOne or more string values to insert at consecutive indices, beginning at the current insert cursor position. The cursor advances by one for each value inserted. Use [`ARNEXT`](https://redis.io/docs/latest/commands/arnext) to inspect the current cursor position and [`ARSEEK`](https://redis.io/docs/latest/commands/arseek) to reposition it.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> ARINSERT myarray \"alpha\"\n(integer) 0\nredis> ARINSERT myarray \"beta\"\n(integer) 1\nredis> ARINSERT myarray \"gamma\"\n(integer) 2\nredis> ARGET myarray 1\n\"beta\"\nredis> ARNEXT myarray\n(integer) 3"
    },
    {
      "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[Integer reply](../../develop/reference/protocol-spec#integers): The last index where a value was inserted.\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): The last index where a value was inserted."
    }
  ],
  "examples": []
}
