⚽
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
  • Step 1: Gather the tools
  • Step 2: Decide what data you want to show
  • Step 3: Choose the correct endpoints
  • Step 4: the Request
  • Step 5: Evaluate the response
  • Step 6: Extra’s

Was this helpful?

  1. Tutorials and Guides
  2. Guides

How-to build a team page

Welcome to our guide about building a team page that shows the squad of a team for a specific season, as well as the seasonal statistics of the team. A squad is the entire group of players related to a team in a particular Season.

We’ll show you three different endpoints that you can work with to get the seasonal statistics and squad data. Afterward, we’ll show you a basic implementation process in order to build the team page.

We'll show you example requests of the Scottish Premiership team Celtic of the 22/23 season. This league is included in our free plan, so feel free to make the requests yourself.

Step 1: Gather the tools

You are going to need the following tools:

  • Sportmonks API token

  • Code editor (Visual studio used in examples)

  • Postman (optional)

You can find a link to another article where we discuss the tools in-depth on our Developer Tools Guide.

Step 2: Decide what data you want to show

Squad statistics

To get all players of a squad and squad stats, you can opt to only show the current season, but if you value historic data, then you might as well show past iterations of the squad. It’s common to show all the members of the squad on one page for a nice overview of all their statistics, such as:

  • Player names

  • Playtime

  • Number of appearances in matches

  • Number of times substituted in or out

  • Number of goals scored, assists given

  • Number of cards received

And many more!

Team seasonal statistics

You can have statistics about almost anything in sports. So, it’s up to you to decide what statistics you want to show to your users. At Sportmonks we offer you highly detailed season statistics per team such as:

  • Win-loss record

  • Number of attacks, fouls, cards, saves

  • Clean sheets

  • Number of goals scored between minute 0 and 15, or between minutes 75 and 90

  • Ranking and how many points they have

  • Average time for first goal scored/conceded

  • Average number of goals per match/win

And much more!

Step 3: Choose the correct endpoints

As mentioned before, we will discuss three different endpoints:

These first endpoint returns the individual player statistics of all the players in a squad, the second endpoint returns statistics of the team.

We’ll show you how to work with the endpoints.

Step 4: the Request

The squad by team and season id endpoint requires you to simply fill in the ids of the season and team you want. While the team by id endpoint has you fill in the team id and filter on season id.

https://api.sportmonks.com/v3/football/teams/62?api_token=YOUR_TOKEN&include=statistics
https://api.sportmonks.com/v3/football/squads/seasons/19735/teams/62?api_token=YOUR_TOKEN&include=player;details.type

Step 5: Evaluate the response

{
  "data": {
    "id": 62,
    "sport_id": 1,
    "country_id": 1161,
    "venue_id": 8914,
    "gender": "male",
    "name": "Rangers",
    "short_code": "RAN",
    "image_path": "https://cdn.sportmonks.com/images/soccer/teams/30/62.png",
    "founded": 1873,
    "type": "domestic",
    "placeholder": false,
    "last_played_at": "2023-02-26 15:00:00",
    "statistics": [
      {
        "id": 257394,
        "team_id": 62,
        "season_id": 19735,
        "has_values": true,
        "details": [
          {
            "id": 1932172,
            "team_statistic_id": 257394,
            "type_id": 214,
            "value": {
              "all": {
                "count": 20,
                "percentage": 76.92
              },
              "home": {
                "count": 11,
                "percentage": 55
              },
              "away": {
                "count": 9,
                "percentage": 45
              }
            },
            "type": {
              "id": 214,
              "name": "Team Wins",
              "code": "team-wins",
              "developer_name": "WIN",
              "model_type": "statistic",
              "stat_group": null
            }
          }
        ]
      }
    ]
  },
  // And more

Since the two requests return the same data, we’ll only show you the output of the GET Team Squad by ID and Season ID endpoint including statistics.

Let's look at Cody Gakpo’s World Cup stats. There’s a lot of information about his stats, such as minutes played, times he got substituted out, duels won, clean sheets, etc.

Step 6: Extra’s

To add more to your team page you could add league standings and topscorer standings for the team you prefer.

https://api.sportmonks.com/v3/football/standings/seasons/{ID}?api_token=YOUR_TOKEN

There is a lot more information regarding their standings that you can opt to use for your application.

https://api.sportmonks.com/v3/football/topscorers/seasons/{ID}?api_token=YOUR_TOKEN

By using these endpoints, you can add more depth to your team page.

PreviousHow-to build your World Cup applicationNextHow-to keep your database in SYNC

Last updated 9 months ago

Was this helpful?

with some includes

Now for the team by id endpoint with the statistics include, this request returns all the season with statistics. Please check out to learn how to filter on specific data.

You can retrieve seasonal standings; we simply have the endpoint: ""

You can also add the top scorers' standings to your page. For that, we have created the

GET Team Squads by Team ID and Season ID
GET Team by ID
team statistics tutorial
GET Standings by Season ID.
topscorers endpoint.