LeaguesEndpoint 73 of 116
Rounds
https://api.datasportsapi.com/
- 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
idpathRequiredleague id issued by DataSportsAPI, a positive integer
seasonqueryRequiredseason 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.
dataRoundsmeta- season
{ "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
- 404
not_foundthe season id does not belong to this league; the error message names the offending parameter, and /v2/leagues/{id}/seasons lists the valid ones
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code