Hearthstone API logo
GamesMANTIDA5 tokens / chamada

Hearthstone API

Todas as cartas de Hearthstone a partir dos dados da Blizzard, com classe, expansão, custo, raridade, mecânicas e texto, atualizadas duas vezes por dia

Banco de dados de cartas de Hearthstone a partir dos dados de cartas da própria Blizzard, atualizado duas vezes por dia: busque cartas por nome, classe, expansão, tipo, raridade, custo e mecânicas, ou obtenha uma carta pelo slug com todo o texto e os atributos.

Toda chamada precisa do header X-Api-Key. Uma chave gratuita inclui 500 tokens por mês, sem cartão. 5 tokens por chamada, então o plano gratuito cobre cerca de 100 chamadas por mês.

Sem cartão de créditoAcesso a mais de 125 APIsCancele quando quiser
response.json
{
  "collectible": 1,
  "slug": "a-light-in-the-darkness",
  "artistName": "Zoltan Boros",
  "manaCost": 2,
  "name": "A Light in the Darkness",
  "text": "Discover a minion. Give it +1/+1.",
  "rarity": {
    "slug": "common",
    "craftingCost": [
      40,
      400
    ],
    "dustValue": [
      5,
      50
    ],
    "name": "Common"
  },
  "class": {
    "slug": "paladin",
    "name": "Paladin"
  },
  "type": {
    "slug": "spell",
    "name": "Spell"
  },
  "spellSchool": {
    "slug": "holy",
    "name": "Holy"
  },
  "cardSet": {
    "name": "Whispers of the Old Gods",
    "slug": "whispers-of-the-old-gods",
    "type": "expansion",
    "collectibleCount": 134
  },
  "keywords": [
    {
      "slug": "discover",
      "name": "Discover",
      "text": "Choose one of three cards to add to your hand."
    }
  ],
  "duels": {
    "relevant": true,
    "constructed": true
  },
  "hasImage": true,
  "hasCropImage": true
}

Also available on

Pronta para produção
Infraestrutura testada em produção, com SLA de 99,9% de disponibilidade. Os limites de requisições são generosos e as respostas são consistentes.
Integração simples
REST + JSON padrão. Funciona com qualquer cliente HTTP. Trechos de código prontos para copiar em 4 linguagens.
Uma chave, mais de 125 APIs
Sua assinatura do DataAndAPIs libera todas as APIs da plataforma — anime, finanças, esportes e mais.

Casos de uso da Hearthstone API

  • Crie um montador de decks com filtros por classe, custo de mana, raridade e expansão.

  • Exiba detalhes e arte das cartas em um site de estratégia, wiki ou overlay de stream.

  • Acompanhe novas expansões e mudanças de balanceamento conforme as cartas são adicionadas ou atualizadas.

  • Alimente o autocompletar de busca de cartas em um aplicativo complementar.

Endpoints da Hearthstone API

Todos os endpoints, com seus parâmetros e um exemplo real de resposta.

GETGet Card By Id

https://hearthstone.dataandapis.com/v1/cards/{slug}

Parâmetros de caminho

ParâmetroExemplo
sluga-light-in-the-darknessObrigatório

Exemplo de requisição

curl
curl "https://hearthstone.dataandapis.com/v1/cards/a-light-in-the-darkness" \
  -H "X-Api-Key: YOUR_API_KEY"
JavaScript / TypeScript (pacote dataandapis)
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const data = await client.hearthstone.getCardById({ slug: "a-light-in-the-darkness" });
Python (pacote dataandapis)
# pip install dataandapis
from dataandapis import DataAndApis

client = DataAndApis()  # reads DATAANDAPIS_API_KEY

