Retrieve detailed player information via one of our 5 player endpoints. You can retrieve more detailed information by using the correct includes. This section will briefly discuss all the options available to request players.
An overview of all the options available:
GET Player by ID: returns player information from your requested player id.
GET Players by Country ID: returns player information from your requested country id.
GET Players Search by Name: returns all the players that match your search query.
GET Last Updated Players: returns all the players that have received updates in the past two hours.
For all the player endpoints the base URL is the same:
https://api.sportmonks.com/v3/football/players/
Per endpoint the rest of the URL requires additional information. We will explain this per endpoint.
Requesting players
GET All Players
As mentioned before, a great starting point for your football application is to gather an overview of all the data available in your subscription. For players, you can do this via the GET All Players endpoint.
The URL to get all your players is the same as the base URL for players. All you have to do is authorize the request with your API token. Check our authentication section for more info.
You will receive the nationality of the player, the (detailed) position, height, weight, gender, date of birth and all kinds of information about the player’s name.
Now that you've requested all the Players, you also know their unique player id. You can use this id in the second option: GET Player by ID.
GET Players by ID
This endpoint is useful if you only want information about one particular player. You need to add the player_id to your request:
This endpoint returns player information from your requested country id. Comes in handy when you want to know which players you have included in your subscription and want to list them per country. You need to add the country_id to your request:
This endpoint returns all the players based on your search query. This might come in handy if you cannot find a player. To search on a players' name, you’ll need to add /search/{search_query} to the players base URL:
The more complete your search query is, the more relevant response you’ll get.
GET Last Updated Players
This endpoint returns all the players that have received updates in the past two hours. This comes in handy to keep your database in sync. You’ll need to add /latest to the players base URL:
As you’ve learnt in the includes tutorial, you can enrich your request with includes. This section will discuss some of the most common requests on the player’s endpoints.
First, you can find a list of all available includes on the endpoint pages. For the players, the most commonly used includes are metadata, position and statistics.
metadata: Returns information about a player's preferred foot.
position: Position returns the position of the player. Is he a goalkeeper, defender, midfielder or attacker? The include detailedPosition returns if a defender is a leftback, rightback, center back and so on.
statistics: This include returns player statistics.
For example, if we want all the above information about James Tavernier (player id: 758).
In our filtering tutorial you’ve learnt how to select specific fields or filter only on the data you’re interested in. By default, our API returns a set of data related to the player. We can imagine you’re not interested in all the player data the API returns. Let’s say you’re only interested in the player name and image.