Naar de inhoud
GET /v1/teams

The 30 MLB clubs

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

Voorbeeldrespons

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

{
    "data": {
        "count": 5,
        "teams": [
            {
                "id": 110,
                "abbr": "BAL",
                "club": "Orioles",
                "name": "Baltimore Orioles",
                "league": "AL",
                "division": "AL East",
                "location": "Baltimore"
            },
            {
                "id": 111,
                "abbr": "BOS",
                "club": "Red Sox",
                "name": "Boston Red Sox",
                "league": "AL",
                "division": "AL East",
                "location": "Boston"
            },
            {
                "id": 139,
                "abbr": "TB",
                "club": "Rays",
                "name": "Tampa Bay Rays",
                "league": "AL",
                "division": "AL East",
                "location": "Tampa Bay"
            },
            {
                "id": 141,
                "abbr": "TOR",
                "club": "Blue Jays",
                "name": "Toronto Blue Jays",
                "league": "AL",
                "division": "AL East",
                "location": "Toronto"
            },
            {
                "id": 147,
                "abbr": "NYY",
                "club": "Yankees",
                "name": "New York Yankees",
                "league": "AL",
                "division": "AL East",
                "location": "New York"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:10.530Z",
        "request_id": "413aa6b1-e0dd-42ce-aed8-10435f00f752"
    },
    "status": "ok",
    "message": "Teams retrieved",
    "success": true
}