NIPs by PolleramaCommunity NIPs, surfaced by trustConnect
npub1ye5ptcxfyyx...

NIP-91 : AND Operator in Filters

Published Jun 29, 2026

Enable AND within a single tag filter by using an & modifier in filters for indexable tags.

filters: {
  "kinds": [1],
  "&t": ["meme", "cat"],
  "#t": ["meme", "cat", "black", "white"]
}
// returns kind `1` events with `t` tags that have both "meme" and "cat" that have the tag "black" or "white" by NIP-91 relays, whereas relays without NIP-91 return entire result for local intersection.

Rules

  • AND MUST take precedence over OR by relays
  • Any tag value used in AND SHOULD be ignored in OR by relays supporting NIP-91
  • Tag values used in AND by libraries and clients MUST include standard OR tags [#] for compatibility with relays that do not support NIP-91.
  • libraries and clients SHOULD run & post-filters after recieving results from relays; already standard practice.

Copied from the pending PR