HearthstoneJSON

Documentation

Cards (cards.json, cards.collectible.json)

The cards.json file contains a list of card objects and includes every single card in the game. Note that in Hearthstone, everything is a card, even Heroes, Hero Powers and buffs (Enchantments).

cards.collectible.json is a restricted set which contains only collectible cards (cards which will show up in your collection and the base heroes). Please use this set if you do not need non-collectible cards in your app.

Example

Leeroy Jenkins

{
	"id": "EX1_116",
	"dbfId": 559,
	"name": "Leeroy Jenkins",
	"text": "<b>Charge</b>. <b>Battlecry:</b> Summon two 1/1 Whelps for your opponent.",
	"flavor": "At least he has Angry Chicken.",
	"artist": "Gabe from Penny Arcade",
	"attack": 6,
	"cardClass": "NEUTRAL",
	"collectible": true,
	"cost": 5,
	"elite": true,
	"faction": "ALLIANCE",
	"health": 2,
	"mechanics": [
		"BATTLECRY",
		"CHARGE"
	],
	"rarity": "LEGENDARY",
	"set": "EXPERT1",
	"type": "MINION"
}

Fields

A card is an array of attributes. With noted exceptions, fields are only shown if they do not evaluate to 0 or an empty string.

The id (String) field identifies the card uniquely. Use it! For more info, see Card IDs.

The following attributes are available as non-localized string representations of enums (as described in the Enums section below):

The following attributes are localized strings:

name, text (card text), flavor (flavor text), howToEarn (how to earn the card; eg. reward, craft), howToEarnGolden (how to earn the golden version of the card) and targetingArrowText (the text when targeting something with the card)

The following additional attributes are available:

Enums

Most values in Hearthstone are integer-based. Some of those integers are available as enumerations. The full list of Hearthstone enums is available in python-hearthstone - enums.py.

Tags and referenced tags

The mechanics attribute contains a sorted array of GameTag boolean enum string representations which are set on the card.

The following game tags are used in this field:

ADJACENT_BUFF, AI_MUST_PLAY, APPEAR_FUNCTIONALLY_DEAD, ADAPT, AURA, BATTLECRY, CANT_ATTACK, CANT_BE_TARGETED_BY_ABILITIES, CANT_BE_TARGETED_BY_HERO_POWERS, CHARGE, CHOOSE_ONE, COMBO, COUNTER, DEATHRATTLE, DISCOVER, DIVINE_SHIELD, ENRAGED, EVIL_GLOW, FORGETFUL, FREEZE, IMMUNE, INSPIRE, JADE_GOLEM, MORPH, POISONOUS, QUEST, RECEIVES_DOUBLE_SPELLDAMAGE_BONUS, RITUAL, SECRET, SILENCE, STEALTH, TAG_ONE_TURN_EFFECT, TAUNT, TOPDECK, UNTOUCHABLE, WINDFURY, ImmuneToSpellpower, InvisibleDeathrattle

Notes:

Play Requirements

The playRequirements attribute contains an array of key: param values which determine various requirements which have to be met for the card to be played and what it can target. The key corresponds to a PlayReq enum string representation. Most play requirements ignore the parameter, which is thus 0.

Some (not all) play requirements are documented in the old PlayErrors.xml.

Entourage

The entourage attributes contains a sorted array of card IDs which represent the card’s “entourage”. Entourage is often used for cards which can create new cards randomly from a specific pool, such as Animal Companion or Ysera.