# Team statistics

It’s possible to request statistics per team. This could be really interesting if you want to build a [**football application**](https://sportmonks.com/football-api/) showing all the statistics of your favorite team. Requesting team statistics is easy!&#x20;

Simply, use the [**team by id endpoint**](https://football-postman.sportmonks.com/#4582352f-7018-42ce-9baf-b6d5f8667bc0) and once again use the include `stats`. For this example, we’ll request the team statistics of Real Madrid **(team id: 3468)**:

```javascript
https://soccer.sportmonks.com/api/v2.0/teams/3468?api_token={API_TOKEN}&include=stats
```

Be aware that this request will give you **all** the team statistics of the seasons the team has played or is active in. Therefore, it might be useful to add a [**filter**](/v2/tutorials/filtering-limiting-and-sorting/filtering.md) to only request the team statistics of the season you’re interested in.&#x20;

For example, the request below will return all the team statistics of Real Madrid, but only for the **Spanish** **La Liga** **2019/2020** season **(season id: 16326).**

{% tabs %}
{% tab title="Request" %}

```javascript
https://soccer.sportmonks.com/api/v2.0/teams/3468?api_token={API_TOKEN}&include=stats&seasons=16326
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
    "data": {
        "id": 3468,
        "legacy_id": 117,
        "name": "Real Madrid",
        "short_code": "RMA",
        "twitter": "@realmadrid",
        "country_id": 32,
        "national_team": false,
        "founded": 1902,
        "logo_path": "https://cdn.sportmonks.com/images//soccer/teams/12/3468.png",
        "venue_id": 2020,
        "current_season_id": 17480,
        "is_placeholder": false,
        "stats": {
            "data": [
                {
                    "team_id": 3468,
                    "season_id": 16326,
                    "stage_id": 77444988,
                    "win": {
                        "total": 26,
                        "home": 15,
                        "away": 11
                    },
                    "draw": {
                        "total": 9,
                        "home": 4,
                        "away": 5
                    },
                    "lost": {
                        "total": 3,
                        "home": 0,
                        "away": 3
                    },
                    "goals_for": {
                        "total": 70,
                        "home": 40,
                        "away": 30
                    },
                    "goals_against": {
                        "total": 25,
                        "home": 11,
                        "away": 14
                    },
                    "clean_sheet": {
                        "total": 19,
                        "home": 11,
                        "away": 8
                    },
                    "failed_to_score": {
                        "total": 6,
                        "home": 2,
                        "away": 4
                    },
                    "scoring_minutes": [
                        {
                            "period": [
                                {
                                    "minute": "0-15",
                                    "count": 8,
                                    "percentage": 11.4
                                },
                                {
                                    "minute": "15-30",
                                    "count": 9,
                                    "percentage": 12.9
                                },
                                {
                                    "minute": "30-45",
                                    "count": 13,
                                    "percentage": 18.6
                                },
                                {
                                    "minute": "45-60",
                                    "count": 10,
                                    "percentage": 14.3
                                },
                                {
                                    "minute": "60-75",
                                    "count": 15,
                                    "percentage": 21.4
                                },
                                {
                                    "minute": "75-90",
                                    "count": 15,
                                    "percentage": 21.4
                                }
                            ]
                        }
                    ],
                    "goals_conceded_minutes": [
                        {
                            "period": [
                                {
                                    "minute": "0-15",
                                    "count": 5,
                                    "percentage": 20
                                },
                                {
                                    "minute": "15-30",
                                    "count": 0,
                                    "percentage": 0
                                },
                                {
                                    "minute": "30-45",
                                    "count": 2,
                                    "percentage": 8
                                },
                                {
                                    "minute": "45-60",
                                    "count": 3,
                                    "percentage": 12
                                },
                                {
                                    "minute": "60-75",
                                    "count": 5,
                                    "percentage": 20
                                },
                                {
                                    "minute": "75-90",
                                    "count": 10,
                                    "percentage": 40
                                }
                            ]
                        }
                    ],
                    "avg_goals_per_game_scored": {
                        "total": 1.84,
                        "home": 2.11,
                        "away": 1.58
                    },
                    "avg_goals_per_game_conceded": {
                        "total": 0.66,
                        "home": 0.58,
                        "away": 0.74
                    },
                    "avg_first_goal_scored": {
                        "total": "42m",
                        "home": "39m",
                        "away": "45m"
                    },
                    "avg_first_goal_conceded": {
                        "total": "52m",
                        "home": "51m",
                        "away": "53m"
                    },
                    "attacks": 4557,
                    "dangerous_attacks": 2466,
                    "avg_ball_possession_percentage": "59.00",
                    "fouls": 476,
                    "avg_fouls_per_game": "12.53",
                    "offsides": 84,
                    "redcards": 4,
                    "yellowcards": 82,
                    "shots_blocked": 19,
                    "shots_off_target": 335,
                    "avg_shots_off_target_per_game": "8.82",
                    "shots_on_target": 229,
                    "avg_shots_on_target_per_game": "6.03",
                    "avg_corners": "5.05",
                    "total_corners": 192,
                    "btts": 44.74,
                    "goal_line": {
                        "over": {
                            "0_5": {
                                "home": 89.47,
                                "away": 89.47
                            },
                            "1_5": {
                                "home": 78.95,
                                "away": 57.89
                            },
                            "2_5": {
                                "home": 47.37,
                                "away": 52.63
                            },
                            "3_5": {
                                "home": 31.58,
                                "away": 26.32
                            },
                            "4_5": {
                                "home": 15.79,
                                "away": 5.26
                            },
                            "5_5": {
                                "home": 5.26,
                                "away": 0
                            }
                        },
                        "under": {
                            "0_5": {
                                "home": 10.53,
                                "away": 10.53
                            },
                            "1_5": {
                                "home": 21.05,
                                "away": 42.11
                            },
                            "2_5": {
                                "home": 52.63,
                                "away": 47.37
                            },
                            "3_5": {
                                "home": 68.42,
                                "away": 73.68
                            },
                            "4_5": {
                                "home": 84.21,
                                "away": 94.74
                            },
                            "5_5": {
                                "home": 94.74,
                                "away": 100
                            }
                        }
                    },
                    "avg_player_rating": 6.81,
                    "avg_player_rating_per_match": 6.82,
                    "tackles": null
                }
            ]
        }
    },
```

{% endtab %}

{% tab title="Field Description" %}
**Team Field Description**

| Field               | Description                                                                                                                                                                                                      |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                | The unique id of the team                                                                                                                                                                                        |
| `legacy_id`         | This was for our API version 1.0. It's only of use for old users of our API                                                                                                                                      |
| `name`              | The name of the team                                                                                                                                                                                             |
| `short_code`        | The short code of the team                                                                                                                                                                                       |
| `twitter`           | The official twitter page of the team                                                                                                                                                                            |
| `country_id`        | The unique country id the team is from                                                                                                                                                                           |
| `national_team`     | Indicates if the team is a national team                                                                                                                                                                         |
| `founded`           | The year when the team was founded                                                                                                                                                                               |
| `logo_path`         | The logo URL path of the team logo                                                                                                                                                                               |
| `venue_id`          | The official venue of the team                                                                                                                                                                                   |
| `current_season_id` | The unique id of the season the team is active in                                                                                                                                                                |
| `is_placeholder`    | Added a property on both fixture and team responses called `is_placeholder`. This property indicates if the resource is used to display dummy data. The false of this property will always be a `boolean` value. |

**Team Stats Field Description**

| **Field**                        | Description                                                                                                                                                                          |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `team_id`                        | The unique id of the team                                                                                                                                                            |
| `season_id`                      | The id of the season you've requested the stats for                                                                                                                                  |
| `stage_id`                       | The id of the stage the stats belong to                                                                                                                                              |
| `win`                            | Opens an array containing information about the number of times the team won a match in the requested season and stage. Divided by total, home and away                              |
| `draw`                           | Opens an array containing information about the number of times the team has played a match which ended in a draw in the requested season and stage. Divided by total, home and away |
| `lost`                           | Opens an array containing information about the number of times the team lost a match in the requested season and stage. Divided by total, home and away                             |
| `goals_for`                      | Opens an array containing information about the number of times the team has scored a goal in the requested season and stage. Divided by total, home and away                        |
| `goals_against`                  | Opens an array containing information about the number of times the team has conceded a goal in the requested season and stage. Divided by total, home and away                      |
| `clean_sheet`                    | Opens an array containing information about the number of times the team has maintained a clean sheet in the requested season and stage. Divided by total, home and away             |
| `failed_to_score`                | Opens an array containing information about the number of times the team has failed to score in a match in the requested season and stage. Divided by total, home and away           |
| `scoring_minutes`                | The total number of times the team has scored divided in minute periods                                                                                                              |
| `goals_conceded_minutes`         | The total number of times the team has conceded a goal divided in minute periods                                                                                                     |
| `avg_goals_per_game_scored`      | Opens an array containing information about the average goals the team has scored per game. Divided by total, home and away                                                          |
| `avg_goals_per_game_conceded`    | Opens an array containing information about the average goals the team has conceded per game. Divided by total, home and away                                                        |
| `avg_first_goal_scored`          | Opens an array containing information about the average minute the team has scored the first goal per game. Divided by total, home and away                                          |
| `avg_first_goal_conceded`        | Opens an array containing information about the average minute the team has conceded the first goal per game. Divided by total, home and away                                        |
| `attacks`                        | The total number of attacks in the requested season and stage                                                                                                                        |
| `dangerous_attacks`              | The total number of dangerous attacks in the requested season and stage                                                                                                              |
| `avg_ball_possession_percentage` | The average ball possession, in percentage % in the requested season and stage                                                                                                       |
| `fouls`                          | The total number of fouls in the requested season and stage                                                                                                                          |
| `avg_fouls_per_game`             | The total number of fouls per game in the requested season and stage                                                                                                                 |
| `offsides`                       | The total number of offsides in the requested season and stage                                                                                                                       |
| `redcards`                       | The total number of red cards in the requested season and stage                                                                                                                      |
| `yellowcards`                    | The total number of yellow cards in the requested season and stage                                                                                                                   |
| `shots_blocked`                  | The total number of shots blocked by the opponent in the requested season and stage                                                                                                  |
| `shots_off_target`               | The total number of shots off target in the requested season and stage                                                                                                               |
| `avg_shots_off_target_per_game`  | The average number of shots off target per game in the requested season and stage                                                                                                    |
| `shots_on_target`                | The total number of shots on target in the requested season and stage                                                                                                                |
| `avg_shots_on_target_per_game`   | The average number shots on target per game in the requested season and stage                                                                                                        |
| `avg_corners`                    | The average number of corners per game in the requested season and stage                                                                                                             |
| `total_corners`                  | The total number of corners in the requested season and stage                                                                                                                        |
| `btts`                           | The number of times both teams scored in percentage in the requested season and stage                                                                                                |
| `goal_line`                      | The average goal line market in the requested season and stage                                                                                                                       |
| `avg_player_rating`              | The average player rating in the requested season and stage                                                                                                                          |
| `avg_player_rating_per_match`    | The average player rating per match in the requested season and stage                                                                                                                |
| `tackles`                        | The total number of tackles in the requested season and stage                                                                                                                        |
| {% endtab %}                     |                                                                                                                                                                                      |
| {% endtabs %}                    |                                                                                                                                                                                      |

![A snippet of team stats from the 2020/2021 season of the Spanish La Liga](/files/-MPE53Y2aRPViR02pvnj)


---

# 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/tutorials/statistics/team-statistics.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.
