Skip to content
datasportsAPI

LeaguesSeasons

Documentation

/

Type to filter the docs by title or path.

LeaguesEndpoint 65 of 116

Seasons

GET

/v2/leagues/{id}/seasons

Plan
All plans
Auth
Bearer dsa_live_…
Parameters
1 required · 0 optional
Returns
Season[]

Lists the league’s seasons, most recent first. year is the label to display, while startYear / endYear hold the numeric years — identical when a season runs within one calendar year.

01Parameters

  • idpathRequired

    league id issued by DataSportsAPI, a positive integer

02Request

The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.

curl -H "Authorization: Bearer dsa_live_…" \
    "https://api.datasportsapi.com/v2/leagues/{id}/seasons"

03Response

The top-level keys of the JSON body. Each object links to its full shape in the data reference.

data
Season[]
meta
count
ObjectsSeason
Example response
{ "data": [ { "id": 200386, "name": "Premier League 26/27", "year": "26/27", "startYear": 2026, "endYear": 2027 }, … ],
  "meta": { "count": 34 } }

04Errors

  • 404no_data

    our data source keeps no season list for this league

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code