Aller au contenu
GET /v1/game

Score a game

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/tennis-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/tennis-api/v1/game" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/tennis-api/v1/game", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/tennis-api/v1/game");
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/tennis-api/v1/game",
    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": {
        "note": "Standard game: points run 0, 15, 30, 40, then game — but at 40-40 it is Deuce and a player must lead by two (Advantage, then game). Points after the game is won are ignored.",
        "score": "40-15",
        "inputs": {
            "points": [
                "a",
                "a",
                "b",
                "a",
                "a"
            ],
            "tiebreak": false
        },
        "winner": "a",
        "complete": true,
        "points_a": 4,
        "points_b": 1
    },
    "meta": {
        "timestamp": "2026-06-06T07:13:58.211Z",
        "request_id": "45792aa8-b1c1-4d57-9182-ced4f99b1c64"
    },
    "status": "ok",
    "message": "Game score",
    "success": true
}