Getting fixtures

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.

This soccer API endpoint supports filtering by league, but they are now deprecated to get optimal results, please switch to using competitions instead. You can find more about competitions on the football competitions documentation page.

The fixtures soccer API endpoint supports teams names in various languages to find out more about this. Read through our documentation on language support.

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.


ENDPOINT


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.


GET:

PARAMETERS


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.


NameTypeRequiredExampleDescription
langstringfa2 letter ISO 639-1 language code
pagenumber2Results in sowing only fixtures on that page with results
competition_idnumber16the id of the competition in which the match will take place
teamnumber19Filters the fixtures by the a specific team
roundnumber/string19/R16Filters 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
datedate/string2018-05-15/todayResults 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.


RESPONSE


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.


NameTypeExampleDescription
timetime12:00the 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.
roundinteger/string25/QFthe 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_namestringJuventus FCthe name of the home team in the match.
away_namestringSSC Napolithe name of the away team in the match.
locationstringTorinothe place or stadium where the match is going to be played or empty if we do not have enough data.
league_idinteger5the id of the league to which the match belongs to.
home_Idnumber2089the team id of the home team
away_idnumber2090the team id of the visiting team
competition_idnumber16the id of the competition in which the match takes place
competitionobjectContains 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_pageurlif 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_pageurlif 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.
datedate2018-05-15the 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
    }
}


EXAMPLES


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()