In this reference page, we show you how you can the list of fixtures that we have for all competitions and how to interpret the data that our soccer API provides you.
On this page, we are explaining how you can get the list with currently available fixtures. Also, the possibilities that you have to filter and traverse the football fixtures data.
NOTE: The id
of the fixture will not be the id of the match when the match starts or finishes, but there is a filed in the data provided by the live scores api endpoint that is called fixture_id
, which indicates to which fixture the match is related to. The same thing applies for the football history matches api endpoint. There you can also find the data field fixture_id
and the id of the live-score match ID
and the history match ID
is always the same.
In order, to get the list of all fixtures that our soccer API feed supports the only thing you need to do is the call the URL below. We are supporting fixtures for 400+ national and international competitions all over the globe. In this example, we have used your api key and secret pair. If you copy the URL it will work straight away.
The fixtures API endpoint supports several parameters that you can use to filter data and traverse through it at your convenience. The parameters are listed in the table below. You can use the parameters together as well as separately.
Name | Type | Required | Example | Description |
---|---|---|---|---|
lang | string | fa | 2 letter ISO 639-1 language code | |
page | number | 2 | Results in sowing only fixtures on that page with results | |
competition_id | number | 16 | the id of the competition in which the match will take place | |
team | number | 19 | Filters the fixtures by the a specific team | |
round | number/string | 19/R16 | Filters the fixtures by the a specific round if the league supports one. It could be a number like 1, 5 or 10, and if could also be R16, QF, SF and similar | |
date | date/string | 2018-05-15/today | Results in showing only fixtures on that date. If you provide today as a value, our soccer API will return only the fixtures for today. |
Our soccer API now transitioned to using competitions and leagues are deprecated. If your code uses leagues it will continue to work but for new users, only the competition filtering will be functioning.
A response to a request will contain in total maximum of 30 fixtures for the provided parameters in the query URL. If you would like to go further in the future you can use the next page as provided by the response. If you would like to go back then you can use the previous page link provided by the response.
Name | Type | Example | Description |
---|---|---|---|
time | time | 12:00 | the kick-off time of the football match. If we do not have accurate data you will see only zeros. For example 00:00 . All start dates and times are in the UTC timezone. |
round | integer/string | 25/QF | the round of the match (a.k.a matchday) of the soccer game. If we do not have accurate data you will see 999 as a round number. It could also contain a string representation of the round if it is a direct elimination cup. For example, QF for Quarter-Finals. |
home_name | string | Juventus FC | the name of the home team in the match. |
away_name | string | SSC Napoli | the name of the away team in the match. |
location | string | Torino | the place or stadium where the match is going to be played or empty if we do not have enough data. |
league_id | integer | 5 | the id of the league to which the match belongs to. |
home_Id | number | 2089 | the team id of the home team |
away_id | number | 2090 | the team id of the visiting team |
competition_id | number | 16 | the id of the competition in which the match takes place |
competition | object | Contains information about the football competition to which the fixture belongs so you do not need to make a separate request to get the name of the competition | |
next_page | url | if there are more than 30 matches that satisfy your filtering request you will be able to go to the next page with results following this link. If there is no next page this field will contain false . | |
prev_page | url | if there are more than 30 matches that satisfy your filtering request and you have traversed into further pages, you will be able to go to the previous page with results following this link. If there is no previous page this field will contain false . | |
date | date | 2018-05-15 | the data when the football match is going to be played. |
{
"success": true,
"data": {
"fixtures": [
{
"id": "1313770",
"date": "2019-10-30",
"time": "17:00:00",
"round": "R16",
"home_name": "Paide Linnameeskond",
"away_name": "Flora Tallinn",
"location": "",
"league_id": "512",
"competition_id": "157",
"home_id": "1830",
"away_id": "1826",
"competition": {
"id": "157",
"name": "Cup"
},
"league": {
"id": "512",
"name": "Cup",
"country_id": "25"
}
},
{
"id": "1277436",
"date": "2019-10-30",
"time": "17:00:00",
"round": "34",
"home_name": "Riga FC",
"away_name": "RFS",
"location": "",
"league_id": "37",
"competition_id": "20",
"home_id": "1910",
"away_id": "1911",
"competition": {
"id": "20",
"name": "Virsliga"
},
"league": {
"id": "37",
"name": "Virsliga",
"country_id": "24"
}
},
{
"id": "1302807",
"date": "2019-10-30",
"time": "17:30:00",
"round": "2R",
"home_name": "Wolfsburg",
"away_name": "RasenBallsport Leipzig",
"location": "VOLKSWAGEN ARENA",
"league_id": "69",
"competition_id": "167",
"home_id": "52",
"away_id": "44",
"competition": {
"id": "167",
"name": "DFB Cup"
},
"league": {
"id": "69",
"name": "DFB Cup",
"country_id": "1"
}
}
],
"next_page": "https:\/\/livescore-api.com\/api-client\/fixtures\/matches.json?key=demo_key&secret=demo_secret&v=&page=2",
"prev_page": false
}
}
The following examples show you how to use this endpoint in various programming languages without any filters provided in order to get all the fixtures. In this example, we have used your api key and secret pair. If you copy the URL it will work straight away. cUrl:
curl -XGET https://livescore-api.com/api-client/fixtures/matches.json?key=demo_key\\&secret=demo_secret
PHP:
file_get_contents('https://livescore-api.com/api-client/fixtures/matches.json?key=demo_key\&secret=demo_secret');
Python:
import urllib2
req = urllib2.Request('https://livescore-api.com/api-client/fixtures/matches.json?key=demo_key\&secret=demo_secret')
response = urllib2.urlopen(req)
print response.read()
In the examples below we show how you can get all the fixtures for today
using our fixtures soccer API date filter.
cUrl:
curl -XGET https://livescore-api.com/api-client/fixtures/matches.json?date=today&key=demo_key\\&secret=demo_secret
PHP:
file_get_contents('https://livescore-api.com/api-client/fixtures/matches.json?date=today&key=demo_key\&secret=demo_secret');
Python:
import urllib2
req = urllib2.Request('https://livescore-api.com/api-client/fixtures/matches.json?date=today&key=demo_key\&secret=demo_secret')
response = urllib2.urlopen(req)
print response.read()