GETGet Card By Id
https://hearthstone.dataandapis.com/v1/cards/{slug}
Path parameters
| Parameter | Example | |
|---|---|---|
| slug | a-light-in-the-darkness | Required |
Example request
curl "https://hearthstone.dataandapis.com/v1/cards/a-light-in-the-darkness" \
-H "X-Api-Key: YOUR_API_KEY"// 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" });# 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")Example response{
"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,
…
Show full response
{
"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,
…{
"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"
}
}


