{
  "id": "arlen",
  "title": "ARLEN",
  "url": "https://redis.io/docs/latest/commands/arlen/",
  "summary": "Returns the length of an array (max index + 1).",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-05-25T10:30:01-07:00",
  "page_type": "content",
  "content_hash": "142327c6ba144b51853fa1ed18c52c794a17f8ef3531544bbd515812b282630f",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Returns the length of an array (max index + 1)."
    },
    {
      "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>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "ARSET myarray 0 \"a\"\nARSET myarray 5 \"b\"\nARLEN myarray\nARCOUNT myarray"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): The length of the array (max index + 1), or 0 if key does not exist.\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): The length of the array (max index + 1), or 0 if key does not exist."
    }
  ],
  "examples": []
}
