async function getLivescores() {
const response = await fetch("https://api.soccerdataapi.com/livescores/", {
method: 'GET',
headers: {
"Authorization": "Token YOUR-AUTH-TOKEN",
"Content-Type": "application/json",
"Accept-Encoding": "gzip"
},
})
.then(response => {
return response;
})
.catch(error => {
return error;
});
const livescoreJson = await response.json();
console.log(livescoreJson);
}
Match data includes match info, goals, live events, projected or live lineups, white label odds, injuries, formations, and match preview available boolean:
{
"id": 531585,
"league": {
"id": 206,
"name": "Liga Profesional"
},
"stage": {
"id": 6347,
"name": "2nd Phase"
},
"date": "26/08/2023",
"time": "00:30",
"teams": {
"home": {
"id": 3842,
"name": "Colon"
},
"away": {
"id": 3843,
"name": "Gimnasia La Plata"
}
},
"stadium": {
"id": 1891,
"name": "Estadio Brigadier General Estanislao Lopez",
"city": "Ciudad de Santa Fe, Provincia de Santa Fe"
},
"status": "finished",
"minute": -1,
"winner": "home",
"has_extra_time": false,
"has_penalties": false,
"goals": {
"home_ht_goals": 2,
"away_ht_goals": 0,
"home_ft_goals": 2,
"away_ft_goals": 0,
"home_et_goals": -1,
"away_et_goals": -1,
"home_pen_goals": -1,
"away_pen_goals": -1
},
"events": [
{
"event_type": "goal",
"event_minute": "14",
"team": "home",
"player": {
"id": 53675,
"name": "J. Benítez"
},
"assist_player": null
},
{
"event_type": "goal",
"event_minute": "27",
"team": "home",
"player": {
"id": 53644,
"name": "T. Galván"
},
"assist_player": null
},
...
],
"odds": {
"match_winner": {
"home": 1.84,
"draw": 3.5,
"away": 4.3
},
"over_under": {
"total": 2.5,
"over": 2.1,
"under": 1.74
},
"handicap": {
"market": -0.5,
"home": 1.81,
"away": 1.96
},
"last_modified_timestamp": 1693017076
},
"lineups": {
"lineup_type": "live",
"lineups": {
"home": [
{
"player": {
"id": 102150,
"name": "R. Botta"
},
"position": "M"
},
{
"player": {
"id": 53656,
"name": "S. Moreyra"
},
"position": "M"
},
...
],
"away": [
{
"player": {
"id": 102150,
"name": "R. Botta"
},
"position": "M"
},
{
"player": {
"id": 53656,
"name": "S. Moreyra"
},
"position": "M"
},
...
]
},
"bench": {
"home": [
{
"player": {
"id": 53637,
"name": "B. Perlaza"
},
"position": "M"
},
{
"player": {
"id": 53653,
"name": "L. Picco"
},
"position": "M"
},
...
],
"away": [
{
"player": {
"id": 53692,
"name": "Z. Zegarra"
},
"position": "M"
},
{
"player": {
"id": 84921,
"name": "R. Saravia"
},
"position": "M"
},
...
]
},
"sidelined": {
"home": [
{
"player": {
"id": 31889,
"name": "M. Novak"
},
"status": "out",
"desc": "Injury"
}
],
"away": [
{
"player": {
"id": 31889,
"name": "M. Novak"
},
"status": "out",
"desc": "Injury"
}
]
},
"formation": {
"home": "4-3-3",
"away": "4-3-3"
}
},
"match_preview": {
"has_preview": true,
"word_count": 389,
"excitement_rating": 7.0
}
}
A.I. Match Previews include weather forecast, excitement rating, predictions and a full text preview that analyses major factors for the match:
{
"match_id": 544770,
"league": {
"id": 216,
"name": "Serie B",
"country": "brazil"
},
"home": {
"id": 3958,
"name": "Chapecoense"
},
"away": {
"id": 3959,
"name": "Avai"
},
"word_count": 362,
"date": "27-08-2023",
"time": "18:45",
"match_data": {
"weather": {
"temp_f": 62.1,
"temp_c": 16.7,
"description": "sunny"
},
"excitement_rating": 5.53,
"prediction": {
"type": "match_winner",
"choice": "Chapecoense Win"
}
},
"content": [
{
"name": "p1",
"content": "On Sunday, August 27, Chapecoense will face Avaí at Arena Condá Stadium in Chapecó, Santa Catarina, at 18:45 (UTC) in the Brazil Serie B league. This matchup marks a rematch of the teams' last game, a 1-4 win for Chapecoense in the Serie B back on May 13. Fans in attendance can expect sunny weather with a temperature of 62 degrees (F)."
},
{
"name": "h1",
"content": "Kayke's Rewards Reaped After Two-Goal Match"
},
{
"name": "p2",
"content": "Chapecoense have earned a total of 25 points in their last 24 matches, winning 6 and drawing 7 while losing 11. At home, they have won two and drawn one of their last five matches, but have lacked quality in attack, managing only 4 goals. Against similarly ranked opponents this year, they've had a difficult run, winning none, drawing one and losing three, scoring an average of 0.75 goals and conceding 1.75. In their last match, Kayke was instrumental in a 1-2 away win against Botafogo SP, where he scored both goals."
},
{
"name": "h2",
"content": "Igor Bohn: The Reliable Road Goalkeeper with 10 Clean Sheets in 19 Games"
},
{
"name": "p3",
"content": "Avaí come into this game in good form, having won two of their last five matches. In addition to their decent goal scoring record of 9 goals in their last five outings, they will be entertained with a full strength squad. Gabriel Poveda scored their lone goal when they drew 1-1 with CRB in the Serie B last time out. Their imperious form on the road has been led by their goalkeeper, Igor Bohn, who has kept ten clean sheets in 19 away matches this season."
},
{
"name": "p4",
"content": "In the past 10 matches between Chapecoense and Avaí, an average of 2.3 goals have been scored. Out of 59 head-to-head meetings, Chapecoense has won 29, drawn 11 and Avaí has won 19 times."
},
{
"name": "h3",
"content": "Chapecoense Seeks to Leapfrog Avaí on League Table"
},
{
"name": "p5",
"content": "Chapecoense sit 1 point behind Avaí in the league table and have a chance to jump them with their next game. This gives the home team plenty of incentive to give it their all and strive to get the result they need. Going into the match, Chapecoense will be highly motivated to score goals and solidify their place at the top."
}
]
}
{
"id": 228,
"league": {
"id": 228,
"name": "Premier League"
},
"season": "2023-2024",
"stage": [
{
"stage_id": 6497,
"stage_name": "Regular Season",
"has_groups": false,
"is_active": true,
"standings": [
{
"position": 1,
"team_id": 3059,
"team_name": "West Ham United",
"position_attribute": "Promotion - Champions League (Group Stage)",
"games_played": 3,
"points": 7,
"wins": 2,
"draws": 1,
"losses": 0,
"goals_for": 7,
"goals_against": 3
},
{
"position": 2,
"team_id": 2909,
"team_name": "Tottenham Hotspur",
"position_attribute": "Promotion - Champions League (Group Stage)",
"games_played": 3,
"points": 7,
"wins": 2,
"draws": 1,
"losses": 0,
"goals_for": 6,
"goals_against": 2
},
{
"position": 3,
"team_id": 3068,
"team_name": "Arsenal",
"position_attribute": "Promotion - Champions League (Group Stage)",
"games_played": 3,
"points": 7,
"wins": 2,
"draws": 1,
"losses": 0,
"goals_for": 5,
"goals_against": 3
},
...
]
},
...
]
}
{
"id": 4138,
"name": "Liverpool",
"transfers": {
"transfers_in": [
{
"player_id": 27537,
"player_name": "L. Clarkson",
"from_team": {
"id": 2717,
"name": "Aberdeen"
},
"transfer_date": "14-06-2023",
"transfer_type": "n/a",
"transfer_amount": 0,
"transfer_currency": "usd"
},
{
"player_id": 61790,
"player_name": "A. Mac Allister",
"from_team": {
"id": 3200,
"name": "Brighton & Hove Albion"
},
"transfer_date": "14-06-2023",
"transfer_type": "transfer-fee",
"transfer_amount": 42000000,
"transfer_currency": "eur"
},
...
],
"transfers_out": [
{
"player_id": 27486,
"player_name": "R. Williams",
"to_team": {
"id": 2717,
"name": "Aberdeen"
},
"transfer_date": "28-06-2023",
"transfer_type": "loan",
"transfer_amount": 0,
"transfer_currency": "usd"
},
{
"player_id": 27537,
"player_name": "L. Clarkson",
"to_team": {
"id": 2717,
"name": "Aberdeen"
},
"transfer_date": "15-06-2023",
"transfer_type": "n/a",
"transfer_amount": 0,
"transfer_currency": "usd"
},
...
]
}
}