Naar de inhoud
GET /v1/schedule

Games & scores on a date

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/mlb-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "date": "2025-07-04",
        "count": 1,
        "games": [
            {
                "away": {
                    "id": 147,
                    "abbr": "NYY",
                    "name": "New York Yankees",
                    "score": 5,
                    "record": "48-40"
                },
                "home": {
                    "id": 121,
                    "abbr": "NYM",
                    "name": "New York Mets",
                    "score": 6,
                    "record": "51-38"
                },
                "venue": "Citi Field",
                "status": "Final",
                "game_pk": 777250,
                "date_time": "2025-07-04T19:10:00Z"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:11.192Z",
        "request_id": "2d437385-c7e4-4495-8a6d-52a7f5ab483e"
    },
    "status": "ok",
    "message": "Schedule retrieved",
    "success": true
}