Building URLs with GET parameters
In order to get our XML sheets with scores you need to build a corresponding URL with GET parameters, specifying what data to be included in the sheet.
Main request URL: http://livescorefeedxml.com/data/data.php?games=all&
Important: In order to retreive our sheets with sports data you need to have permanent redirect 301 enabled in the function you are using for getting the XMLs from our server.
This means that you should one of the following:
1) Use file_get_contents();
2) Use PHP CURL with curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
Note: By default in trial accounts all games are enabled in the feed.
If you have started your subscription for livescores only or fixtures only, you must change the value of this parameter. Please, have in mind that the key and games parameters are required and if you don’t specify them in the URL, no data will be displayed in the feed!
If you see an error message for error in the XML structure in your browser, have in mind that this is not actually error in the XML structure, but an error message from our server, telling you that something is wrong with the parameters, specified in the URL request. In order to view this message, please use the “view page source” feauture of your browser.
Please, add the parrameters you can see in the table below to the main request URL in order to get the desired content of feed in the XML sheet.
|key||Your license key, allowing you to access the XML sheets.||Your license key|
|date||Date restriction for the feed. If you specify this parameter you will get games
only for the selected date. If you don’t specify this parameter, you will see all games for today.
|Any date in YYYY-MM-DD format.|
|country_id||Country restriction for the feed. Can be used in combination with the date parameter. If you specify country_id and date you will get games
only for the selected date and country. If you specify only country_id you will get games for today which belong to the defined country.
|Click here to view the country ids.|
|timezone_id||Modifies the start hours of the games. If not defined, the feeds are displayed by default in the UTC/GMT +2 hours timezone.||Click here to view the timezone ids.|
|games||This parameter specifies if in the feed to be included livescore games, fixtures games, or all games. Note: Livescore option provides only games in +/- 3 days range.||livescores, fixtures, all|
|standings||Specifies if standings of the championships to be displayed. If set to true, standings are shown, otherwise standings are omitted.||true, false|
|eventinfo||Specifies if detailed information about scoring minutes, goal scorers and cards to be displayed for each game. If set to true, details are shown, otherwise details are omitted.||true, false|
|lineups||Specifies if lineups to be included in the feed. If set to true, lineups are shown, otherwise they are omitted.||true, false|
|livestats||Specifies if live comentaries and livestats to be included in the feed. If set to true, they are shown, otherwise they are omitted.||true, false|
|profiles||Specifies if player profiles and image names to be included in the feed. If set to true, they are shown, otherwise they are omitted.||true, false|
|topscorers||If set to true, topscorers are shown, otherwise they are omitted.||true, false|
|h2h||Shows head 2 head statistics between the two teams for a specified game. The value of this parameter must be a valid game id, which you can take from the main feed.||any valid game id|
|format||Specifies the format in which the feeds to be represented – JSON or XML. If not defined, by default the feeds are represented in a XML format.||xml, json|