> For the complete documentation index, see [llms.txt](https://docs.thesports.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thesports.com/help-center/football/bracket.md).

# Bracket

### API explanation

Use the [**Bracket**](/thesports-docs/advanced-data/bracket.md) API endpoint to display the knockout stage of a competition as a bracket chart.

The returned data has the following structure:

1. `brackets` represents the brackets in the competition.
2. `groups` represents the groups within each bracket.
3. `rounds` represents the stages within each group.
4. `match_ups` contains detailed match information for each stage.

### How to create a knockout bracket chart?

1. Use the `number` field in `rounds` to determine the order of the stages.
2. Use the `number` field in `match_ups` to arrange the matches on each side of the bracket. For example, matches numbered `1`, `2`, `3`, and `4` appear on one side, while matches numbered `5`, `6`, `7`, and `8` appear on the other side.

#### Example

Using the FIFA World Cup as an example:

1. `brackets`: There is one bracket named `Knockout Stage`.

   <figure><img src="/files/PHZLg3RnT7LCiKALHDhH" alt=""><figcaption></figcaption></figure>
2. `groups`: The bracket contains two groups.

   <figure><img src="/files/6PozRQheNjVKWlQAcCez" alt=""><figcaption></figcaption></figure>
3. `rounds`: Group `6ypq3nh514gmd7o` contains four stages, while group `pxwrxlh1v2eryk0` contains one stage.

   <figure><img src="/files/woR4dIZbt1kYxCVOnPAx" alt=""><figcaption></figcaption></figure>
4. `match_ups`: Round `dj2ryoh2welq1zp` contains eight matches.

   <figure><img src="/files/GswTd0rILU4AfI2Hlbyw" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thesports.com/help-center/football/bracket.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
