⚽
API 3.0
OddsCoreFootball APIAPI 2 (Deprecated)WidgetsContact
Football API 3.0
Football API 3.0
  • Welcome
    • 🛬Welcome
    • 🙋‍♂️Getting Started
    • 🤓What can you do with Sportmonks' data?
    • 🆕Differences between API 2 and API 3
      • API Changes
      • Syntax and filters
      • New endpoints and data features
    • 🔐Authentication
    • 👶Making your first request
    • 🔧Best Practices
  • API coach (BETA)
  • Changelog
    • 📄Changelog
    • 📁Changelog (BETA)
  • API
    • 💡Request options
      • Includes
        • Nested includes
      • Selecting fields
      • Filtering
      • Selecting and filtering
      • Ordering and sorting
    • 🔤Syntax
    • ♾️Rate limit
    • 👀Meta description
    • 📔Error codes
      • Include Exceptions
      • Filtering and Complexity Exceptions
      • Other Exceptions
    • 📚Code libraries
    • Translations (beta)
    • Demo response files
    • Data corrections
    • API 2.0 (Deprecated)
  • Endpoints and Entities
    • Endpoints
      • 📡Livescores
        • GET Inplay Livescores
        • GET All Livescores
        • GET Latest Updated Livescores
      • 🥅Fixtures
        • GET All Fixtures
        • GET Fixture by ID
        • GET Fixtures by Multiple IDs
        • GET Fixtures by Date
        • GET Fixtures by Date Range
        • GET Fixtures by Date Range for Team
        • GET Fixtures by Head To Head
        • GET Fixtures by Search by Name
        • GET Upcoming Fixtures by Market ID
        • GET Upcoming Fixtures by TV Station ID
        • GET Past Fixtures by TV Station ID
        • GET Latest Updated Fixtures
      • 🛰️States
        • GET All States
        • GET State by ID
      • ⌨️Types
        • GET All Types
        • GET Type by ID
        • GET Type by Entity
      • 🏆Leagues
        • GET All Leagues
        • GET League by ID
        • GET Leagues by Live
        • GET Leagues by Fixture Date
        • GET Leagues by Country ID
        • GET Leagues Search by Name
        • GET All Leagues by Team ID
        • GET Current Leagues by Team ID
      • 🗓️Seasons
        • GET All Seasons
        • GET Seasons by ID
        • GET Seasons by Team ID
        • GET Seasons by Search by Name
      • 📊Statistics
        • GET Season Statistics by Participant
        • GET Stage Statistics by ID
        • GET Round Statistics by ID
      • 📅Schedules
        • GET Schedules by Season ID
        • GET Schedules by Team ID
        • GET Schedules by Season ID and Team ID
      • 🪜Stages
        • GET All Stages
        • GET Stage by ID
        • GET Stages by Season ID
        • GET Stages by Search by Name
      • 🔂Rounds
        • GET All Rounds
        • GET Round by ID
        • GET Rounds by Season ID
        • GET Rounds by Search by Name
      • 🔢Standings
        • GET All Standings
        • GET Standings by Season ID
        • GET Standings by Round ID
        • GET Standing Correction by Season ID
        • Get Live Standings by League ID
      • 🥇Topscorers
        • GET Topscorers by Season ID
        • GET Topscorers by Stage ID
      • 🏃Teams
        • GET All Teams
        • GET Team by ID
        • GET Teams by Country ID
        • GET Teams by Season ID
        • GET Teams by Search by Name
      • 🧑Players
        • GET All Players
        • GET Player by ID
        • GET Players by Country ID
        • GET Players by Search by Name
        • GET Last Updated Players
      • 🧑‍🦱Team Squads
        • GET Team Squad by Team ID
        • GET Extended Team Squad by Team ID
        • GET Team Squad by Team and Season ID
      • 👨‍🏫Coaches
        • GET All Coaches
        • GET Coach by ID
        • GET Coaches by Country ID
        • GET Coaches Search by Name
        • GET Last Updated Coaches
      • 🕴️Referees
        • GET All Referees
        • GET Referee by ID
        • GET Referees by Country ID
        • GET Referees by Season ID
        • GET Referees Search by Name
      • ↔️Transfers
        • GET All Transfers
        • GET Transfer by ID
        • GET Latest Transfers
        • GET Transfers Between Date Range
        • GET Transfers by Team ID
        • GET Transfers by Player ID
      • 🏟️Venues
        • GET All Venues
        • GET Venue by ID
        • GET Venues by Season ID
        • GET Venues by Search by Name
      • 📺TV Stations
        • GET All TV Stations
        • GET TV Station by ID
        • GET TV Stations by Fixture ID
      • 🔮Expected (xG)
        • GET Expected by Team
        • GET Expected by Player
      • 🔭Predictions
        • GET Probabilities
        • GET Predictability by League ID
        • GET Probabilities by Fixture ID
        • GET Value Bets
        • GET Value Bets by Fixture ID
      • 🧙Standard Odds Feed
        • 👓Pre-match Odds
          • GET All Odds
          • Get Odds by Fixture ID
          • GET Odds by Fixture ID and Bookmaker ID
          • GET Odds by Fixture ID and Market ID
          • GET Last Updated Odds
        • 🧠Inplay Odds
          • GET All Inplay Odds
          • GET Inplay Odds by Fixture ID
          • GET Inplay Odds by Fixture ID and Bookmaker ID
          • GET Inplay Odds by Fixture ID and Market ID
          • GET Last Updated Inplay Odds
      • 🧙‍♂️Premium Odds Feed
        • 🕶️Premium Pre-match Odds
          • GET All Premium Odds
          • Get Premium Odds by Fixture ID
          • GET Premium Odds by Fixture ID and Bookmaker ID
          • GET Premium Odds by Fixture ID and Market ID
          • GET Updated Premium Odds Between Time Range
          • GET Updated Historical Odds Between Time Range
          • GET All Historical Odds
      • 🛒Markets
        • GET All Markets
        • GET All Premium Markets
        • GET Market by ID
        • GET Market by Search
      • 📑Bookmakers
        • GET All Bookmakers
        • GET All Premium Bookmakers
        • GET Bookmaker by ID
        • GET Bookmaker by Search
        • GET Bookmaker by Fixture ID
      • 📰News
        • GET Pre-Match News
        • GET Pre-Match News by Season ID
        • GET Pre-Match News for Upcoming Fixtures
        • GET Post-Match News
        • GET Post-Match News by Season ID
      • ⚔️Rivals
        • GET All Rivals
        • GET Rivals by Team ID
      • 🎙️Commentaries
        • GET All Commentaries
        • GET Commentaries by Fixture ID
    • Entities
      • 🥅Fixture
      • 🏆League, Season, Schedule, Stage and Round
      • 🧑‍🤝‍🧑Team, Player, Squad, Coach and Referee
      • 🔢Statistic
      • 🔮Expected
      • 🥇Standing and Topscorer
      • 🔭Odd and Prediction
      • Other
  • Tutorials and Guides
    • Tutorials
      • Introduction
        • Make your first request
        • Set your time zone
        • Pagination
      • Enrich your response
        • Nested includes
          • Syntax and relations
      • Includes
        • Events
        • States
        • Periods
        • Scores
        • Participants
        • Lineups
        • ballCoordinates
        • Pressure Index
        • Tips and tricks
      • Filter and select fields
        • Selecting fields
        • Filtering
        • Selecting and filtering
      • Leagues and seasons
        • Leagues
        • Seasons
      • Season schedule
        • Schedules
        • Stages
        • Rounds
      • Livescores and fixtures
        • Livescores
        • Fixtures
      • Lineups and formations
      • Statistics
        • Statistics types
        • Season statistics
        • Fixture statistics
        • Team statistics
        • Players statistics
      • Teams, players, coaches and referees
        • Teams
        • Players
        • Coaches
        • Referees
      • Standings
        • Season standings
        • Topscorer standings
      • Odds and predictions
        • Bookmakers
        • Markets
        • Pre-match odds
        • Live(Inplay) odds
        • hasOdds
        • Predictions
          • Probabilities
          • Value Bet
      • Expected
        • Endpoints
        • Includes
        • Coverage
      • News
        • Pre-match News
        • Post-match News
      • Placeholders
      • Timezone parameters on different endpoints
    • Guides
      • How-to use components
      • How-to use the Football API with Postman
      • How-to use the Football API tester
      • How-to use the Football API ID finder
      • How-to build a livescore website
      • How-to use the Predictions API
      • How-to build a match page
      • How-to build a custom plan
      • How-to build a match page with odds
      • How-to use xG data
      • How-to build a news website
      • How-to build a fantasy game guide
      • How-to use the new Champions League data
      • How-to build your World Cup application
      • How-to build a team page
      • How-to keep your database in SYNC
      • How-to use team mode in MySportmonks
    • Programming languages
      • A developers guide: Unleashing the power of the football API with JSON
      • A developers guide: Unleashing the power of the football API with PHP
      • A developers guide: Unleashing the power of the football API with Python
  • Definitions
    • 📔Response Codes
    • 🛰️States
    • ⌨️Types
      • Lineups, positions and formations
      • Events
      • Statistics
        • Coach statistics
        • Referee statistics
        • Stage statistics
        • Season statistics
        • Fixture statistics
        • Team statistics
        • Player statistics
      • Expected
      • Leagues and stages
      • Standings
      • Transfers
      • Highlights
      • Weather and pitch
  • FAQ
    • API 3.0
    • Odds
    • Integration
    • Sportmonks
  • Quicklinks
    • Postman
    • ID Finder
    • Sportmonks
    • MySportmonks
    • Football widgets
    • Plans and Pricing
    • Data features
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. Tutorials and Guides
  2. Tutorials
  3. Statistics

