Get live match timeline
Returns the same events as /timeline while a match is in play, with meta.match_status = "live". Poll it during the match. Returns 409 when the match is not live.
Example: GET /football/matches/mt_838955483/live-timeline?event_type=goal,penalty_scored
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/live-timeline \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/live-timeline', 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}/live-timeline"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)Authorizations
Your API key, sent as Authorization: Bearer YOUR_API_KEY. Get one at https://www.thestatsapi.com/api-keys
Path Parameters
Match ID of a live match. Find live matches with GET /football/matches?status=live
Query Parameters
Comma-separated event types to keep (values of type, e.g. goal, yellow_card, substitution). Defaults to all. Unknown values return 400. Penalty goals are penalty_scored, not goal, so use goal,penalty_scored to get every goal; shoot-out kicks are also penalty_scored with period penalties
Comma-separated periods to keep. Values are first_half, second_half, extra_time_first_half, extra_time_second_half and penalties
Only events for this team
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/live-timeline \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/live-timeline', 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}/live-timeline"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)