Skip to content
datasportsAPI

LeaguesSeason

Documentation

/

Type to filter the docs by title or path.

LeaguesEndpoint 71 of 116

Season

GET

/v2/leagues/{id}/seasons/{seasonId}

Plan
All plans
Auth
Bearer dsa_live_…
Parameters
2 required · 0 optional
Returns
SeasonInfo

Key figures for a season — running totals such as goals, home and away wins, draws and cards — plus the teams new to the division, whether relegated into it from above or promoted from below.

Worth knowing

  • The statistic keys come from our data source and differ between sports.
  • hostCountries lists a tournament’s host nations as Country objects — CA, MX and US for the 2026 World Cup; eleven hosts for EURO 2020, with England as EN and Scotland as SX — and stays empty for a regular league season.
  • A season with no figures still answers 200, with empty statistics and lists; only an unknown id, or a season from another league, gets 404.

01Parameters

  • idpathRequired

    league id issued by DataSportsAPI, a positive integer

  • seasonIdpathRequired

    season id, as listed by /v2/leagues/{id}/seasons

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/{seasonId}"

03Response

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

data
SeasonInfo
meta
season
ObjectsSeasonInfo
Example response
{ "data": { "statistics": { "goals": 198, "homeTeamWins": 31, "awayTeamWins": 24, "draws": 15,
                            "yellowCards": 280, "redCards": 9, … },
    "newcomersUpperDivision": [],
    "newcomersLowerDivision": [ { "id": 4502, "name": "Leeds United", "code": "LEE", … }, … ],
    "newcomersOther": [],
    "hostCountries": [] },
  "meta": { "season": 200386 } }

04Errors

  • 404not_found

    seasonId does not belong to this league; the error message names the parameter, and /v2/leagues/{id}/seasons lists the valid ones

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code