/v1/game
Line score for a game
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/mlb-api/v1/game" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/mlb-api/v1/game", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/mlb-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/mlb-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": {
"away": {
"hits": 7,
"runs": 7,
"errors": 0,
"left_on_base": 10
},
"home": {
"hits": 8,
"runs": 6,
"errors": 2,
"left_on_base": 12
},
"inning": 9,
"status": "Bottom 9",
"game_pk": 775296,
"innings": [
{
"away": 0,
"home": 3,
"inning": 1
},
{
"away": 0,
"home": 1,
"inning": 2
},
{
"away": 0,
"home": 1,
"inning": 3
},
{
"away": 0,
"home": 0,
"inning": 4
},
{
"away": 5,
"home": 0,
"inning": 5
},
{
"away": 0,
"home": 1,
"inning": 6
},
{
"away": 0,
"home": 0,
"inning": 7
},
{
"away": 2,
"home": 0,
"inning": 8
},
{
"away": 0,
"home": 0,
"inning": 9
}
],
"inning_state": "Bottom",
"scheduled_innings": 9
},
"meta": {
"timestamp": "2026-06-01T00:04:11.816Z",
"request_id": "766fdbe8-3be6-47bd-b586-7aa97e816675"
},
"status": "ok",
"message": "Game retrieved",
"success": true
}