LeaguesEndpoint 80 of 116
Cup trees
https://api.datasportsapi.com/
- Plan
- All plans
- Auth
Bearer dsa_live_…- Parameters
- 2 required · 0 optional
- Returns
CupTree[]
Knockout brackets for a season, such as a cup’s knockout phase, a playoff tree or a tennis draw. Inside each bracket come rounds, then ties, then the two participants of a tie (team, seed, winner, score), then the DataSportsAPI fixture ids.
Worth knowing
- score is the tie result as our data source reports it — aggregate goals across both legs in football, series wins in basketball and ice hockey, sets in tennis — and penalties holds shoot-out goals.
- fromBlock gives the order of the previous-round tie the participant advanced from.
- A null team marks a placeholder slot (“winner of QF 1”), and matchCount 0 marks a bye.
- Load the individual matches with /v2/fixtures/{id}.
- Seasons without a knockout phase return an empty array.
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}/cup-trees?season=…"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataCupTree[]meta- season, count
{ "data": [ { "name": "CONMEBOL Libertadores 2026, Knockout stage", "currentRound": 3, "rounds": [ …,
{ "order": 3, "name": "Semifinals", "blocks": [
{ "order": 1, "finished": true, "inProgress": false, "startTime": "2026-10-16T00:30:00.000Z",
"matchCount": 2, "fixtureIds": [789, 790], "automaticProgression": false, "venue": null,
"home": { "team": { "id": 11, "name": "Estudiantes de La Plata", "slug": "estudiantes-de-la-plata", "shortName": "Estudiantes", "code": "ELP", "image": "…" },
"seed": null, "winner": true, "score": 0, "penalties": 3, "fromBlock": 1 },
"away": { "team": { "id": 12, "name": "Flamengo", … }, "seed": null, "winner": false, "score": 0, "penalties": 2, "fromBlock": 2 } }, … ] }, … ] } ],
"meta": { "season": 87760, "count": 1 } }04Errors
- 400
bad_requestseason is absent or invalid
- 403
history_not_in_planyour plan’s history window begins after this season ended
- 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