Get Leagues
Retrieve the leagues and cups you can query, with their country, type and current season. Use the IDs as league_id on every other football endpoint.
GET/v1/football/leagues
Parameters
NameTypeRequiredDescription
x-api-keystringRequiredYour API key, sent as a header.
idintegerOptionalFilter by league ID.
countrystringOptionalFilter by country name, e.g. England.
typestringOptionalleague or cup.
searchstringOptionalSearch by league name (3+ characters).
pageintegerOptionalPage number. Default 1, 50 per page.
Response
- dataarray<League>Leagues matching your filters.
- idintegerUnique league ID.
- namestringLeague name.
- typestringleague or cup.
- countryobjectCountry name and code.
- current_seasonintegerStart year of the current season.
- metaobjectpage, per_page and total.
Status codes
- 200Leagues returned
- 400Invalid parameter
- 401Missing or invalid API key
- 429Rate limit reached