/v1/random
A random opening
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
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_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"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
}