Documentation / Leagues
List leagues
GET /v1/leaguesEvery league and competition, with country, level, age group and gender.
GET
https://api.icehockeyapi.com/v1/leagueshttps://api.icehockeyapi.com/v1/leagues?per_page=3curl "https://api.icehockeyapi.com/v1/leagues?per_page=3" \ -H "X-API-Key: YOUR_KEY"
200 OKExample answer from the data, 12 Oct
{
"data": [
{
"id": "lg_j19r6ymm",
"name": "2. Liga",
"country": "Czech Republic",
"level": null,
"age_group": "senior",
"gender": "men",
"kind": "league"
},
{
"id": "lg_hqme005w",
"name": "2. Liga",
"country": "Slovakia",
"level": null,
"age_group": "senior",
"gender": "men",
"kind": "league"
},
{
"id": "lg_kqera1j9",
"name": "2. Liga - East",
"country": "Czech Republic",
"level": null,
"age_group": "senior",
"gender": "men",
"kind": "league"
}
],
"meta": {
"count": 3,
"next_cursor": "eyJvIjozLCJuIjozfQ",
"page": 1,
"per_page": 3,
"total": 1275,
"total_pages": 425,
"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 |
|---|---|---|---|
country | query | string | Country name, as the leagues list shows it |
kind | query | enum | The kind of competition. leaguecupfriendlyinternational |
gender | query | enum | Men's or women's. menwomen |
age | query | enum | The age group. seniorjunior |
q | query | string | Part of the league name |
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 |
country | string |
level | null |
age_group | string |
gender | string |
kind | string |