Players
Get a player
Returns one player’s profile: name, position, date of birth, age, nationality, height and current team with shirt number.
Example: GET /football/players/pl_45126714 (Bukayo Saka)
GET
/
football
/
players
/
{player_id}
Get a player
curl --request GET \
--url https://api.thestatsapi.com/api/football/players/{player_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/players/{player_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/players/{player_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "pl_29627593",
"name": "Alexander Isak",
"first_name": "Alexander",
"last_name": "Isak",
"position": "F",
"nationality": "Sweden",
"height_cm": 193,
"current_team": {
"id": "tm_0406",
"name": "Liverpool",
"jersey_number": 9
},
"date_of_birth": "1999-09-21",
"age": 27
}
}For goals, assists and other season numbers, use Get a player’s season stats.
Authorizations
Your API key, sent as Authorization: Bearer YOUR_API_KEY. Get one at https://www.thestatsapi.com/api-keys
Path Parameters
⌘I
Get a player
curl --request GET \
--url https://api.thestatsapi.com/api/football/players/{player_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/players/{player_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/players/{player_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "pl_29627593",
"name": "Alexander Isak",
"first_name": "Alexander",
"last_name": "Isak",
"position": "F",
"nationality": "Sweden",
"height_cm": 193,
"current_team": {
"id": "tm_0406",
"name": "Liverpool",
"jersey_number": 9
},
"date_of_birth": "1999-09-21",
"age": 27
}
}