Livescores
Display all livescores of your favourite leagues and teams. The livescore endpoints allow you to retrieve up-to-date livescores that interest you quickly.
You can choose a variety of endpoints to retrieve the livescores of that particular moment.
This section will briefly discuss all the options available to request livescores.
An overview of all available options:
GET All Inplay Livescores: returns all the inplay fixtures.
GET All Livescores: Returns the fixtures 15 minutes before the game starts. It will also disappear 15 minutes after the game is finished.
GET Latest Updated Livescores: returns all livescores that have received updates within 10 seconds.
For the Livescore endpoints this is the base URL:
https://api.sportmonks.com/v3/football/livescores/
Per endpoint the rest of the URL requires additional information. We will explain this per endpoint.
Requesting livescores
GET All Inplay Livescores
Returns all the live fixtures. For example, if you want all leagues' matches within your subscription that will start within 15 minutes or are already live or have finished in the past 15 minutes. This comes in handy when you want all the actual games that are inplay or will be soon. Also, the matches that just ended
https://api.sportmonks.com/v3/football/livescores/
inplay
This response is different for any plan. If you are subscribed to the free plan, you will receive matches of the Danish Superliga and the Scottish Premiership.
Let’s evaluate the response:
id
: the unique fixture idsport_id
: the sport related to the fixtureleague_id
: the league the fixture belongs toseason_id
: refers to the season the fixture belongs tostage_id
: refers to the stage the fixture is played ingroup_id
: refers to the group the fixture is played inaggregate_id
: refers to the aggregate the fixture is played atround_id
: refers to the round the fixture is played atstate_id
: refers to the state the fixture is played atvenue_id
: refers to the venue the fixture is played atname
: represents the name of the fixturestarting_at
: datetime object representing the start timeresult_info
: textual representation of the final result infoleg
: represents the leg of the fixturedetails
: represents details about the fixturelength
: length of the fixture (minutes)placeholder
: indicates if the fixture is a placeholderlast_processed_at: t
he date and time the fixture was last processedhas_odds:
indicates if the fixture has odds availablestarting_at_timestamp
: the starting timestamp
Please be aware that in the livescores endpoint, the fixtures will be available 15 minutes before the match has started and 15 mins after it has ended.
GET All Livescores
Returns all the fixtures of the current day. This will give an overview of all the matches that will be played on the current day. The number of matches will be higher than the previous endpoint which only gives live matches and matches that will start in 15 minutes or have ended in the past 15 minutes. Therefore, this is the best endpoint to use if you want to show all matches that will happen today.
The URL to request all the fixtures of the current day is the same as the base URL All you have to do is authorize the request with your API token. Check our authentication section for more info.
Please note that the response is based on the leagues in your plan. Therefore, if you’re missing a specific one, it’s possible that you don’t have access to it. Check our league tutorial for more info.
GET Last Updated Livescores
Your response will be smaller than the “all livescores” response and only returns you all livescores that have received updates within 10 seconds. This way, you will see the most important changes very quickly.
All you have to do is add the latest characteristic to the base URL:
https://api.sportmonks.com/v3/football/livescores/
latest
Adding useful information
As you’ve learnt in the includes tutorial, you can enrich your request with includes. This section will discuss some of the most common requests used on the livescores endpoints.
First of all, you can find a list of all available includes on the endpoint pages. The most common includes are:
scores
participants
statistics.type
events
lineups
This results in the below request:
Selecting and filtering
In our filtering tutorial you’ve learnt how to select specific fields or filter only on the data you’re interested in. Our API returns a set of data related to the fixtures by default. We can imagine you’re not interested in all the data the API returns.
Let’s say you’re only interested in the fixtures of the Danish Superliga (league id: 172).
Check our filtering tutorial for more tips and tricks.
Last updated