Season statistics

PreviousStatistics typesNextFixture statistics

Last updated 10 months ago

Was this helpful?

Keep track of exciting season statistics. We calculate a wide range of stats for you, like the number of matches, matches played, goals scored, clean sheets, yellow cards, average goals per minute, etc. There are multiple ways to retrieve season statistics, but the most commonly used is the endpoint with the statistics include:

https://api.sportmonks.com/v3/football/seasons/{season_id}?api_token=YOUR_TOKEN&include=statistics 

Is this the first time you've heard about includes? Check our .

Let's take a look at the 2022/2023 season of the Scottish Premiership (season id 19735):

https://api.sportmonks.com/v3/football/seasons/19735?api_token=YOUR_TOKEN&include=statistics
Response
{
  "data": {
    "id": 19735,
    "sport_id": 1,
    "league_id": 501,
    "tie_breaker_rule_id": 171,
    "name": "2022/2023",
    "finished": false,
    "pending": false,
    "is_current": true,
    "starting_at": "2022-07-30",
    "ending_at": "2023-04-22",
    "standings_recalculated_at": "2023-03-03 00:07:44",
    "games_in_current_week": false,
    "statistics": [
      {
        "id": 46371,
        "model_id": 19735,
        "type_id": 34,
        "relation_id": 53,
        "value": {
          "count": 194,
          "percentage": 12.08,
          "team_most_corners_id": 53,
          "team_most_corners_name": "Celtic"
        },
        "type": "array"
      },
      {
        "id": 46381,
        "model_id": 19735,
        "type_id": 188,
        "relation_id": null,
        "value": {
          "total": 198,
          "played": 159,
          "percentage": 80.3
        },
        "type": "array"
      },
//And more      

Our API returns many values, but what do they mean exactly? And how can you display the type of statistic? You can use the nested include statistics.type for this:

https://api.sportmonks.com/v3/football/seasons/19735?api_token=YOUR_TOKEN&include=statistics.type
Response
{
  "data": {
    "id": 19735,
    "sport_id": 1,
    "league_id": 501,
    "tie_breaker_rule_id": 171,
    "name": "2022/2023",
    "finished": false,
    "pending": false,
    "is_current": true,
    "starting_at": "2022-07-30",
    "ending_at": "2023-04-22",
    "standings_recalculated_at": "2023-03-03 00:07:44",
    "games_in_current_week": false,
    "statistics": [
      {
        "id": 46371,
        "model_id": 19735,
        "type_id": 34,
        "relation_id": 53,
        "value": {
          "count": 194,
          "percentage": 12.08,
          "team_most_corners_id": 53,
          "team_most_corners_name": "Celtic"
        },
        "type": {
          "id": 34,
          "name": "Corners",
          "code": "corners",
          "developer_name": "CORNERS",
          "model_type": "statistic",
          "stat_group": "offensive"
        }
      },
      {
        "id": 46381,
        "model_id": 19735,
        "type_id": 188,
        "relation_id": null,
        "value": {
          "total": 198,
          "played": 159,
          "percentage": 80.3
        },
        "type": {
          "id": 188,
          "name": "Season Matches",
          "code": "matches",
          "developer_name": "MATCHES",
          "model_type": "statistic",
          "stat_group": null
        }
      },
      {
        "id": 46390,
        "model_id": 19735,
        "type_id": 189,
        "relation_id": null,
        "value": {
          "total": 12,
          "countries": 1
        },
        "type": {
          "id": 189,
          "name": "Season Teams",
          "code": "total-teams",
          "developer_name": "TOTAL_TEAMS",
          "model_type": "statistic",
          "stat_group": null
        }
      },
  //And more!    

Now, the season statistics' names and types are also returned. For example, at the time of writing, you can see 198 matches in the season; 159 have already been played, giving a percentage of 80.3%—this is a fantastic way to show the season's progression.

Please check the response carefully to see the correct values for the types.

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.

Filtering season statistics

The API returns a lot of season statistics, but we can imagine you're interested in only some of them. Therefore, it might be good to filter only the data you want.

Let's continue with the previous example: the 2022/2023 season of the Scottish Premiership (season id 19735):

https://api.sportmonks.com/v3/football/seasons/19735?api_token=YOUR_TOKEN&include=statistics.type

To filter your request, you need to:

  1. Add the parameter &filters=

  2. Select the entity you want to filter on

  3. Select the field you want to filter on

  4. Fill in the IDs you're interested in

Let's say you're only interested in the number of goals, cards, and clean sheets. In our case, this will result in the following steps:

  1. Add the parameter &filters=

  2. Select the entity you want to filter on: seasonStatistic

  3. Select the field you want to filter on: Types (the statistics types)

  4. Fill in the IDs you're interested in: 191,193,194 (You can retrieve them via the Types endpoint or by looking at the previous request)

It's important to note that you can retrieve statistics from multiple entities. Therefore, you need to specify for which entity you want to filter the statistics. You can do this by prefixing the filter with the entity's name. So in our case: seasonStatistic

https://api.sportmonks.com/v3/football/seasons/19735?api_token=YOUR_TOKEN&include=statistics.type&filters=seasonStatisticTypes:191,193,194
Response
{
  "data": {
    "id": 19735,
    "sport_id": 1,
    "league_id": 501,
    "tie_breaker_rule_id": 171,
    "name": "2022/2023",
    "finished": false,
    "pending": false,
    "is_current": true,
    "starting_at": "2022-07-30",
    "ending_at": "2023-04-22",
    "standings_recalculated_at": "2023-03-03 00:07:44",
    "games_in_current_week": false,
    "statistics": [
      {
        "id": 46383,
        "model_id": 19735,
        "type_id": 191,
        "relation_id": null,
        "value": {
          "total": 460,
          "home": {
            "count": 271,
            "percentage": 58.91,
            "average": 1.7
          },
          "away": {
            "count": 189,
            "percentage": 41.09,
            "average": 2.43
          },
          "average": 2.89
        },
        "type": {
          "id": 191,
          "name": "Number Of Goals",
          "code": "number-of-goals",
          "developer_name": "NUMBER_OF_GOALS",
          "model_type": "statistic",
          "stat_group": null
        }
      },
      {
        "id": 46369,
        "model_id": 19735,
        "type_id": 193,
        "relation_id": null,
        "value": {
          "yellowcards": 660,
          "redcards": 31,
          "yellowredcards": 15,
          "average_yellowcards": 4.15,
          "average_redcards": 0.19,
          "average_yellowredcards": 0.09
        },
        "type": {
          "id": 193,
          "name": "Cards",
          "code": "cards",
          "developer_name": "CARDS",
          "model_type": "statistic",
          "stat_group": null
        }
      },
      {
        "id": 46370,
        "model_id": 19735,
        "type_id": 194,
        "relation_id": null,
        "value": {
          "count": 6,
          "percentage": 3.77
        },
        "type": {
          "id": 194,
          "name": "Cleansheets",
          "code": "cleansheets",
          "developer_name": "CLEANSHEET",
          "model_type": "statistic",
          "stat_group": null
        }
      }
    ]
  },

Check out our for valuable tips and tricks.

GET Season by ID
includes tutorial
filtering tutorial