Naar de inhoud
GET /v1/random

A random card (accepts search filters)

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/hearthstone-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/hearthstone-api/v1/random" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/hearthstone-api/v1/random", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/hearthstone-api/v1/random");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/hearthstone-api/v1/random",
    headers={"x-oanor-key": "oanor_test_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "card": {
            "id": "FP1_017",
            "set": "Naxx",
            "cost": 2,
            "name": "Nerub'ar Weblord",
            "race": "Undead",
            "text": "Minions with Battlecry cost (2) more.",
            "type": "Minion",
            "armor": null,
            "elite": false,
            "image": "https://art.hearthstonejson.com/v1/render/latest/enUS/256x/FP1_017.png",
            "races": [
                "Undead"
            ],
            "artist": "Alex Horley Orlandelli",
            "attack": 1,
            "dbf_id": 1800,
            "flavor": "Weblords spend all day making giant trampoline parks.",
            "health": 4,
            "rarity": "Common",
            "mechanics": [
                "Aura"
            ],
            "card_class": "Neutral",
            "durability": null,
            "collectible": true
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:33.167Z",
        "request_id": "f3558ce8-f9f9-4cbc-9eec-2fbda026b543"
    },
    "status": "ok",
    "message": "Random card retrieved successfully",
    "success": true
}