data = client.hearthstone.get_card_by_id(slug="a-light-in-the-darkness")
Exemplo de resposta
{
  "collectible": 1,
  "slug": "a-light-in-the-darkness",
  "artistName": "Zoltan Boros",
  "manaCost": 2,
  "name": "A Light in the Darkness",
  "text": "<b>Discover</b> a minion. Give it +1/+1.",
  "flavorText": "Wait, how can you have a light in the dark? If you turn on a light while it’s dark, doesn’t that mean it’s no longer dark?",
  "duels": {
    "relevant": true,
    "constructed": true
  },
  "hasImage": true,
  "hasImageGold": false,
  "hasCropImage": true,
  "keywords": [
    {
      "slug": "discover",
      "name": "Discover",
      "refText": "Choose one of three cards to add to your hand.",
      "text": "Choose one of three cards to add to your hand.",
      "gameModes": []
    }
  ],
  "rarity": {
    "slug": "common",
    "craftingCost": [
      40,
…
Ver resposta completa
{
  "collectible": 1,
  "slug": "a-light-in-the-darkness",
  "artistName": "Zoltan Boros",
  "manaCost": 2,
  "name": "A Light in the Darkness",
  "text": "<b>Discover</b> a minion. Give it +1/+1.",
  "flavorText": "Wait, how can you have a light in the dark? If you turn on a light while it’s dark, doesn’t that mean it’s no longer dark?",
  "duels": {
    "relevant": true,
    "constructed": true
  },
  "hasImage": true,
  "hasImageGold": false,
  "hasCropImage": true,
  "keywords": [
    {
      "slug": "discover",
      "name": "Discover",
      "refText": "Choose one of three cards to add to your hand.",
      "text": "Choose one of three cards to add to your hand.",
      "gameModes": []
    }
  ],
  "rarity": {
    "slug": "common",
    "craftingCost": [
      40,
      400
    ],
    "dustValue": [
      5,
      50
    ],
    "name": "Common"
  },
  "class": {
    "slug": "paladin",
    "name": "Paladin"
  },
  "type": {
    "slug": "spell",
    "name": "Spell",
    "gameModes": []
  },
  "cardSet": {
    "name": "Whispers of the Old Gods",
    "slug": "whispers-of-the-old-gods",
    "type": "expansion",
    "collectibleCount": 134,
    "collectibleRevealedCount": 134,
    "nonCollectibleCount": 36,
    "nonCollectibleRevealedCount": 34
  },
  "spellSchool": {
    "slug": "holy",
    "name": "Holy"
  }
}

GETGet Cards

https://hearthstone.dataandapis.com/v1/cards

Parâmetros de consulta

ParâmetroExemplo
page1Opcional
pageSize1Opcional

Exemplo de requisição

curl
curl "https://hearthstone.dataandapis.com/v1/cards?page=1&pageSize=1" \
  -H "X-Api-Key: YOUR_API_KEY"
JavaScript / TypeScript (pacote dataandapis)
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const data = await client.hearthstone.getCards({ page: 1, pageSize: 1 });
Python (pacote dataandapis)
# pip install dataandapis
from dataandapis import DataAndApis

client = DataAndApis()  # reads DATAANDAPIS_API_KEY

data = client.hearthstone.get_cards(page=1, pageSize=1)
Exemplo de resposta
{
  "cards": [
    {
      "collectible": 1,
      "slug": "a-light-in-the-darkness",
      "artistName": "Zoltan Boros",
      "manaCost": 2,
      "name": "A Light in the Darkness",
      "text": "<b>Discover</b> a minion. Give it +1/+1.",
      "flavorText": "Wait, how can you have a light in the dark? If you turn on a light while it’s dark, doesn’t that mean it’s no longer dark?",
      "duels": {
        "relevant": true,
        "constructed": true
      },
      "hasImage": true,
      "hasImageGold": false,
      "hasCropImage": true,
      "keywords": [
        {
          "slug": "discover",
          "name": "Discover",
          "refText": "Choose one of three cards to add to your hand.",
          "text": "Choose one of three cards to add to your hand.",
          "gameModes": [
            {
              "slug": "constructed",
              "name": "Standard & Wild Formats"
            },
…
Ver resposta completa
{
  "cards": [
    {
      "collectible": 1,
      "slug": "a-light-in-the-darkness",
      "artistName": "Zoltan Boros",
      "manaCost": 2,
      "name": "A Light in the Darkness",
      "text": "<b>Discover</b> a minion. Give it +1/+1.",
      "flavorText": "Wait, how can you have a light in the dark? If you turn on a light while it’s dark, doesn’t that mean it’s no longer dark?",
      "duels": {
        "relevant": true,
        "constructed": true
      },
      "hasImage": true,
      "hasImageGold": false,
      "hasCropImage": true,
      "keywords": [
        {
          "slug": "discover",
          "name": "Discover",
          "refText": "Choose one of three cards to add to your hand.",
          "text": "Choose one of three cards to add to your hand.",
          "gameModes": [
            {
              "slug": "constructed",
              "name": "Standard & Wild Formats"
            },
            {
              "slug": "battlegrounds",
              "name": "Battlegrounds"
            },
            {
              "slug": "duels",
              "name": "Current Duels Cards"
            },
            {
              "slug": "standard",
              "name": "Standard"
            }
          ]
        }
      ],
      "rarity": {
        "slug": "common",
        "craftingCost": [
          40,
          400
        ],
        "dustValue": [
          5,
          50
        ],
        "name": "Common"
      },
      "class": {
        "slug": "paladin",
        "name": "Paladin"
      },
      "type": {
        "slug": "spell",
        "name": "Spell",
        "gameModes": [
          {
            "slug": "constructed",
            "name": "Standard & Wild Formats"
          },
          {
            "slug": "battlegrounds",
            "name": "Battlegrounds"
          },
          {
            "slug": "duels",
            "name": "Current Duels Cards"
          },
          {
            "slug": "standard",
            "name": "Standard"
          }
        ]
      },
      "cardSet": {
        "name": "Whispers of the Old Gods",
        "slug": "whispers-of-the-old-gods",
        "type": "expansion",
        "collectibleCount": 134,
        "collectibleRevealedCount": 134,
        "nonCollectibleCount": 36,
        "nonCollectibleRevealedCount": 34
      },
      "spellSchool": {
        "slug": "holy",
        "name": "Holy"
      }
    },
    {
      "collectible": 1,
      "slug": "a-new-challenger",
      "artistName": "James Ryman",
      "manaCost": 7,
      "name": "A New Challenger...",
      "text": "<b>Discover</b> a 6-Cost minion. Summon it with <b>Taunt</b> and <b>Divine Shield</b>.",
      "flavorText": "… Arrives? Approaches? TELL US ALREADY!",
      "hasImage": true,
      "hasImageGold": true,
      "hasCropImage": true,
      "keywords": [
        {
          "slug": "taunt",
          "name": "Taunt",
          "refText": "Enemies must attack minions that have Taunt.",
          "text": "Enemies must attack this minion.",
          "gameModes": [
            {
              "slug": "constructed",
              "name": "Standard & Wild Formats"
            },
            {
              "slug": "battlegrounds",
              "name": "Battlegrounds"
            },
            {
              "slug": "duels",
              "name": "Current Duels Cards"
            },
            {
              "slug": "standard",
              "name": "Standard"
            },
            {
              "slug": "mercenaries",
              "name": "Mercenaries"
            }
          ]
        },
        {
          "slug": "divine-shield",
          "name": "Divine Shield",
          "refText": "The first time a Shielded minion takes damage, ignore it.",
          "text": "The first time this minion takes damage, ignore it.",
          "gameModes": [
            {
              "slug": "constructed",
              "name": "Standard & Wild Formats"
            },
            {
              "slug": "battlegrounds",
              "name": "Battlegrounds"
            },
            {
              "slug": "duels",
              "name": "Current Duels Cards"
            },
            {
              "slug": "standard",
              "name": "Standard"
            }
          ]
        },
        {
          "slug": "discover",
          "name": "Discover",
          "refText": "Choose one of three cards to add to your hand.",
          "text": "Choose one of three cards to add to your hand.",
          "gameModes": []
        }
      ],
      "rarity": {
        "slug": "epic",
        "craftingCost": [
          400,
          1600
        ],
        "dustValue": [
          100,
          400
        ],
        "name": "Epic"
      },
      "class": {
        "slug": "paladin",
        "name": "Paladin"
      },
      "type": {
        "slug": "spell",
        "name": "Spell",
        "gameModes": []
      },
      "cardSet": {
        "name": "Rastakhan’s Rumble",
        "slug": "rastakhans-rumble",
        "type": "expansion",
        "collectibleCount": 135,
        "collectibleRevealedCount": 135,
        "nonCollectibleCount": 31,
        "nonCollectibleRevealedCount": 29
      },
      "spellSchool": null
    },
    {
      "collectible": 1,
      "slug": "aberrant-berserker",
      "artistName": "Jim Nelson",
      "health": 5,
      "attack": 3,
      "manaCost": 4,
      "name": "Aberrant Berserker",
      "text": "Has +2 Attack while damaged.",
      "flavorText": "I berserk, therefore I am.",
      "duels": {
        "relevant": true,
        "constructed": true
      },
      "hasImage": true,
      "hasImageGold": false,
      "hasCropImage": true,
      "keywords": [],
      "rarity": {
        "slug": "common",
        "craftingCost": [
          40,
          400
        ],
        "dustValue": [
          5,
          50
        ],
        "name": "Common"
      },
      "class": {
        "slug": "neutral",
        "name": "Neutral"
      },
      "type": {
        "slug": "minion",
        "name": "Minion",
        "gameModes": [
          {
            "slug": "constructed",
            "name": "Standard & Wild Formats"
          },
          {
            "slug": "battlegrounds",
            "name": "Battlegrounds"
          },
          {
            "slug": "duels",
            "name": "Current Duels Cards"
          },
          {
            "slug": "standard",
            "name": "Standard"
          },
          {
            "slug": "mercenaries",
            "name": "Mercenaries"
          }
        ]
      },
      "cardSet": {
        "name": "Whispers of the Old Gods",
        "slug": "whispers-of-the-old-gods",
        "type": "expansion",
        "collectibleCount": 134,
        "collectibleRevealedCount": 134,
        "nonCollectibleCount": 36,
        "nonCollectibleRevealedCount": 34
      },
      "spellSchool": null
    },
    {
      "collectible": 1,
      "slug": "abominable-bowman",
      "artistName": "L. Lullabi & K. Turovec",
      "health": 7,
      "attack": 6,
      "manaCost": 7,
      "name": "Abominable Bowman",
      "text": "<b>Deathrattle:</b> Summon a random friendly Beast that died this game.",
      "flavorText": "Frosty the Bowman... was an angry hateful soul... with a fresh hewn bow and a missing nose...",
      "hasImage": true,
      "hasImageGold": false,
      "hasCropImage": true,
      "keywords": [
        {
          "slug": "deathrattle",
          "name": "Deathrattle",
          "refText": "Does something when it dies.",
          "text": "Does something when it dies.",
          "gameModes": [
            {
              "slug": "constructed",
              "name": "Standard & Wild Formats"
            },
            {
              "slug": "battlegrounds",
              "name": "Battlegrounds"
            },
            {
              "slug": "duels",
              "name": "Current Duels Cards"
            },
            {
              "slug": "standard",
              "name": "Standard"
            },
            {
              "slug": "mercenaries",
              "name": "Mercenaries"
            }
          ]
        }
      ],
      "rarity": {
        "slug": "epic",
        "craftingCost": [
          400,
          1600
        ],
        "dustValue": [
          100,
          400
        ],
        "name": "Epic"
      },
      "class": {
        "slug": "hunter",
        "name": "Hunter"
      },
      "type": {
        "slug": "minion",
        "name": "Minion",
        "gameModes": []
      },
      "cardSet": {
        "name": "Knights of the Frozen Throne",
        "slug": "knights-of-the-frozen-throne",
        "type": "expansion",
        "collectibleCount": 135,
        "collectibleRevealedCount": 135,
        "nonCollectibleCount": 113,
        "nonCollectibleRevealedCount": 51
      },
      "spellSchool": null
    },
    {
      "collectible": 1,
      "slug": "abominable-lieutenant",
      "artistName": "Dave Allsop",
      "health": 5,
      "attack": 3,
      "manaCost": 8,
      "name": "Abominable Lieutenant",
      "text": "At the end of your turn, eat a random enemy minion and gain its stats.",
      "flavorText": "If you can't join 'em, eat 'em.",
      "hasImage": true,
      "hasImageGold": false,
      "hasCropImage": true,
      "keywords": [],
      "rarity": {
        "slug": "epic",
        "craftingCost": [
          400,
          1600
        ],
        "dustValue": [
          100,
          400
        ],
        "name": "Epic"
      },
      "class": {
        "slug": "neutral",
        "name": "Neutral"
      },
      "type": {
        "slug": "minion",
        "name": "Minion",
        "gameModes": []
      },
      "cardSet": {
        "name": "Fractured in Alterac Valley",
        "slug": "fractured-in-alterac-valley",
        "type": "expansion",
        "collectibleCount": 170,
        "collectibleRevealedCount": 170,
        "nonCollectibleCount": 373,
        "nonCollectibleRevealedCount": 70
      },
      "spellSchool": null
    }
  ],
  "cardCount": 4305,
  "pageCount": 861,
  "page": "1"
}

De onde vêm os dados

Fonte
Dados públicos de cartas de Hearthstone da Blizzard, carregados no banco de dados da API.
Atualização
Atualizado duas vezes por dia.

Uma instalação. Todos os endpoints.

Instale o pacote dataandapis pelo npm ou pelo PyPI e chame esta API com métodos tipados, ou use qualquer cliente HTTP na linguagem que preferir.

4linguagens
2endpoints
RESTarquitetura
1chave para todas as APIs
  • Parâmetros e respostas tipados, com autocompletar no seu editor
  • Para Node.js 18 ou superior e Python 3.9 ou superior, sem dependências
  • Uma chave funciona em mais de 125 APIs da plataforma

Ler o guia do pacote npm →Ler o guia do pacote Python →

// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const data = await client.hearthstone.getCardById({ slug: "a-light-in-the-darkness" });

Hearthstone API · X-Api-Key

Explore os endpoints

Veja os parâmetros de requisição e inspecione exemplos reais de resposta.

Endpoints disponíveis

Parâmetros da requisição

URL da API

Cabeçalhos

X-Api-Key

Parâmetros de caminho

slug
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis({ apiKey: "YOUR_API_KEY" });

const data = await client.hearthstone.getCardById({ slug: "a-light-in-the-darkness" });

Uma assinatura. Todas as APIs.

Os tokens liberam esta API e mais de 125 outras no DataAndAPIs. Troque de API quando quiser.

GRÁTIS

$0/mês

500 tokens / mês

  • Acesso a todas as APIs
  • Tokens renovados todo mês
  • Suporte da comunidade
Começar grátis
Mais popular

STARTER

$6.99/mês

25.000 tokens / mês

  • Acesso a todas as APIs
  • Tokens renovados todo mês
  • Suporte por e-mail
Assinar

PRO

$24.99/mês

100.000 tokens / mês

  • Acesso a todas as APIs
  • Tokens renovados todo mês
  • Suporte prioritário por e-mail
Assinar

ULTRA

$99.99/mês

1.000.000 tokens / mês

  • Acesso a todas as APIs
  • Tokens renovados todo mês
  • Suporte prioritário
Assinar

Precisa de mais volume, infraestrutura dedicada ou um contrato personalizado? Falar com vendas →

Perguntas sobre a Hearthstone API

Lance Hearthstone API ainda hoje à tarde.

500 tokens grátis. Sem cartão. E mais de 125 outras APIs com a mesma chave.