{
  "name": "Spellforge Card Search",
  "description": "Public Magic: The Gathering card search on Spellforge. Use these URLs to fetch crawler-readable HTML search result snapshots without JavaScript.",
  "base_url": "https://spellforge.gg/search",
  "routing_note": "Use /search for public card database queries. Do not use /forge for card search queries; /forge is the interactive deck and binder workspace.",
  "result_page_size": 100,
  "result_pages": "Use page=1 for the canonical first page. Later pages are available with page=2, page=3, etc. Search snapshots include rel=prev and rel=next links when applicable.",
  "card_detail_url_template": "https://spellforge.gg/card/{card_id}",
  "result_card_detail_url_field": "Each crawler-readable search result includes card_detail_url. Follow that URL for the full card-detail page when the search result summary is not enough.",
  "query_template": "https://spellforge.gg/search?q={query}&colors={colors}&types={types}&formats={formats}&sets={sets}&rarities={rarities}&cmc={cmc}&sort={sort}&order={order}&page={page}",
  "public_parameters": [
    {
      "name": "q",
      "type": "string",
      "description": "Free text card search. Searches card names and rules text.",
      "example": "draw a card"
    },
    {
      "name": "colors",
      "type": "comma-separated string",
      "values": ["W", "U", "B", "R", "G", "C"],
      "description": "Color filter.",
      "example": "U,R"
    },
    {
      "name": "colorsExact",
      "type": "comma-separated string",
      "values": ["W", "U", "B", "R", "G", "C"],
      "description": "Exact color identity filter.",
      "example": "B,R,G"
    },
    {
      "name": "types",
      "type": "comma-separated string",
      "values": ["artifact", "battle", "creature", "enchantment", "instant", "land", "planeswalker", "sorcery"],
      "description": "Card type filters.",
      "example": "instant,sorcery"
    },
    {
      "name": "formats",
      "type": "comma-separated string",
      "values": ["commander", "standard", "modern", "pioneer", "legacy", "vintage", "pauper"],
      "description": "Legality filters.",
      "example": "commander"
    },
    {
      "name": "sets",
      "type": "comma-separated string",
      "description": "Magic set codes.",
      "example": "mh3,otj"
    },
    {
      "name": "rarities",
      "type": "comma-separated string",
      "values": ["common", "uncommon", "rare", "mythic"],
      "description": "Card rarity filters.",
      "example": "rare,mythic"
    },
    {
      "name": "cmc",
      "type": "comma-separated integer string",
      "description": "Mana value filters.",
      "example": "1,2,3"
    },
    {
      "name": "sort",
      "type": "string",
      "values": ["name", "released_at", "edhrec_rank", "cmc", "rarity", "type", "usd"],
      "description": "Sort field.",
      "example": "edhrec_rank"
    },
    {
      "name": "order",
      "type": "string",
      "values": ["asc", "desc"],
      "description": "Sort direction.",
      "example": "asc"
    },
    {
      "name": "page",
      "type": "integer",
      "description": "One-based result page.",
      "example": "2"
    }
  ],
  "examples": [
    {
      "label": "Blue cards that draw cards",
      "url": "https://spellforge.gg/search?q=draw%20a%20card&colors=U"
    },
    {
      "label": "Colorless Eldrazi cards for Commander",
      "url": "https://spellforge.gg/search?q=eldrazi&colors=C&formats=commander"
    },
    {
      "label": "Commander instants and sorceries that counter spells",
      "url": "https://spellforge.gg/search?q=counter%20target%20spell&colors=U&types=instant,sorcery&formats=commander"
    },
    {
      "label": "Recent mythic cards from MH3 and OTJ",
      "url": "https://spellforge.gg/search?sets=mh3,otj&rarities=mythic&sort=released_at&order=desc"
    }
  ],
  "privacy": {
    "global_search": "Public and indexable.",
    "private_or_player_scoped_search": "Do not index my=1, owner-scoped, collection-scoped, or wishlist-scoped searches."
  }
}
