> For the complete documentation index, see [llms.txt](https://docs.matchplay.events/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.matchplay.events/games-api.md).

# Games API

## Get rounds

```http
GET /api/tournaments/{tournamentId}/rounds
```

Rounds are collections of games played at the same time. They are also used in pingolf tournaments to represent a golf hole.

## Get games

```http
GET /api/games
```

Games are multi-player games in direct play tournaments.

**Query params**

| Name                   | Description                                                                                                                                          |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `page` (integer)       | Which page of results to get                                                                                                                         |
| `tournaments` (string) | Comma-separated list of tournament ids to get games for. You must provide either `tournaments` or `series`. You may provide up to 25 tournament ids. |
| `series` (string)      | Comma-separated list of tournament ids to get games for. You must provide either `tournaments` or `series`. You may provide up to 5 series ids.      |
| `ids` (string)         | Comma-separated list of game ids to fetch. You may provide up to 50 game ids.                                                                        |
| `status` (string)      | Game status to filter on. Value may be `started` or `completed`                                                                                      |
| `round` (integer)      | Round id of round to filter on.                                                                                                                      |
| `player` (integer)     | Player id of player to filter on.                                                                                                                    |
| `arena` (integer)      | Arena id of arena to filter on.                                                                                                                      |
| `bank` (integer)       | Bank id of bank to filter on.                                                                                                                        |

## Get single player games

```http
GET /api/tournaments/{tournamentId}/single-player-games
```

Single player games are used in best game and pingolf tournaments.

**Query params**

| Name                 | Description                                                                   |
| -------------------- | ----------------------------------------------------------------------------- |
| `page` (integer)     | Which page of results to get                                                  |
| `limit` (integer)    | Number of games to get. Default is `25`, max is `500`.                        |
| `ids` (string)       | Comma-separated list of game ids to fetch. You may provide up to 50 game ids. |
| `status` (string)    | Game status to filter on. Value may be `pending`,  `started` or `completed`   |
| `bestGame` (boolean) | Whether to only fetch games that are marked as a "best game"                  |
| `voided` (boolean)   | Set to `true` to included voided games                                        |
| `round` (integer)    | Round id of round to filter on.                                               |
| `player` (integer)   | Player id of player to filter on.                                             |
| `arena` (integer)    | Arena id of arena to filter on.                                               |

## Get cards

```http
GET /api/tournaments/{tournamentId}/cards
```

Cards are used in card-based best game tournaments.

**Query params**

| Name                 | Description                                                                 |
| -------------------- | --------------------------------------------------------------------------- |
| `page` (integer)     | Which page of results to get                                                |
| `limit` (integer)    | Number of games to get. Default is `25`, max is `500`.                      |
| `status` (string)    | Game status to filter on. Value may be `pending`,  `started` or `completed` |
| `bestGame` (boolean) | Whether to only fetch games that are marked as a "best game"                |
| `voided` (boolean)   | Set to `true` to included voided games                                      |
| `player` (integer)   | Player id of player to filter on.                                           |


---

# 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:

```
GET https://docs.matchplay.events/games-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
