Author Topic: Card Search Page and API  (Read 3139 times)


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1111
  • Selina is my Superstar
    • View Profile
    • Amuseum
Card Search Page and API
« on: October 30, 2010, 10:15:50 AM »
CCG Card Search
The following fields do exact match: mana cost, cmc, power, toughness, loyalty
Color is inclusive (will find gold cards).
The rule field accepts these wildcards:
Percentage (%) wildcard allows you to match any string of zero or more characters.
Underscore (_) allows you to match any single character.
Hover over keywords to display its rules in this box.

Fields are cardname, color, cost, cmc, supertype, cardtype, subtype, rule, power, toughness, loyalty.
Entire cards are returned as array of JSON objects, except cardname and cardtype are returned as name and type, respectively. (see ccgsearch.js for example of how to extract these objects)

Can retrieve rules using 'keyword' field.
Returns as array of one JSON object with fields keyword and rule.
Code: [Select]
to extract:
keyword = data[0].keyword;
rule = data[0].rule;

All sets up to Innistrad
Double-face cards handled like split and flip cards
Minor changes to rules formatting (ie. some abilities may be split e.g. protection from two colors become two abilities)
New keywords fight and transform

Added exact card search.
Escape special characters.

Mirrodin Besieged and New Phyrexian cards
Both halves of split card and flip card searchable by name. Reminder text will tell you the other half: (See also xxxx.) Retrieved field is multi which returns the name of the other half.
Flavor text now included in setinfo.

The fields name, supertype, type, subtype, and rules search patterned words in any order

search by rarity and artist
return set info

search by color and cmc

added Mirrodin Besieged cards
new keywords battle cry and living weapon

added instructions
wildcards for rules field

keyword links (mouseover or click)
keyword rules box

autocard links
« Last Edit: October 13, 2011, 08:39:33 AM by Den »
Support me on Patreon

I saw. I conquered. I came.