# Enriching your response

The flexibility of our API is in the part where you build your own responses by adding include parameters to your request. On [every endpoin](https://cricket-postman.sportmonks.com/)t you can find information on what data can be included and how deep you can add includes. To best describe how to use includes and what the include limit means, we will give an explanation based on some example calls.

### Adding team information

Useful information for every game is home and away team information. How else would you know between which two teams the game is being played? Here we start with the interesting part, including team information.

```javascript
https://cricket.sportmonks.com/api/v1/livescores?api_token=__TOKEN__&include=localteam,visitorteam
```

{% hint style="info" %}
Note that we have extended our request with `&include=localteam,visitorteam`. This results in information about the home and away team. You will retrieve a full team object related to the response which includes the name, logo url and much more information.
{% endhint %}

### Adding Runs and Scoreboards

What is a game without the progression? Important information for your application to show could be bowling and batting information, lineup or runs. You can use these includes: `localteam,visitorteam,lineup,runs,bowlings,battings`

```javascript
https://cricket.sportmonks.com/api/v1/livescores?api_token=__TOKEN__&include=localteam,visitorteam,lineup,runs,bowlings,battings
```

With the current URL we have no clue to which scoreboard the player relates to. It only shows the `player_id`, not the actual name.

#### Adding nested includes <a href="#adding-nested-includes" id="adding-nested-includes"></a>

Luckily the flexibility of the API goes a step further with nested includes. Nested includes are basically relations on relations for the base endpoint. We can enrich the runs, battings etc. with actual player information showing all details of the player who was responsible for the score.

```
https://cricket.sportmonks.com/api/v1/livescores/now?api_token=__TOKEN__&include=localteam,visitorteam,lineup.player,runs.team,bowlings.team,battings.team
```

Note we have added the `.player` to the lineup include? Or `.teams` to `runs`, `battings` and `bowlings`?

{% hint style="info" %}
You can add as many nested includes as described in the [documentation section](https://cricket-postman.sportmonks.com/) of the endpoint it self.
{% endhint %}


---

# Agent Instructions: 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.sportmonks.com/v2/cricket-api/getting-started/enriching-your-response.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.
