Match statistics
Last updated
Last updated
One of the most frequently asked questions is: “How can I get match statistics just like below?”.
Please note that above is just a snippet of the match stats we cover.
There are many possible ways, thanks to the flexibility of our API.
As you've seen in our previous tutorials, every fixture has a unique id. Therefore, you can use one of our fixtures by id endpoints, or you can request them by date. In our fixtures tutorial, we’ve discussed all the different ways to access fixtures.
Now, as you have read in our includes tutorial, you can enrich the API response. If you want statistics, you can add the include stats
.
Nothing more, nothing less.
Let’s say you want the statistics of matches that are currently live. As you know you can use our livescores/now endpoint to request all the in-play fixtures:
The only thing you need to do is to add the stats
include:
The stats
include will enrich your response with all the match statistics of all games that are currently live.
If you only want to have stats for certain live fixtures, then you can filter. For instance, if you only want all the live matches from the English Premier League (league id: 8) with stats, you can use this request:
Field
Description
team_id
The unique id of the team to which the stats belong
fixture_id
A unique fixture id
shots
Opens an array containing the shots statistics
ongoal
The number of shots on goal in a fixture of one team
blocked
The times the opponent has blocked a shot
offgoal
The number of shots off goal in a fixture of one team
insidebox
The number of shots from inside the box (16-meter area) in a fixture of one team
outsidebox
The number of shots from outside the box (16-meter area) in a fixture of one team
passes
Opens an array containing the pass statistics
total
The number of passes in a fixture of one team
accurate
The total accurate passes in a fixture of one team
percentage
The accurate passes (in percentage %) in a fixture of one team
attacks
Opens an array containing the attacks statistics
attacks
The attacks in a fixture of one team
dangerous_attacks
The dangerous attacks in a fixture of one team. A dangerous attack is calculated when the attack almost resulted in a goal.
fouls
The number of fouls committed of one team
corners
The number of corners of one team
offsides
The number of times one team was flagged offside by the (assistant) referee
possesiontime
The number of times one team has had the ball in percentage
yellowcards
The number of yellow cards for one team
yellowredcards
The total times a second yellow card has resulted in a red card for one team
redcards
The total number of red cards for one team
saves
The total number of saves the goalkeeper of one team has made
substitutions
The total number of substitutions of one team
goal_kicks
The number of goal kicks for one team
goal_attempts
The number of goal attempt of one team
free_kick
The number of free kicks for one team
throw_in
The amount of throw ins for one team
ball_safe
This is the number of times the attacking team plays the ball back to their own half.
For example:
Barcelona is on the attack and are on the half of the opposition, but decide to pass the ball back to their own half.
This is ball safe 1.
goals
The number of goals for one team
penalties
The number of penalties for one team
injuries
The number of injuries for one team