Getting past matches beta

On this page you can find the way to use our historical API endpoints. Get the information about past matches that have ended.


On this page, we are explaining how you can get the list with football matches and scores that have been played back time for which there is available information. The possibilities that you have to filter and traverse our historical football data.

Endpoint

In order to get the list of all historical football matches data from our api the only thing you need to do is the call the url bellow. We are supporting historical data for national leagues, cup matches, international leagues from all over the globe. In this example, we have used the demo api key and secret pair. If you login in, you will see all examples with your own api key and api secret

GET:


Parameters

The history API endpoint supports several parameters that you can use to filter the football 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.

Parameter Type Option Effect
from yyyy-mm-dd optional Get past matches from this date onwards.
to yyyy-mm-dd optional Get past matches data until this date included.
league number optional Get past matches data for a certain league with the provided id
page number optional If there are pages you can go to a specici page using this parameter

Response

A response to a request will contain in total maximum of 30 past matches data for the provided parameters in the query.

  • id - the id of the match it is the same as the id of the match when it was available in our livescore endpoints. This ID differs from the fixture id.
  • home_name - the name of the home side team
  • away_name - the name of the away side team
  • ht_score - the score of the match when half time was reached
  • ft_score - the score of the match when 90 minutes were reached
  • et_score - the score of the match after 120 minutes of extra time
  • time - the time in minutes. It should always be FT
  • league_id - the id of the league to which the game belonged
  • status - the status of the match it should always be FINISHED
  • added - the date and time when the soccer match was added to our livescore api data endpoint
  • last_changed - the date and time when the last modification of the match records was made
  • home_id - the id of the home team, 0 if not avaialbe
  • away_id- the id of the away team, 0 if not available
{
    "success": true,
    "data": {
        "match": [
            {
                "id": "1",
                "date": "2017-01-13",
                "home_name": "Vaalerenga",
                "away_name": "Asker",
                "score": "1 - 0",
                "ht_score": "0 - 0",
                "ft_score": "",
                "et_score": "1 - 0",
                "time": "FT",
                "league_id": "5",
                "status": "FINISHED",
                "added": "2017-01-13 11:56:01",
                "last_changed": "2017-01-13 13:21:02",
                "home_id": "0",
                "away_id": "0"
            },
            {
                "id": "2",
                "date": "2017-01-13",
                "home_name": "Al Hilal",
                "away_name": "FC Rostov",
                "score": "0 - 4",
                "ht_score": "0 - 1",
                "ft_score": "",
                "et_score": "0 - 4",
                "time": "FT",
                "league_id": "5",
                "status": "FINISHED",
                "added": "2017-01-13 11:56:01",
                "last_changed": "2017-01-13 13:53:06",
                "home_id": "0",
                "away_id": "0"
            }
        ]
    }
}


Examples

The following examples show you how to use this endpoint in various programming languages without any filters provided. In this example, we have used the demo api key and secret pair. If you login in, you will see all examples with your own api key and api secret

cUrl curl -XGET http://livescore-api.com/api-client/scores/history.json?key=demo_key\&secret=demo_secret
PHP <?php file_get_contents('http://livescore-api.com/api-client/scores/history.json?key=demo_key&secret=demo_secret') ?>
Python import urllib2 req = urllib2.Request('http://livescore-api.com/api-client/scores/history.json?key=demo_key&secret=demo_secret') response = urllib2.urlopen(req) print response.read()

Copied
Feedback