# Statistics types

## A brief introduction about types

We introduced [states](https://docs.sportmonks.com/v3/endpoints-and-entities/endpoints/states) and [types](https://docs.sportmonks.com/v3/definitions/types) to ensure data quality and consistency for specific fields. Something has a type when there are multiple variants of a particular variant. Sounds difficult? Let's explain with an example:

{% hint style="info" %}
Hint: you can request all possible types with their unique id via the types endpoint: <https://api.sportmonks.com/v3/**core**/types?api\\_token=YOUR\\_TOKEN>
{% endhint %}

### Fixture statistics

As you’ve learned in our [includes tutorial](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/includes), you can quickly enrich your request by using includes. You can obtain the statistics for your favourite fixture by adding the `&include=statistics` to your request. So, for example, the Celtic vs. Rangers fixture:

```javascript
https://api.sportmonks.com/v3/football/fixtures/18535517?api_tokenYOUR_TOKEN&include=statistics
```

<details>

<summary>Response</summary>

```javascript
{
  "data": {
    "id": 18535517,
    "sport_id": 1,
    "league_id": 501,
    "season_id": 19735,
    "stage_id": 77457866,
    "group_id": null,
    "aggregate_id": null,
    "round_id": 274719,
    "state_id": 5,
    "venue_id": 8909,
    "name": "Celtic vs Rangers",
    "starting_at": "2022-09-03 11:30:00",
    "result_info": "Celtic won after full-time.",
    "leg": "1/1",
    "details": null,
    "length": 90,
    "placeholder": false,
    "last_processed_at": "2023-03-02 17:47:38",
    "has_odds": true,
    "starting_at_timestamp": 1662204600,
    "statistics": [
      {
        "id": 5914502,
        "fixture_id": 18535517,
        "type_id": 86,
        "participant_id": 53,
        "data": {
          "value": 6
        },
        "location": "home"
      },
      {
        "id": 5914520,
        "fixture_id": 18535517,
        "type_id": 78,
        "participant_id": 62,
        "data": {
          "value": 17
        },
        "location": "away"
      },
//And More
```

</details>

This request returns all the match statistics of both teams for the requested fixture. As you might have noticed, you receive a lot of values belonging to different type ids. What does this mean exactly?&#x20;

Just add the nested `&include=statistics.type` to receive a textual representation:

```javascript
https://api.sportmonks.com/v3/football/fixtures/18535517?api_token=YOUR_TOKEN&include=statistics.type
```

<details>

<summary>Response</summary>

```javascript
{
  "data": {
    "id": 18535517,
    "sport_id": 1,
    "league_id": 501,
    "season_id": 19735,
    "stage_id": 77457866,
    "group_id": null,
    "aggregate_id": null,
    "round_id": 274719,
    "state_id": 5,
    "venue_id": 8909,
    "name": "Celtic vs Rangers",
    "starting_at": "2022-09-03 11:30:00",
    "result_info": "Celtic won after full-time.",
    "leg": "1/1",
    "details": null,
    "length": 90,
    "placeholder": false,
    "last_processed_at": "2023-03-02 17:47:38",
    "has_odds": true,
    "starting_at_timestamp": 1662204600,
    "statistics": [
      {
        "id": 5914502,
        "fixture_id": 18535517,
        "type_id": 86,
        "participant_id": 53,
        "data": {
          "value": 6
        },
        "location": "home",
        "type": {
          "id": 86,
          "name": "Shots On Target",
          "code": "shots-on-target",
          "developer_name": "SHOTS_ON_TARGET",
          "model_type": "statistic",
          "stat_group": "offensive"
        }
      },
      {
        "id": 5914520,
        "fixture_id": 18535517,
        "type_id": 78,
        "participant_id": 62,
        "data": {
          "value": 17
        },
        "location": "away",
        "type": {
          "id": 78,
          "name": "Tackles",
          "code": "tackles",
          "developer_name": "TACKLES",
          "model_type": "statistic",
          "stat_group": "defensive"
        }
      },
      //And more
```

</details>

Now you can distinguish between the various match statistics for both teams.&#x20;

Interested in an overview of all statistics types? Check our [statistics types](https://docs.sportmonks.com/v3/definitions/types) overview page.&#x20;

{% hint style="danger" %}
Including `.type` is not recommended as an include on any endpoint. Types are used throughout the entire API. We recommend retrieving all types from the types endpoint and storing them in your database or other data structure. Only include the type if no other option is available or when testing the API.
{% endhint %}

### See also

#### Related tutorials

* [Fixture Statistics](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/statistics/fixture-statistics) - Learn how to retrieve match statistics
* [Player Statistics](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/statistics/players-statistics) - Access individual player stats
* [Season Statistics](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/statistics/season-statistics) - Get league-wide statistics
* [Team Statistics](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/statistics/team-statistics) - Retrieve team performance data

#### Reference

* [Statistics Types List](https://docs.sportmonks.com/v3/definitions/types/statistics) - Complete reference of all statistic type IDs and descriptions
* [Includes Tutorial](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/includes) - Learn how to use nested includes for type data

#### Best practices

* [Filter and Select Fields](https://docs.sportmonks.com/v3/tutorials-and-guides/tutorials/filter-and-select-fields) - Filter statistics by specific type IDs

<br>
