page The page of data to request pageSize The amount of data to return in a single request. (when used, legality defaults to Legal unless supplied) legality The legality of the card for a given format, such as Legal, Banned or Restricted. Use this parameter along with the name parameter when searching by foreignName gameFormat The game format, such as Commander, Standard, Legacy, etc. language The language the card is printed in. This is a string, not an integer, because some cards have toughness like: “1+*” loyalty The loyalty of the card. This is a string, not an integer, because some cards have powers like: “1+*” toughness The toughness of the card. This is a string, not an integer, because some cards have letters in their numbers. This is printed at the bottom-center of the card in small text. This may not match what is on the card as MTGJSON corrects many card misprints. May contain mana symbols and other symbols. Examples: Common, Uncommon, Rare, Mythic Rare, Special, Basic Land set The set the card belongs to (set code). Example values: Trap, Arcane, Equipment, Aura, Human, Rat, Squirrel, etc. These appear to the right of the dash in a card type. Example values: Instant, Sorcery, Artifact, Creature, Enchantment, Land, Planeswalker subtypes The subtypes of the card. These appear to the left of the dash in a card type. Example values: Basic, Legendary, Snow, World, Ongoing types The types of the card. These appear to the far left of the card type. Note: The dash is a UTF8 ‘long dash’ as per the MTG rules supertypes The supertypes of the card. This is the type you would see on the card if printed today. A card’s color identity includes colors from the card’s rules text. colorIdentity The card’s color identity, by color code. Usually this is derived from the casting cost, but some cards are special (like the back of dual sided cards and Ghostfire). Possible values: normal, split, flip, double-faced, token, plane, scheme, phenomenon, leveler, vanguard, aftermath cmc Converted mana cost. Basically each ‘sub-card’ has its own record. For split, double-faced and flip cards, just the name of one side of the card. More examples: colors=red,white,blue versus colors=red|white|blue Parameters name The card name. The comma can only be used with fields that accept multiple values (like colors).Įxample: name=nissa, worldwaker|jace|ajani, caller The pipe represents a logical “or”, and a comma represents a logical “and”. The accepted delimiters when querying fields are the pipe character or a comma character.
Fields that can have multiple values such as colors, supertypes, and subtypes can use a logical “and” or a logical “or” operator. By default, fields that have a singular value such as rarity, set, and name will always use a logical “or” operator when querying with a list of values. Paginate the response using the page parameter.Įach field below can be used as a query parameter. This call will return a maximum of 100 cards HTTP / 1.1 200 Ok Link : rel="last", rel="next" Page-Size : 100 Count : 100 Total-Count : 31090 Ratelimit-Limit : 5000 Ratelimit-Remaining : 4999 Rate limiting also helps third-party developers by encouraging them to build their integrations to make economical use of API requests. Since each request made to the API incurs a computational cost, it’s in the best interest of both Magic: The Gathering API and its developer partners that these costs be minimized to the greatest degree possible. As this API continues to age, the rate limits may be updated to provide better performance to users RationaleĪs previously mentioned, the primary goal is to provide a responsive interface for developers and users to use when accessing the MTG data. Third-party applications are currently throttled to 5000 requests per hour. This document is an overview of the rate limits themselves, as well as how they are enforced and best practices for handling the errors returned when a rate limit is reached. Rate limits are enforced for all third-party applications and services.
Mtg card image gallery khans how to#
To see how to install and use them, refer to the links below: There are multiple developer SDKs available. To chat with other developers and discuss the API and SDKs, check out the Discord Server! There are multiple SDKs available to make it even easier to consume the API. To use the API endpoints, the format is as follows: All API access is performed over HTTPS and accessed from the domain. Welcome to the Magic: The Gathering API! You can use the API to access Magic: The Gathering API endpoints, which can get information on cards and sets.