Skip to content
datasportsAPI

LeaguesRounds

Documentation

/

Type to filter the docs by title or path.

LeaguesEndpoint 73 of 116

Rounds

GET

/v2/leagues/{id}/rounds

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

Lists every round of a season and indicates which one is current.

Worth knowing

Round numbers are not unique across phases — a qualifying round 1 and a league-phase round 1 can coexist — so pass both slug and prefix of the round to /fixtures to hit the right one. Where our data source does not structure a competition in rounds (NBA / NHL regular seasons, individual tennis or MMA events), this list is empty even though fixtures may still have fixture.round set.

01Parameters

  • idpathRequired

    league id issued by DataSportsAPI, a positive integer

  • seasonqueryRequired

    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}/rounds?season=…"

03Response

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

data
Rounds
meta
season
ObjectsRounds
Example response
{ "data": { "current": { "number": 3, "name": null, "slug": null, "prefix": null },
    "rounds": [ { "number": 1, "name": "Qualification Round 1", "slug": "qualification-round-1", "prefix": null },
                { "number": 636, "name": "Playoff round", "slug": "playoff-round", "prefix": "Qualification" },
                { "number": 1, "name": null, "slug": null, "prefix": null }, … ] },
  "meta": { "season": 200390 } }

04Errors

  • 404not_found

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

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code