Matches
Get a match's referee
Returns the referee assigned to a match, with career totals for games, yellow cards and red cards. referee is null when no referee is assigned.
Example: GET /football/matches/mt_838955483/referee
GET
/
football
/
matches
/
{match_id}
/
referee
Get a match's referee
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/referee \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/referee', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/matches/{match_id}/referee"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"match_id": "mt_838955483",
"referee": {
"id": "ref_7264609",
"name": "Chris Kavanagh",
"slug": "chris-kavanagh-ref_7264609",
"country": "England",
"country_code": "<string>",
"country_slug": "england",
"career": {
"games": 322,
"yellow_cards": 1176,
"red_cards": 28,
"yellow_red_cards": 12
}
}
}
}Get a match already includes the referee’s name. Use this endpoint when you also want their career card totals.
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 match's referee
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/referee \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/referee', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/matches/{match_id}/referee"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"match_id": "mt_838955483",
"referee": {
"id": "ref_7264609",
"name": "Chris Kavanagh",
"slug": "chris-kavanagh-ref_7264609",
"country": "England",
"country_code": "<string>",
"country_slug": "england",
"career": {
"games": 322,
"yellow_cards": 1176,
"red_cards": 28,
"yellow_red_cards": 12
}
}
}
}