Skip to content
GET /v1/random

A random card (optional Scryfall filter)

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/mtg-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/mtg-api/v1/random" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/mtg-api/v1/random", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/mtg-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/mtg-api/v1/random",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "card": {
            "id": "a249b1f4-2b22-4b67-a207-e0c4ae95d2e1",
            "cmc": 0,
            "set": "iko",
            "name": "Ketria Triome",
            "image": "https://cards.scryfall.io/normal/front/a/2/a249b1f4-2b22-4b67-a207-e0c4ae95d2e1.jpg?1601241399",
            "power": null,
            "artist": "Sam Burley",
            "colors": [],
            "prices": {
                "eur": "13.05",
                "tix": "0.15",
                "usd": "17.56",
                "eur_foil": "13.73",
                "usd_foil": "18.35",
                "usd_etched": null
            },
            "rarity": "rare",
            "loyalty": null,
            "keywords": [
                "Cycling"
            ],
            "set_name": "Ikoria: Lair of Behemoths",
            "mana_cost": "",
            "toughness": null,
            "type_line": "Land — Forest Island Mountain",
            "legalities": {
                "tlr": "legal",
                "duel": "legal",
                "brawl": "legal",
                "penny": "not_legal",
                "predh": "not_legal",
                "future": "not_legal",
                "legacy": "legal",
                "modern": "legal",
                "pauper": "not_legal",
                "alchemy": "not_legal",
                "pioneer": "legal",
                "vintage": "legal",
                "historic": "legal",
                "standard": "not_legal",
                "timeless": "legal",
                "commander": "legal",
                "gladiator": "legal",
                "oldschool": "not_legal",
                "premodern": "not_legal",
                "oathbreaker": "legal",
                "standardbrawl": "not_legal",
                "paupercommander": "not_legal"
            },
            "oracle_text": "({T}: Add {G}, {U}, or {R}.) This land enters tapped. Cycling {3} ({3}, Discard this card: Draw a card.)",
            "released_at": "2020-04-24",
            "scryfall_uri": "https://scryfall.com/card/iko/250/ketria-triome?utm_source=api",
            "color_identity": [
                "G",
                "R",
                "U"
            ],
            "collector_number": "250"
        }
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:42.999Z",
        "request_id": "d14db751-f218-4e50-be9f-4724b46b30ef"
    },
    "status": "ok",
    "message": "Random card retrieved",
    "success": true
}