SanSanDB ✨✨✨ New Search ✨✨✨ Syntax

This is the ✨✨✨ New Search Syntax ✨✨✨. The old search syntax is also available.

The new Search Syntax supports richer search operations and more functionality with existing NRDB Search and is largely compatible expect for any differences called out below.


Syntax

This is an overview of the available operands and operators you can use to search for cards.

Field Types & Operators

There are 5 types of fields in the Search Filter:

  • Array - supports the : (an element in the array is an exact match) and ! (an element in the array is not an exact match) operators.
    • card_pool_ids:eternal|snapshot returns all cards in the eternal or snapshot card pools.
    • card_pool!snapshot returns all cards not in the snapshot card pool.
  • Boolean - supports the : (match) and ! (negated match) operators. true, false, t, f, 1, and 0 are all acceptable values.
    • advanceable:true, advanceable:t, and advanceable:1 will all return all results where advanceable is true.
  • Date - supports the : (match), ! (negated match), <, <=, >, and >= operators. Requires date in YYYY-MM-DD format.
    • release_date<=2020-01-01 will return everything with a release date less than or equal to New Year’s Day, 2020.
  • Integer - supports the : (match), ! (negated match), <, <=, >, and >= operators. Requires simple integer input.
    • For cards that have an X value, you can match with X, like cost:X (case insensitive). an X value is treated as -1 behind the scenes.
  • String - LIKE - supports the : (LIKE) and ! (NOT LIKE) operators if. Input is transformed to lower case and the % decorations are added automatically, turning a query like title:street into a SQL fragment like LOWER(stripped_title) LIKE '%street%.
    • title:clearance returns everything with clearance in the title.
    • title!clearance returns everything without clearance in the title.
  • String - Regular Expression - string fields support positive and negative matches against regular expressions wrapped slashes like /PATTERN/
    • _:/^b/ f:anarch t:program returns all Anarch Programs starting with "b".
    • _!/^b/ f:anarch t:program returns all Anarch Programs not starting with "b".

Some examples

  • test or _:test searches for cards "test" in their title
  • _:a _!b searches for cards with "a" in their title but not "b"
  • t:asset searches for all Assets
  • t:asset s:ambush searches for every Asset that has the subtype Ambush
  • x:"make a run" searches for all cards with the text "make a run"
  • t:asset|upgrade f:nbn searches for all NBN cards that are Assets or Upgrades
  • f:anarch|shaper n<3 searches for all Anarch or Shaper cards with a faction cost less than 3
  • t:ice s!barrier|sentry|"code gate" searches for all ICE that are neither barrier, code gate nor sentry
  • r<2013-01-01 searches for all cards released up to Jan 1, 2013
  • d:runner|corp searches for all Runner or Corp cards
  • x:"the Corp loses 1 credit" returns Amina, Corporate "Grant", and Lamprey

Missing Features & Incompatibilities

  • Faction aliases (n, a, s, etc) are not supported yet
  • Rotation aliases (current, latest, standard, startup) are not supported yet. See format and snapshot operands.
  • Ban list aliases (active, latest) are not supported yet. See restriction operand.

Operands (including aliases and types)

This section goes into further detail on each operand.

Additional Cost (additional_cost) - boolean

Does the card text specify an additional cost to play?

Advanceable (advanceable) - boolean

Is the card advanceable?

Advancement Cost (advancement_cost, g) - integer

The advancement_cost value for an agenda. Accepts positive integers and X (case-insensitive).

Agenda Points (agenda_points, v) - integer

The printed number of agenda points for the agenda.

Attribution (attribution) - string

The designer of this card text, if specified.

Base Link (base_link, l) - integer

The printed link value for an Identity.

Card Cycle (card_cycle, c) - string

card_cycle_id for a printing.

Card Id (card_id) - string

card_id for a printing.

Card Pool (card_pool, z) - Array

Search for cards in specific card pools.

Card pools are similar to the rotation operand in the old syntax, and represent a collection of card cycles and sets.

This operand searches for cards in specific card pools. Using it will filter out all cards not in the specified pools.

Card Set (card_set, e) - string

card_set_id for printing.

Card Subtype (card_subtype, s) - array

text names for card subtypes, matched as lowercase.

Card Subtype Id (card_subtype_id) - array

card_subtype_ids for the card.

