---
title: "SofaScore competition knockout tree"
method: GET
path: "/sofascore/tournament-cuptree"
tags: ["SofaScore"]
---

# SofaScore competition knockout tree

`GET /sofascore/tournament-cuptree`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/sofascore/tournament-cuptree`
- Auth: API key in header `x-api-key`

Returns the knockout tree(s) of a cup or playoff competition season: every round with its ties, each tie's participants (team or player, seed, winner flag, the earlier tie it advanced from), result and score strings (a shoot-out is appended, such as `1 (4)`), match ids and start time, plus the final and third-place tie. Tennis competitions return two trees (main draw and qualifying). League seasons have no tree and answer 404, as does a season id that does not belong to the competition. Get `id` from search or tournaments-with-feature and `season` from tournament-seasons; pass the returned `event_ids` to the event endpoints.

## Query parameters

- `id` string, required
- `season` string, required

## Headers

- `x-api-key` string, required

## Response `200`

OK

- SofascoreTournamentCupTreeResponseDoc
  - `code` integer
  - `data` SofascoreTournamentCupTreeResponse
    - `count` integer
    - `fetched_at` string
    - `season_id` integer
    - `source_url` string
    - `tournament_id` integer
    - `trees` SofascoreCupTree[]
      - `current_round` integer
      - `final_match` SofascoreCupTreeBlock
        - `away_score` string
        - `block_id` integer: BlockID is the identifier later blocks cite as source_block_id.
        - `event_ids` integer[]: EventIDs are the match ids of the tie; fetch each with the event endpoint.
        - `finished` boolean
        - `home_score` string: HomeScore and AwayScore are the scores of the participants with order 1 and 2. They are strings because a shoot-out is appended ("1 (4)").
        - `id` integer
        - `in_progress` boolean: InProgress is true while a match of the tie is being played.
        - `matches` integer: Matches is the scheduled length of the tie: 1 for a single match, 2 for a two-legged tie, 7 for a best-of-seven series (whether or not all seven were needed), 0 for a bye.
        - `order` integer
        - `participants` SofascoreCupTreeParticipant[]
          - `order` integer: Order is the side's position in the block; the block's home_score belongs to order 1 and away_score to order 2.
          - `seed` string: Seed is the draw seed or entry label ("1", "WC" for a wild card), when published.
          - `source_block_id` integer: SourceBlockID is the block_id of the earlier block this side advanced from.
          - `team` SofascoreTeamRef
            - `country` string: Country the team belongs to.
            - `id` integer: SofaScore team id. Use it with the team endpoints.
            - `name` string: Full team name.
            - `national` boolean: True for a national team.
            - `short_name` string: Shortened team name.
            - `slug` string: URL slug of the team on SofaScore.
          - `winner` boolean
        - `result` string: Result is the tie result as published ("4:5", or a text such as "Retired").
        - `series_start_time` string
        - `series_start_timestamp` integer
        - `venue` SofascoreVenue
          - `capacity` integer: Venue capacity.
          - `city` string: City the venue is in.
          - `country` string: Country the venue is in.
          - `name` string: Venue name.
      - `id` integer
      - `name` string
      - `rounds` SofascoreCupTreeRound[]
        - `blocks` SofascoreCupTreeBlock[]
          - `away_score` string
          - `block_id` integer: BlockID is the identifier later blocks cite as source_block_id.
          - `event_ids` integer[]: EventIDs are the match ids of the tie; fetch each with the event endpoint.
          - `finished` boolean
          - `home_score` string: HomeScore and AwayScore are the scores of the participants with order 1 and 2. They are strings because a shoot-out is appended ("1 (4)").
          - `id` integer
          - `in_progress` boolean: InProgress is true while a match of the tie is being played.
          - `matches` integer: Matches is the scheduled length of the tie: 1 for a single match, 2 for a two-legged tie, 7 for a best-of-seven series (whether or not all seven were needed), 0 for a bye.
          - `order` integer
          - `participants` SofascoreCupTreeParticipant[]
            - `order` integer: Order is the side's position in the block; the block's home_score belongs to order 1 and away_score to order 2.
            - `seed` string: Seed is the draw seed or entry label ("1", "WC" for a wild card), when published.
            - `source_block_id` integer: SourceBlockID is the block_id of the earlier block this side advanced from.
            - `team` SofascoreTeamRef
              - …
            - `winner` boolean
          - `result` string: Result is the tie result as published ("4:5", or a text such as "Retired").
          - `series_start_time` string
          - `series_start_timestamp` integer
          - `venue` SofascoreVenue
            - `capacity` integer: Venue capacity.
            - `city` string: City the venue is in.
            - `country` string: Country the venue is in.
            - `name` string: Venue name.
        - `description` string
        - `id` integer
        - `order` integer
        - `round_type` integer: RoundType is the upstream round code: the number of ties for the standard knockout rounds (8 round of 16, 4 quarterfinals, 2 semifinals, 1 final) and other codes (0, 101 to 105, 201 to 202) for named rounds.
      - `third_place_match` SofascoreCupTreeBlock
        - `away_score` string
        - `block_id` integer: BlockID is the identifier later blocks cite as source_block_id.
        - `event_ids` integer[]: EventIDs are the match ids of the tie; fetch each with the event endpoint.
        - `finished` boolean
        - `home_score` string: HomeScore and AwayScore are the scores of the participants with order 1 and 2. They are strings because a shoot-out is appended ("1 (4)").
        - `id` integer
        - `in_progress` boolean: InProgress is true while a match of the tie is being played.
        - `matches` integer: Matches is the scheduled length of the tie: 1 for a single match, 2 for a two-legged tie, 7 for a best-of-seven series (whether or not all seven were needed), 0 for a bye.
        - `order` integer
        - `participants` SofascoreCupTreeParticipant[]
          - `order` integer: Order is the side's position in the block; the block's home_score belongs to order 1 and away_score to order 2.
          - `seed` string: Seed is the draw seed or entry label ("1", "WC" for a wild card), when published.
          - `source_block_id` integer: SourceBlockID is the block_id of the earlier block this side advanced from.
          - `team` SofascoreTeamRef
            - `country` string: Country the team belongs to.
            - `id` integer: SofaScore team id. Use it with the team endpoints.
            - `name` string: Full team name.
            - `national` boolean: True for a national team.
            - `short_name` string: Shortened team name.
            - `slug` string: URL slug of the team on SofaScore.
          - `winner` boolean
        - `result` string: Result is the tie result as published ("4:5", or a text such as "Retired").
        - `series_start_time` string
        - `series_start_timestamp` integer
        - `venue` SofascoreVenue
          - `capacity` integer: Venue capacity.
          - `city` string: City the venue is in.
          - `country` string: Country the venue is in.
          - `name` string: Venue name.
      - `tournament_name` string
  - `msg` string

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too Many Requests
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
