{
  "id": "bf.madd",
  "title": "BF.MADD",
  "url": "https://redis.io/docs/latest/commands/bf.madd/",
  "summary": "Adds one or more items to a Bloom Filter. A filter will be created if it does not exist",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-04-09T10:29:34-04:00",
  "page_type": "content",
  "content_hash": "bfbd31c9ca03f8e693ff664b6cafdbfcfe8b8d6f376e0b54e7cfaa668884eaa3",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Adds one or more items to a Bloom filter.\n\nThis command is similar to [`BF.ADD`](), except that you can add more than one item.\n\nThis command is similar to [`BF.INSERT`](), except that the error rate, capacity, and expansion cannot be specified."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nis key name for a Bloom filter to add the items to.\n\nIf `key` does not exist - a new Bloom filter is created with default error rate, capacity, and expansion (see [`BF.RESERVE`]()).\n</details>\n\n<details open><summary><code>item...</code></summary>\n\nOne or more items to add.\n</details>"
    },
    {
      "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; Supported</span><br /> | <span title=\"Supported\">&#x2705; Flexible & Annual</span><br /><span title=\"Supported\">&#x2705; Free & Fixed</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "Returns one of these replies:\n\n- [Array reply]() where each element is either\n  - [Integer reply]() - where \"1\" means that the item has been added successfully, and \"0\" means that such item was already added to the filter (which could be wrong)\n  - [] when the item cannot be added because the filter is full\n- [] on error (invalid arguments, wrong key type, etc.)"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> BF.MADD bf item1 item2 item2\n1) (integer) 1\n2) (integer) 1\n3) (integer) 0"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n* [Array reply]() where each element is either\n  * an [integer reply](), where `1` means that the item has been added successfully, and `0` means there's a probability that the item was already added to the filter.\n  * a [simple error reply]() when the item cannot be added because the filter is full.\n* [Simple error reply]() in these cases: invalid arguments, key not found, wrong key type, or when the filter is full.\n\n**RESP3:**\n\nOne of the following:\n* [Array reply]() where each element is either\n  * a [boolean reply](), where `true` means that the item has been added successfully, and `false` means there's a probability that the item was already added to the filter.\n  * a [simple error reply]() when the item cannot be added because the filter is full.\n* [Simple error reply]() in these cases: invalid arguments, key not found, wrong key type, or when the filter is full."
    }
  ],
  "examples": []
}
