Match statistics
On this page, we will show how you can use our football API to get match statistics.
Any football website would be incomplete without being able to show its visitors the statistics of the match. In fact, this applies to any football-related product, including mobile apps, TV shows, and even radio shows. Match statistics allow people to compare the teams and predict the outcome of the game in real-time. Using our head to head football api endpoint, you can compare the two teams before the start of the match. Using our statistics football api endpoint you can compare them as their rivalry unfolds. That is why we are glad to have this api endpoint included in our service.
Endpoint
When using our football api endpoint for match statistics all you need is the id
of the match that you get from the livescore api endpoint and the history api endpoint. The match needs to have started in order to have statistics available. Thus, this api endpoint will not work for fixtures that you get our fixtures api endpoint.
In the example above, our football API will provide you with the match statistics of the game between Liverpool and Manchester City. The response is a list of all the statistics that we have for this match for both teams. An example JSON
response is shown below. Then follows an explanation of what is what in it. First, we will look at the parameters table, which luckily contains only one parameter.
Parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
match_id | number | 1 | 172252 | The id of the match which statistics we are going to get. |
Response
The response, from the match statistics football api endpoint, is pretty concise and straight forward, but we are going to explain it just in case. In it, the key that is in the data array is the type of the statistic that we providing and the value is either null
or it is two numbers separated by a colon. The first value is for the home team and the second value is for the away team. When it comes to the yellow and red cards, using this api endpoint you will get the number of cards, and if you want to get the details of which players received the cards, you can use our match events api endpoint.
{
"success": true,
"data": {
"yellow_cards": "0:1",
"red_cards": "0:0",
"substitutions": "3:1",
"possesion": "48:52",
"free_kicks": "10:13",
"goal_kicks": "11:6",
"throw_ins": "21:18",
"offsides": "3:5",
"corners": "4:13",
"shots_on_target": "5:3",
"shots_off_target": "4:8",
"attempts_on_goal": "9:11",
"saves": "2:2",
"fauls": "10:5",
"treatments": "1:0",
"penalties": "0:0",
"shots_blocked": "3:8",
"dangerous_attacks": "33:56",
"attacks": "82:91"
}
}
Name | Type | Example | Description |
---|---|---|---|
attacks | string | 82:91 | How many attacks the teams started in total. |
attempts_on_goal | string | 9:11 | The total numbers of attempts on goal. It is the 2 previous fields added together. |
corners | string | 4:13 | The number of corner kicks for each team. |
dangerous_attacks | string | 33:56 | How many of the attacks were dangerous. |
fauls | string | 10:5 | How many times the teams violated the rules. |
free_kicks | string | 10:13 | The numbers of free kicks. |
goal_kicks | string | 11:6 | The number of goal kicks |
offsides | string | 3:5 | The number of times when players were in an offside position. |
penalties | string | 0:0 | How many penalties the teams did. |
possesion | string | 48:52 | The possession of the ball in percentages. The sum of the 2 numbers is always 100%. |
red_cards | string | 0:0 | The number of red cards the teams received. |
saves | string | 2:2 | How many times the keepers have made a save. |
shots_blocked | string | 3:8 | How many times a player blocked the shot of an opponent |
shots_off_target | string | 4:8 | How many times a shot was outside the goal. |
shots_on_target | string | 5:3 | How many times a shot was inside the goal. |
substitutions | string | 3:1 | The number of substituted players in each team. |
throw_ins | string | 21:18 | How many times each team received a thrown in. |
treatments | string | 1:0 | The number of times when players were injured and there was a treatment on the field |
yellow_cards | string | 0:1 | The number of yellow cards the teams received. |