Card Type (card_type, t) - string

card_type_id of this card.

Cost (cost, o) - integer

The printed cost of a card. Accepts positive integers and X (case-insensitive).

Designed By (designed_by) - string

The organization that designed the card, either null_signal_games or fantasy_flight_games.

Eternal Points (eternal_points) - array

Concatenation of restriction_id and an Eternal Points value, joined by a hyphen, like eternal_points:eternal_points_list_22_09-2.

Faction (faction, f) - string

faction_id of this card.

Flavor (flavor, flavour, a) - string

The flavor text for a printing.

Format (format) - format

format_id to use the current active cardpool and banlist for a format or format_id-latest to use the latest version even if inactive.

Format ID (format_id) - array

format_id for any format containing the card at any time.

Gains Subroutines (gains_subroutines) - boolean

Does the card text allow for adding or gaining subroutines?

Has Global Penalty (has_global_penalty) - array

restriction_id restricting the card with a global penalty, like has_global_penalty:napd_mwl_1_1.

Illustrator (illustrator, i) - string

The printed version of the illustrator credits, with multiple illustrators separated by commas.

Illustrator Id (illustrator_id) - array

illustrator_id for an illustrator for the printing.

In Restriction (in_restriction) - boolean

Is the card specified on any Restriction list?

Influence Cost (influence_cost, n) - integer

The influence cost or number of influence pips for the card.

Interrupt (interrupt) - boolean

Does the card have an interrupt ability?

Is Banned (is_banned) - array

restriction_id specifying the card as banned, like is_banned:standard_ban_list_22_08.

Is Latest Printing (is_latest_printing) - boolean

Is this printing the latest printing for a card?

Is Restricted (is_restricted) - array

restriction_id specifying the card as banned, like is_restricted:standard_mwl_3_4_b.

Is Unique (is_unique, u) - boolean

Is the card unique?

Link Provided (link_provided) - integer

The amount of link provided.

Memory Usage (memory_usage, m) - integer

The memory (MU) cost of this card.

Minimum Deck Size (minimum_deck_size, min_deck_size) - integer

The minimum deck size required by an Identity.

Mu Provided (mu_provided) - integer

The amount of memory (MU) provided by the card.

Num Printed Subroutines (num_printed_subroutines) - integer

The number of printed subroutines on this card.

Num Printings (num_printings) - integer

Count of unique printings for this card.

On Encounter Effect (on_encounter_effect) - boolean

Does the card text specify an on encounter effect?

Performs Trace (performs_trace) - boolean

Does the card perform a trace?

Position (position) - integer

The position of the printing in a card set.

Printing Id (id)

Searching based on printing ID

This operand searches for cards based on their printing ID (##### value, like 01050). Note that some cards have multiple printings with different IDs.
  • id:01050 – retrieves Original Core Sure Gamble by id
  • id:34105|35041" – both See How They Run and Bumi 1.0 by printing id

Printings Released By (printings_released_by) - array

All organizations that have released printings for a card (null_signal_games or fantasy_flight_games).

Quantity (quantity, y) - integer

The number of copies of a printing in the set.

Recurring Credits Provided (recurring_credits_provided) - integer

The number of recurring credits provided by this card. Accepts integers or X.

Release Date (release_date, date_release, r) - date

The earliest release date (YYYY-MM-DD format) for a card.

Released By (released_by) - string

The organization that released the printing.

Restriction Id (restriction_id, b) - array

restriction_id specifying the card for any reason, like: restriction_id:eternal_points_list_22_09

Rez Effect (rez_effect) - boolean

Does the card have a rez effect?

Side (side, d) - string

side_id of the card.

Snapshot (snapshot) - array

snapshot_id of a snapshot containing a card.

Strength (strength, p) - integer

The strength of the card. Accepts integers or X.

Text (text, x) - string

The text of a card, stripped of all formatting symbols and marks.

Title (title, _) - string

The title of a card, stripped of all formatting symbols and marks.

Trash Ability (trash_ability) - boolean

Does the card provide a trash ability?

Trash Cost (trash_cost, h) - integer

The trash cost of this card.

Universal Faction Cost (universal_faction_cost) - array

Concatenation of restriction_id and a Universal Faction Cost value, joined by a hyphen, like universal_faction_cost:napd_mwl_1_2-3.