Zum Inhalt springen
GET /v1/random

A random opening

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/chessopenings-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "opening": {
            "eco": "E36",
            "pgn": "1. d4 Nf6 2. c4 e6 3. Nc3 Bb4 4. Qc2 d5 5. a3 Bxc3+ 6. Qxc3 Ne4",
            "ply": 12,
            "name": "Nimzo-Indian Defense: Classical Variation, Noa Variation, Main Line",
            "moves": [
                "d4",
                "Nf6",
                "c4",
                "e6",
                "Nc3",
                "Bb4",
                "Qc2",
                "d5",
                "a3",
                "Bxc3+",
                "Qxc3",
                "Ne4"
            ],
            "family": "Nimzo-Indian Defense",
            "volume": "E",
            "variation": "Classical Variation, Noa Variation, Main Line"
        }
    },
    "meta": {
        "timestamp": "2026-05-31T09:34:54.986Z",
        "request_id": "83348a25-604e-42a4-b5f1-b8383f8d219c"
    },
    "status": "ok",
    "message": "Random opening",
    "success": true
}