Documentation / Leagues
League seasons
GET /v1/leagues/{league_id}/seasonsEvery season of a league, newest first, with first and last game dates and the number of games.
GET
https://api.icehockeyapi.com/v1/leagues/{league_id}/seasonshttps://api.icehockeyapi.com/v1/leagues/lg_6t11wec7/seasons?per_page=3curl "https://api.icehockeyapi.com/v1/leagues/lg_6t11wec7/seasons?per_page=3" \ -H "X-API-Key: YOUR_KEY"
200 OKExample answer from the data, 12 Oct
{
"data": [
{
"id": "ss_0n4zhhna",
"league_id": "lg_6t11wec7",
"label": "2026-27",
"start_year": 2026,
"first_game_date": "2026-09-19",
"last_game_date": "2026-10-20",
"games": 216
},
{
"id": "ss_22q138a1",
"league_id": "lg_6t11wec7",
"label": "2025-26",
"start_year": 2025,
"first_game_date": "2025-09-20",
"last_game_date": "2026-06-14",
"games": 1528
},
{
"id": "ss_8rfxbg9h",
"league_id": "lg_6t11wec7",
"label": "2024-25",
"start_year": 2024,
"first_game_date": "2024-09-21",
"last_game_date": "2025-06-17",
"games": 1511
}
],
"meta": {
"count": 3,
"next_cursor": "eyJvIjozLCJuIjozfQ",
"page": 1,
"per_page": 3,
"total": 109,
"total_pages": 37,
"next_page": 2,
"prev_page": null,
"plan": "Complete"
}
}Run works once the API is live; the code above works now.
Parameters
| Name | In | Type | What it does |
|---|---|---|---|
league_id required | path | id | A league, from /v1/leagues. |
page | query | int | The page, from 1. |
per_page | query | int | Records a page, default 50, at most 200. |
cursor | query | string | meta.next_cursor from the previous answer. |
Returns
| Field | Type |
|---|---|
id | string |
league_id | string |
label | string |
start_year | int |
first_game_date | string |
last_game_date | string |
games | int |