Documentation / Leagues
League teams
GET /v1/leagues/{league_id}/teamsFree key and upPaged, 50 a page
Every team that has played in a league, most recent first, with its first and last season and games played.
GET
https://api.icehockeyapi.com/v1/leagues/{league_id}/teamshttps://api.icehockeyapi.com/v1/leagues/lg_6t11wec7/teams?per_page=3curl "https://api.icehockeyapi.com/v1/leagues/lg_6t11wec7/teams?per_page=3" \ -H "X-API-Key: YOUR_KEY"
200 OKExample answer from the data, 12 Oct
{
"data": [
{
"id": "tm_n4551jwr",
"name": "Anaheim Ducks",
"short_name": "ANA",
"country": "North America",
"first_season_start": 1993,
"last_season_start": 2026,
"games": 2843
},
{
"id": "tm_7vyb6jrq",
"name": "Boston Bruins",
"short_name": "BOS",
"country": "North America",
"first_season_start": 1924,
"last_season_start": 2026,
"games": 7912
},
{
"id": "tm_fyjh4knt",
"name": "Buffalo Sabres",
"short_name": "BUF",
"country": "North America",
"first_season_start": 1970,
"last_season_start": 2026,
"games": 4763
}
],
"meta": {
"count": 3,
"next_cursor": "eyJvIjozLCJuIjozfQ",
"page": 1,
"per_page": 3,
"total": 165,
"total_pages": 55,
"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 |
name | string |
short_name | string |
country | string |
first_season_start | int |
last_season_start | int |
games | int |