Team squad
Returns the players currently in a team's squad, with their profile details and shirt numbers. Use it to build a squad page or to collect player ids for stats calls.
https://api.soccer-data.co/v1/teams/{team_id}/players
- Everything comes in one response, up to 100 players. There is no pagination.
- For a national team, you get the players who represent it.
- Pass a player's id as player_id to /players/{player_id}/stats for their season numbers.
The team's id, like team_…. Find one with the ID guide.
The player's id.
Full name.
First name.
Last name.
G (goalkeeper), D (defender), M (midfielder) or F (forward). An empty string when unknown.
Birth date as YYYY-MM-DD. Null when unknown.
Age in years. Null when the birth date is unknown.
The player's nationality.
Height in centimetres. Null when unknown.
The id of the team the player is at now.
That team's name.
Shirt number at that team. Null when unknown.
A URL-friendly version of the name. Can be null.
Abbreviated name, such as A. Isak. Can be null.
The player's stronger foot. Can be null.
A URL-friendly version of the player's country. Can be null.
Estimated market value, when one is known. Otherwise null.
When the current contract ends, as YYYY-MM-DD. Can be null.
The national team the player represents, or null.
The national team's id.
The national team's name.
curl "https://api.soccer-data.co/v1/teams/team_74p8tg2k93z4/players" \ -H "X-Api-Key: $SOCCER_DATA_KEY"
const res = await fetch("https://api.soccer-data.co/v1/teams/team_74p8tg2k93z4/players", {
headers: { "X-Api-Key": process.env.SOCCER_DATA_KEY },
});
const { data } = await res.json();
import os, requests
res = requests.get(
"https://api.soccer-data.co/v1/teams/team_74p8tg2k93z4/players",
headers={"X-Api-Key": os.environ["SOCCER_DATA_KEY"]},
)
data = res.json()["data"]
$data = Http::withHeaders(['X-Api-Key' => env('SOCCER_DATA_KEY')])
->get('https://api.soccer-data.co/v1/teams/team_74p8tg2k93z4/players')
->json('data');
{
"data": [
{
"id": "player_zpfc5xvtigeo",
"name": "Alexander Isak",
"first_name": "Alexander",
"last_name": "Isak",
"position": "F",
"date_of_birth": "1999-09-21",
"age": 27,
"nationality": "Sweden",
"height_cm": 193,
"current_team": {
"id": "team_74p8tg2k93z4",
"name": "Liverpool",
"jersey_number": 9
},
"slug": "alexander-isak",
"short_name": "A. Isak",
"preferred_foot": "right",
"country_slug": "sweden",
"market_value": 88000000,
"contract_until": "2031-06-30",
"national_team": {
"id": "team_ri18cbrnnp2h",
"name": "Sweden"
}
}
]
}
### GET /teams/{team_id}/players
Team squad
Returns the players currently in a team's squad, with their profile details and shirt numbers. Use it to build a squad page or to collect player ids for stats calls.
- Everything comes in one response, up to 100 players. There is no pagination.
- For a national team, you get the players who represent it.
- Pass a player's id as player_id to /players/{player_id}/stats for their season numbers.
Response fields:
- `data[].id` (string): The player's id.
- `data[].name` (string): Full name.
- `data[].first_name` (string): First name.
- `data[].last_name` (string): Last name.
- `data[].position` (string): G (goalkeeper), D (defender), M (midfielder) or F (forward). An empty string when unknown.
- `data[].date_of_birth` (string): Birth date as YYYY-MM-DD. Null when unknown.
- `data[].age` (integer): Age in years. Null when the birth date is unknown.
- `data[].nationality` (string): The player's nationality.
- `data[].height_cm` (integer): Height in centimetres. Null when unknown.
- `data[].current_team.id` (string): The id of the team the player is at now.
- `data[].current_team.name` (string): That team's name.
- `data[].current_team.jersey_number` (integer): Shirt number at that team. Null when unknown.
- `data[].slug` (string): A URL-friendly version of the name. Can be null.
- `data[].short_name` (string): Abbreviated name, such as A. Isak. Can be null.
- `data[].preferred_foot` (string): The player's stronger foot. Can be null.
- `data[].country_slug` (string): A URL-friendly version of the player's country. Can be null.
- `data[].market_value` (number): Estimated market value, when one is known. Otherwise null.
- `data[].contract_until` (string): When the current contract ends, as YYYY-MM-DD. Can be null.
- `data[].national_team` (object): The national team the player represents, or null.
- `data[].national_team.id` (string): The national team's id.
- `data[].national_team.name` (string): The national team's name.
Example: curl "https://api.soccer-data.co/v1/teams/team_74p8tg2k93z4/players" -H "X-Api-Key: $SOCCER_DATA_KEY"