Query syntax

The search box on the card database accepts more than plain words. A query is one or more clauses, combined with or and implicit "and", and grouped with parentheses. Prefix a clause with - to negate it.

A bare word searches names and rules text; every other field needs a keyword, written as field:value. Field names and values are case-insensitive. A value with a space needs quotes, e.g. tag:"Tyger Claws".

Precedence

From tightest to loosest binding: parentheses, then negation (-), then implicit "and" (writing two clauses next to each other), then or. One thing worth knowing by heart: a or b c means a or (b c), not (a or b) c — "and" grabs everything up to the next or.

Fields

FieldKeyword(s)OperatorsValuenone / has
Colorcolor:, c:: =enum
Card Typetype:, t:: =enum
Keywordkeyword:, kw:: =enumyes
Tagtag:: =stringyes
Costcost:: = < <= > >=numericyes
Powerpower:, pow:: = < <= > >=numericyes
RAMram:: = < <= > >=numericyes
Eddiableeddiable:, ed:: =boolean
Setset:, s:: =string
Rarityrarity:, r:: = < <= > >=enum
Namename:: =text
Rules textrules:: =textyes
Bare word(none — bare word): =text
Legend colors (RAM budget)legends::legends

Null semantics

A missing value is never the same as zero. Some cards have no cost, no power, no RAM requirement, no tags, or no rules text at all — that's a distinct state, not a value of zero or an empty string. A plain range or comparison (cost>=2) never matches a card missing that field.

To reach that state directly, every nullable field accepts field:none (has no value — or, for Tag and Keyword, no values at all) and field:has (has some value). To combine a range with the null bucket, use or: (cost>=2 cost<=4) or cost:none.

Legend colors

legends: filters by the colored RAM budget a deck's three Legends would provide. Its value is color letters (r, y, g, b), each optionally followed by a number: a bare letter is worth 1, a number after it sets that amount, and repeats add up. legends:rryyyy and legends:r2y4 both mean Red 2, Yellow 4.

Regex

A bare word, name:, and rules: also accept a regular expression between slashes, e.g. /bloc+ker/. Patterns matching a few well-known catastrophic shapes are rejected rather than run.

Worked examples

Each one is a live link into the card database.

Unofficial fan project. Not associated with or endorsed by the publisher. Card names, art and rules text are the property of their respective owners. Card data from api.netdeck.gg. Query language: Syntax.