XMLSOCCER.COM Web Developer Manual Written by Michael Nielsen

XMLSOCCER.COM Web Developer
Manual
Written by Michael Nielsen
Contactinformation and instructions is on the last page
P REFACE
This manual is written to give you, a user of XMLSOCCER.COM, an introduction of the
various methods available on our webservice. With some clever design and usage, it is
possible to get the desired data from our service – this document is an example of that.
First I will introduce you to the vast dataset that XMLSOCCER.COM is in possession of. This
will hopefully get your mouth dripping, while thinking of the many possibilities this gives
you, as a developer. The goal of this project of mine is, to make a lot of data available to a
lot of users as cheap as possible. As long as there are subscribers to the service, I will keep
developing the project by creating new functions and adding new data by popular demand.
That means, that if there is one particular function you would like the web service to
support, write me! I might figure something out.
After the introduction, I will explain the various methods currently supported.
In the end of the document, there will be code-example in various languages.
D EFINITIONS
Name
Resultset
Webservice, API
Input
Description
Dataset returned by the Web Service
This webservice
Your input to the API
C ONTENTS
Preface ................................................................................................................................................................................ 2
Definitions....................................................................................................................................................................... 2
Links .................................................................................................................................................................................... 5
Introduction ........................................................................................................................................................................ 6
Important information .................................................................................................................................................... 6
Demo versus paying service ....................................................................................................................................... 6
Input specification ...................................................................................................................................................... 7
Available data ..................................................................................................................................................................... 7
Historic Data ................................................................................................................................................................... 7
Current Data ................................................................................................................................................................... 7
Future Data ..................................................................................................................................................................... 8
Leagues ............................................................................................................................................................................... 9
Teams.................................................................................................................................................................................. 9
Access from 5 IPs ................................................................................................................................................................ 9
Time interval limitations ..................................................................................................................................................... 9
Consuming Webservice .NET ............................................................................................................................................ 10
Create a new Web Site ................................................................................................................................................. 10
Add Service Reference .................................................................................................................................................. 12
API Operations .................................................................................................................................................................. 18
GetHistoricMatchesByLeagueAndSeason ..................................................................................................................... 18
Resultset example ..................................................................................................................................................... 18
GetHistoricMatchesByTeamAndDateInterval ............................................................................................................... 19
Resultset example ..................................................................................................................................................... 19
GetHistoricMatchesByLeagueAndDateInterval ............................................................................................................ 20
Resultset example ..................................................................................................................................................... 21
GetHistoricMatchesByID ............................................................................................................................................... 21
Resultset example ..................................................................................................................................................... 22
GetHistoricMatchesByTeamsAndDateInterval ............................................................................................................. 22
Resultset example ..................................................................................................................................................... 22
GetFixturesByDateInterval............................................................................................................................................ 24
Resultset example ..................................................................................................................................................... 24
GetFixturesByDateIntervalAndLeague .......................................................................................................................... 25
Resultset example ..................................................................................................................................................... 25
GetAllTeams .................................................................................................................................................................. 26
Resultset example ..................................................................................................................................................... 26
GetAllTeamsByLeagueAndSeason ................................................................................................................................ 26
Resultset example ..................................................................................................................................................... 26
GetAllLeagues ............................................................................................................................................................... 27
Resultset example ..................................................................................................................................................... 27
GetLeagueStandingsBySeason ...................................................................................................................................... 28
Resultset example ..................................................................................................................................................... 28
GetLiveScore ................................................................................................................................................................. 29
Resultset example ..................................................................................................................................................... 29
GetLiveScoreByLeague.................................................................................................................................................. 31
Resultset example ..................................................................................................................................................... 31
GetTeam ....................................................................................................................................................................... 31
Resultset example ..................................................................................................................................................... 31
Code Example ........................................................................................................................................................... 32
CheckApiKey ................................................................................................................................................................. 32
Resultset example ..................................................................................................................................................... 32
Contact information ......................................................................................................................................................... 33
L INKS
WSDL
List of Teams
List of Leagues
Documentation .pdf
Documentation overview
Formal description of API
List of all teams
List of all leagues
Documentation (this document)
Developers hub
I NTRODUCTION
XMLSOCCER.COM is a website that collects sports-data concerning soccer, and makes them
available in a structural language, XML, to subscribers/customers (users) of the website
through an advanced Web Service. This is interesting because it enables a user’s application
or website to understand the data given from XMLSOCCER.COM as XML is easily
interpreted by machines.
I call the Web Service “advanced” because it merely doesn’t provide the user with data by
calling it; you have to specify some parameters for it, which is why this document is
necessary to make it work. All functionality in the Web Service requires your unique API-key
(which you receive for FREE after signing up). Some functions, depending on their
complexity, require more information from you before it makes sense to provide you with a
data result set.
As a rule, the more parameters a function requires, the more specialized is the resultset
that are returned to you. For instance, the simplest function on the Web Service is called
“GetTeams”. It simply takes the ApiKey as the only input and returns a complete list of all
soccer teams in the database. Another function, that are a bit more complex, is called
“GetHistoricMatchesByTeamAndDateInterval” which require the team-ID and two dates
(startDate and endDate) as long as the mandatory ApiKey as input. This will return all
matches that one particularly team have played within a time-interval you specify. This
could be useful if you want to show a team’s past results.
XML-schemas are available on the website for download, but will also always be returned
within the resultset itself.
I MPORTANT
D E MO
IN FORMATION
V E R S US P A YI N G SE RV I C E
There are two different webservices available: One for paying members, and one for demo
users. The only difference is, that the demo-webservice will only grab data concerning the
Scottish Premier League. All operations are otherwise alike. This means that whenever you
are ready, you can easily switch to the pro webservice by simply changing the URL of the
service. The webservices are located at:
Pro Webservice
http://www.xmlsoccer.com/FootballData.asm
Demo Webservice
http://www.xmlsoccer.com/FootballDataDemo.asmx
I N P UT
SP E CI FI C AT I O N
Type
DateTimeString
ApiKey
TeamName, TeamId etc.
Format
YYYY-MM-DD
50 random letters
Team Name (string)
League
League Name
(String)
Example
2012-12-25
ABCDEFGHIJKLMN…..50
Liverpool, Man United
See list at
www.xmlsoccer.com/WebTeams.aspx
English Premier League
See list at
www.xmlsoccer.com/WebLeagues.aspx
A VAILABLE DATA
The data we have available here can be divided into four categories
1.
2.
3.
4.
Historic data (past match data and market details)
Current data (livescore)
Future data (fixtures and market details)
Static data (league and team information)
H ISTORIC D ATA
A quite extensive database has been build up in former years and holds data from many
thousand soccer matches from European leagues. Most leagues have data from ALL
matches the past five seasons or more and each match have detailed information (not
limited to) such as:

Team names/Id’s

Date

Goals

Penalties

Corners

Shots on and off target

Referee

Yellow and red cards

Lineups

Scoredetails (player names)
This data makes it possible to create interesting (and perhaps shocking) statistics on which
teams are best, or which referee is nicest towards the home-team. And how much does the
amount of cards depend on the referee?
This historical data also gives a nice opportunity to make some nice match prediction
models. You decide!
Historic data is updated approximately 24-48 hours after events, so have some patients
before all the data for all matches are added to the database.
C URRENT D ATA
Livescore data is available approximately 1 hour before match schedule and is available
around three hours after the final whistle. After that, the data becomes unavailable until
the match shows up in “Historic Data”. The data for livescore’s is, not surprising, not as
detailed as that of historic matches. When a match is being played, the following data is
available:

Team names/Id’s

Time (in minutes)

Score

Location

League

Country

Lineups

Scoredetails (player names)
F UTURE D ATA
Fixtures is available for all leagues (see specifications at
http://www.xmlsoccer.com/WebLeagues.aspx). It is possible to receive all fixture data for a
given period or limited to a single league in a given period).
Bear in mind that bookmakers rarely place odds more than 5 days prior a match, and you
should therefore not expect Odds-data for matches that is later than 5 days from your
request. Lineups are updated on matchday.
L EAGUES
A complete list of leagues can be obtained from the API or by simply visiting
http://www.xmlsoccer.com/WebLeagues.aspx
Some API-operations require specification of league. You have to use the exact same name
when using the API as is shown on that page.
It is now also possible to use the numeric ID for the league.
T EAMS
A complete list of teams can be obtained from the API or by simply visiting
http://www.xmlsoccer.com/WebTeams.aspx
Some API-operations require specification of team. You have to use the exact same name
when using the API as is shown on that page.
It is now also possible to use the numeric ID for the team.
A CCESS FROM 5 IP S
You are only allowed to use this service for one website/project. To allow flexibility in
development you are, however, allowed access to the API from 5 different IP’s. These IP’s
are maintained from your Account page. This applies for both the Pro and Demo service.
T IME INTERVAL LIMITATIONS
The following service methods have minimum time intervals between each request.
Service Method
Minimum Time interval (seconds)
GetLiveScore
30
GetLiveScoreByLeague
30
GetHistoricMatchesByLeagueAndSeason
21600
GetAllTeams
21600
GetAllLeagues
21600
GetLeagueStandingsBySeason
21600
Methods not listed here, does not have any interval limitations at the moment.
C ONSUMING W EBSERVICE .NET
This section shows an example on how to consume the xmlsoccer.com from an empty c#
.net 4.0 web application.
Goal: Create a Livescore overview with matches currently being played using my own
database, successfully uncoupling my website from xmlsoccer.com webservice.
What you need:

Visual Studio (I use VS2010)

Able to understand simple C# and LINQ

Basic understanding how to read XML-files

45 minutes of your time
This is the steps we take:
1.
2.
3.
4.
Consume Webservice
Create simple MS SQL-database tables for matches and teams and uses SQL to
LINQ Classes on these tables
Parse XML and saves data to database
Retrieves data as LINQ objects and binds them to Gridview
C REATE
A NEW
W EB S ITE
Fire up Microsoft Visual Studio and create a new Web Site.
This new website only has one purpose: Show livescores from all leagues. This is why I
choose to call it: “MyLivescoreWebsite”. Fancy, ey? I select “ASP.NET Empty Web Site”
under “Visual C#” and click OK.
The project is rather empty, in fact the solution explorer looks rather depressing. To
enlighten the project, I add my entry page: Default.aspx.
I put in “LiveScore Consuming example” in the HTML title tags, and add a standard Gridview
to the HTML markup and add an update button. I call my GridView “GridViewLiveScore”.
Check it out, below:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>LiveScore Consuming example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>This is my wonderful livescore website ;-).</p>
<p><asp:GridView ID="GridViewLiveScore" runat="server"></asp:GridView></p>
<asp:Label ID="LabelNoMatches" runat="server" Text="No matches is being played"></asp:Label>
<asp:Button ID="ButtonUpdate" runat="server" Text="Update Score"
onclick="ButtonUpdate_Click" />
</div>
</form>
</body>
</html>
A DD S ERVICE R EFERENCE
Now it’s time to see some magic!
First rightclick on your solution and select “Add Service Reference”.
F IGURE 1 - A DD S ERVICE R EFERENCE : F IRST STEP
In the dialog that show up, you need to enter the following information (See Figure 2):
Adress: http://www.xmlsoccer.com/FootballData.asmx. (Or, if you are using the DEMO
service: http://www.xmlsoccer.com/FootballDataDemo.asmx)
In the namespace you put in XMLSoccerCOM (or something similar) and click “Go”. It takes
a few seconds to load depending on your internet connection. When it is finished, expand
the left-side “FootballData” (or “FootballDataDemo”) and select “FootballDataHttpPost” as
that is what we will be using in this project. Now simply click “OK”.
F IGURE 2 - A DD S ERVICE REFERENCE : S TEP 2
Now that I have added my servicedefinition to my project, I am ready to start developing. I
have made my own database that includes the following table and their fields:

Matches
o Id (my own ID)
o HomeTeam
o AwayTeam
o HomeGoals
o AwayGoals
o HomeGoalDetails
o AwayGoalDetails
o XmlSoccerId (ID from service)
o Date
I’m using LINQ for SQL, and adds it by rightclicking on my project and selects “add item”. In
the following screen, I choose “LINQ to SQL Classes” – gives it the name
“MyLiveScoreDb.dbml” (see Figur 3 - Add LINQ To SQL Classes). I accepts that Visual Studio
wants to add it in the App_Code folder.
F IGUR 3 - A DD LINQ T O SQL C LASSES
After I added my LINQ Classes, I need to add my two tables that I already created in MS SQL
database. I do this by doubleclick on “MyLiveScoreDb.dbml” in the solution explorer and
picks out the two tables from the Server Explorer. This looks like this:
F IGUR 4 – M Y TWO TABLES IN M Y L IVE S CORE D B . DBML
Now that I have my LINQ Classes ready, I simply need to connect to the webservice, parse
the XML into my LINQ objects and save them to the database. This I will do whenever I click
on a button. In reality I would either have a windows Form application make the updates to
my database, or I will have a table with timestamp values for the various calls I make as I do
not want to spam the xmlsoccer.com webservice.
I make a couple methods to archive this. First I retrieves the XML node from the service and
converts it as a XDocument:
using System.Xml.Linq;
using System.Xml;
private XDocument GetLiveScoreDocument()
{
XMLSoccerCOM.FootballDataSoapClient serviceClient = new XMLSoccerCOM.FootballDataSoapClient();
var node = serviceClient.GetLiveScore(apiKey);
XDocument xmlDoc = new XDocument();
xmlDoc = XDocument.Load(new XmlNodeReader(node));
return xmlDoc;
}
Next, I parse the XDocument and saves it to my database:
private void SaveUpdateMatchesToDb(XDocument xDoc)
{
XNamespace ns = ""; //No namespace is used
var matchesFromXmlSoccer = from match in xDoc.Descendants(ns + "Match") //I'm only interested in
Match details
select new
{
HomeTeam = match.Descendants(ns + "Hometeam").FirstOrDefault().Value,
AwayTeam = match.Descendants(ns + "Awayteam").FirstOrDefault().Value,
HomeGoals = match.Descendants(ns + "HomeGoals").FirstOrDefault().Value,
AwayGoals = match.Descendants(ns + "AwayGoals").FirstOrDefault().Value,
HomeGoalDetails = match.Descendants(ns +
"HomeGoalDetails").FirstOrDefault().Value,
AwayGoalDetails = match.Descendants(ns +
"AwayGoalDetails").FirstOrDefault().Value,
Time = match.Descendants(ns + "Time").FirstOrDefault().Value,
XmlSoccerId = match.Descendants(ns + "Id").FirstOrDefault().Value,
Date = match.Descendants(ns + "Date").FirstOrDefault().Value
};
if (matchesFromXmlSoccer.Count() > 0) //If any matches are being played
{
MyLiveScoreDBDataContext dB = new MyLiveScoreDBDataContext(); //My LinQ SQL Classes data context
foreach(var matchFromXmlSoccer in matchesFromXmlSoccer) //For each match returned from the XML
{
Match matchToDb = new Match(); //Create new match and fill it with data from the XML-match
matchToDb.HomeTeam = matchFromXmlSoccer.HomeTeam;
matchToDb.AwayTeam = matchFromXmlSoccer.AwayTeam;
matchToDb.HomeGoals = Convert.ToInt32(matchFromXmlSoccer.HomeGoals);
matchToDb.AwayGoals = Convert.ToInt32(matchFromXmlSoccer.AwayGoals);
matchToDb.HomeGoalDetails = matchFromXmlSoccer.HomeGoalDetails;
matchToDb.AwayGoalDetails = matchFromXmlSoccer.AwayGoalDetails;
matchToDb.Time = matchFromXmlSoccer.Time;
matchToDb.XmlSoccerId = Convert.ToInt32(matchFromXmlSoccer.XmlSoccerId);
matchToDb.Date = Convert.ToDateTime(matchFromXmlSoccer.Date);
var existingMatchInDb =
(from c in dB.Matches
where c.XmlSoccerId == matchToDb.XmlSoccerId
select c).FirstOrDefault();
if(existingMatchInDb != null) //Check if any match existed in the db
existingMatchInDb = matchToDb; //It already existed, I'll just update it in.
else
dB.Matches.InsertOnSubmit(matchToDb); //It didn't exist - so I'll create it in my dB.
}
dB.SubmitChanges();
}
}
Both these functions are run when I click on my button:
Lastly, I’ll create the function that retrieves the data from my SQL database and binds it to
the gridview. This is run each time a user comes to my website.
protected void Page_Load(object sender, EventArgs e)
{
FillLiveScoreGridview();
}
private void FillLiveScoreGridview()
{
MyLiveScoreDBDataContext dB = new MyLiveScoreDBDataContext();
var matches = //Retrieve matches that is playing right now and will be played in the near future.
(from c in dB.Matches
where c.Date >= DateTime.Now.AddHours(-3) && c.Date <= DateTime.Now.AddHours(3)
select c);
if(matches.Count() > 0) //If any matches is being played, I bind them to my gridview. Otherwise I
show a message to the user.
{
GridViewLiveScore.DataSource = matches;
GridViewLiveScore.DataBind();
}
else
LabelNoMatches.Visible = true;
}
This is how it looks the first time I visit my site:
protected void ButtonUpdate_Click(object sender, EventArgs e)
{
XDocument xDoc = GetLiveScoreDocument();
SaveUpdateMatchesToDb(xDoc);
FillLiveScoreGridview();
}
After I click the button, my gridview is populated (also, I added some simple styling to the
gridview):
API O PERATIONS

CheckApiKey

GetAllLeagues

GetAllTeams

GetAllTeamsByLeagueAndSeaspn

GetFixturesByDateInterval

GetFixturesByDateIntervalAndLeague

GetHistoricMatchesByLeagueAndSeason

GetHistoricMatchesByLeagueAndDateInterval

GetHistoricMatchesByID

GetHistoricMatchesByFixtureMatchID

GetHistoricMatchesByTeamAndDateInterval

GetHistoricMatchesByTeamsAndDateInterval

GetLeagueStandingsBySeason

GetLiveScore

GetLiveScoreByLeague

GetTeam
G ET H ISTORIC M ATCHES B Y L EAGUE A ND S EASON
<s:element name="GetHistoricMatchesByTeamAndDateInterval">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="league" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="seasonDateString
" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing historic matches in a season.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetHistoricMatchesByLeagueAndSeason?ApiKey=YourAPIKey&league
=English Premier League& seasonDateString=1213
<XMLSOCCER.COM>
<Match>
<Id>22962</Id>
<FixtureMatch_Id>55645</FixtureMatch_Id>
<Date>2012-08-18T16:00:00+02:00</Date>
<League>English Premier League</League>
<HomeTeam>Fulham</HomeTeam>
<HomeTeam_Id>4</HomeTeam_Id>
<HomeCorners>6</HomeCorners>
<HomeGoals>5</HomeGoals>
<HalfTimeHomeGoals>2</HalfTimeHomeGoals>
<HomeShots>11</HomeShots>
<HomeShotsOnTarget>9</HomeShotsOnTarget>
<HomeFouls>12</HomeFouls>
<HomeGoalDetails>87': penalty Steve Sidwell;66': Alex Kacaniklic;54':
Mladen Petric;41': Mladen Petric;26': Damien Duff;87': penalty Steve
Sidwell;66': Alex Kacaniklic;54': Mladen Petric;41': Mladen Petric;26':
Damien Duff;</HomeGoalDetails>
<HomeLineupGoalkeeper> Mark Schwarzer</HomeLineupGoalkeeper>
<HomeLineupDefense> Aaron Hughes; John Arne Riise; Sascha Riether; Brede
Hangeland;</HomeLineupDefense>
<HomeLineupMidfield> Moussa Dembélé; Alex Kacaniklic; Damien Duff;
Mahamadou Diarra;</HomeLineupMidfield>
<HomeLineupForward> Bryan Ruiz; Mladen Petric;</HomeLineupForward>
<HomeYellowCards>0</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Norwich</AwayTeam>
<AwayTeam_Id>13</AwayTeam_Id>
<AwayCorners>3</AwayCorners>
<AwayGoals>0</AwayGoals>
<HalfTimeAwayGoals>0</HalfTimeAwayGoals>
<AwayShots>4</AwayShots>
<AwayShotsOnTarget>2</AwayShotsOnTarget>
<AwayFouls>11</AwayFouls>
<AwayGoalDetails />
<AwayLineupGoalkeeper> John Ruddy</AwayLineupGoalkeeper>
<AwayLineupDefense> Ryan Bennett; Michael Turner; Marc Tierney; Russell
Martin;</AwayLineupDefense>
<AwayLineupMidfield> Jonathan Howson; Bradley Johnson; Anthony
Pilkington; Robert Snodgrass; Andrew Surman;</AwayLineupMidfield>
<AwayLineupForward> Grant Holt;</AwayLineupForward>
<AwayYellowCards>0</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
Data requested at 08-04-2012 13:48:01 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET H ISTORIC M ATCHES B Y T EAM A ND D ATE I NTERVAL
<s:element name="GetHistoricMatchesByTeamAndDateInterval">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="teamId" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="startDateString" type="s:stri
ng"/>
<s:element minOccurs="0" maxOccurs="1" name="endDateString" type="s:string
"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing historic matches in a given interval
regarding one particular team.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetHistoricMatchesByTeamAndDateInterval?ApiKey=YourAPIKey&sta
rtDateString=2010-04-01&endDateString=2012-05-10&teamId=Liverpool
<XMLSOCCER.COM>
<Match>
<Date>2011-02-27T00:00:00+01:00</Date>
<League>English Premier League</League>
<HomeTeam>West Ham</HomeTeam>
<HomeCorners>6</HomeCorners>
<HomeGoals>3</HomeGoals>
<HomeShots>17</HomeShots>
<HomeShotsOnTarget>11</HomeShotsOnTarget>
<HomeYellowCards>0</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Liverpool</AwayTeam>
<AwayCorners>8</AwayCorners>
<AwayGoals>1</AwayGoals>
<AwayShots>12</AwayShots>
<AwayShotsOnTarget>8</AwayShotsOnTarget>
<AwayYellowCards>1</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
<Match>
<Date>2011-02-12T00:00:00+01:00</Date>
<League>English Premier League</League>
<HomeTeam>Liverpool</HomeTeam>
<HomeCorners>8</HomeCorners>
<HomeGoals>1</HomeGoals>
<HomeShots>13</HomeShots>
<HomeShotsOnTarget>5</HomeShotsOnTarget>
<HomeYellowCards>1</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Wigan</AwayTeam>
<AwayCorners>5</AwayCorners>
<AwayGoals>1</AwayGoals>
<AwayShots>8</AwayShots>
<AwayShotsOnTarget>2</AwayShotsOnTarget>
<AwayYellowCards>3</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
Data requested at 08-04-2012 13:48:01 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET H ISTORIC M ATCHES B Y L EAGUE A ND D ATE I NTERVAL
<s:element name="GetHistoricMatchesByLeagueAndDateInterval">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="league" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="startDateString" type="s:stri
ng"/>
<s:element minOccurs="0" maxOccurs="1" name="endDateString" type="s:string
"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing historic matches in a given interval
regarding one particular league.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetHistoricMatchesByLeagueAndDateInterval?ApiKey=YourApiKey&st
artDateString=2012-04-01&endDateString=2012-05-16&league=English%20Premier%20League
<XMLSOCCER.COM>
<Match>
<Date>2010-01-05T00:00:00+01:00</Date>
<League>English Premier League</League>
<HomeTeam>Stoke</HomeTeam>
<HomeCorners>8</HomeCorners>
<HomeGoals>3</HomeGoals>
<HomeShots>11</HomeShots>
<HomeShotsOnTarget>9</HomeShotsOnTarget>
<HomeYellowCards>1</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Fulham</AwayTeam>
<AwayCorners>10</AwayCorners>
<AwayGoals>2</AwayGoals>
<AwayShots>14</AwayShots>
<AwayShotsOnTarget>7</AwayShotsOnTarget>
<AwayYellowCards>0</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
<Match>
<Date>2010-01-09T00:00:00+01:00</Date>
<League>English Premier League</League>
<HomeTeam>Arsenal</HomeTeam>
<HomeCorners>6</HomeCorners>
<HomeGoals>2</HomeGoals>
<HomeShots>6</HomeShots>
<HomeShotsOnTarget>5</HomeShotsOnTarget>
<HomeYellowCards>1</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Everton</AwayTeam>
<AwayCorners>8</AwayCorners>
<AwayGoals>2</AwayGoals>
<AwayShots>9</AwayShots>
<AwayShotsOnTarget>5</AwayShotsOnTarget>
<AwayYellowCards>1</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
Data requested at 08-04-2012 13:58:36 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET H ISTORIC M ATCHES B Y ID
<s:element name="GetHistoricMatchesByID">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Id" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing one particular match
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetHistoricMatchesByLeagueAndDateInterval?ApiKey=YourApiKey&Id
=4325
<XMLSOCCER.COM>
<Match>
<Id>4325</Id>
<Date>2010-01-05T00:00:00+01:00</Date>
<League>English Premier League</League>
<HomeTeam>Stoke</HomeTeam>
<HomeCorners>8</HomeCorners>
<HomeGoals>3</HomeGoals>
<HomeShots>11</HomeShots>
<HomeShotsOnTarget>9</HomeShotsOnTarget>
<HomeYellowCards>1</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Fulham</AwayTeam>
<AwayCorners>10</AwayCorners>
<AwayGoals>2</AwayGoals>
<AwayShots>14</AwayShots>
<AwayShotsOnTarget>7</AwayShotsOnTarget>
<AwayYellowCards>0</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
Data requested at 08-04-2012 13:58:36 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET H ISTORIC M ATCHES B Y T EAMS A ND D ATE I NTERVAL
<s:element name="GetHistoricMatchesByTeamsAndDateInterval">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="team1Id" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="team2Id" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="startDateString" type="s:stri
ng"/>
<s:element minOccurs="0" maxOccurs="1" name="endDateString" type="s:string
"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing previous matches between two given teams
in a given interval.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetHistoricMatchesByTeamsAndDateInterval?ApiKey=YourAPIKey&st
artDateString=2009-08-01&endDateString=2011-01-13&team1Id=Man%20United&team2Id=Arsenal
<XMLSOCCER.COM>
<Match>
<Id>4325</Id>
<Date>2010-12-13T00:00:00+01:00</Date>
<League>English Premier League</League>
<HomeTeam>Man United</HomeTeam>
<HomeCorners>5</HomeCorners>
<HomeGoals>1</HomeGoals>
<HomeShots>14</HomeShots>
<HomeShotsOnTarget>10</HomeShotsOnTarget>
<HomeYellowCards>0</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Arsenal</AwayTeam>
<AwayCorners>4</AwayCorners>
<AwayGoals>0</AwayGoals>
<AwayShots>11</AwayShots>
<AwayShotsOnTarget>6</AwayShotsOnTarget>
<AwayYellowCards>4</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
<Match>
<Id>4165</Id>
<Date>2010-01-31T00:00:00+01:00</Date>
<League>English Premier League</League>
<HomeTeam>Arsenal</HomeTeam>
<HomeCorners>8</HomeCorners>
<HomeGoals>1</HomeGoals>
<HomeShots>18</HomeShots>
<HomeShotsOnTarget>7</HomeShotsOnTarget>
<HomeYellowCards>1</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Man United</AwayTeam>
<AwayCorners>5</AwayCorners>
<AwayGoals>3</AwayGoals>
<AwayShots>11</AwayShots>
<AwayShotsOnTarget>5</AwayShotsOnTarget>
<AwayYellowCards>0</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
<Match>
<Id>4125</Id>
<Date>2009-08-29T00:00:00+02:00</Date>
<League>English Premier League</League>
<HomeTeam>Man United</HomeTeam>
<HomeCorners>6</HomeCorners>
<HomeGoals>2</HomeGoals>
<HomeShots>10</HomeShots>
<HomeShotsOnTarget>4</HomeShotsOnTarget>
<HomeYellowCards>3</HomeYellowCards>
<HomeRedCards>0</HomeRedCards>
<AwayTeam>Arsenal</AwayTeam>
<AwayCorners>5</AwayCorners>
<AwayGoals>1</AwayGoals>
<AwayShots>9</AwayShots>
<AwayShotsOnTarget>3</AwayShotsOnTarget>
<AwayYellowCards>6</AwayYellowCards>
<AwayRedCards>0</AwayRedCards>
</Match>
Data requested at 08-04-2012 14:04:43 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET F IXTURES B Y D ATE I NTERVAL
<s:element name="GetFixturesByDateInterval">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="startDateString" type="s:stri
ng"/>
<s:element minOccurs="0" maxOccurs="1" name="endDateString" type="s:string
"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing future matches in a given interval. If market
details are available, these will be presented as well.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetFixturesByDateInterval?ApiKey=YourAPIKey&startDateString=2012
-04-01&endDateString=2012-04-10
Warning – this operation will return quite a lot of data even when specifying a relatively short period. Also keep in
mind that market-data (odds) are only available for the next round in each league, as bookmakers don’t specify them
ealier.
<XMLSOCCER.COM>
<Match>
<Date>2012-04-09T21:00:00+02:00</Date>
<League>English Premier League</League>
<HomeTeam>Fulham</HomeTeam>
<AwayTeam>Chelsea</AwayTeam>
<Location>Craven Cottage</Location>
<WilliamHill_Home>3,20</WilliamHill_Home>
<WilliamHill_Draw>3,20</WilliamHill_Draw>
<WilliamHill_Away>2,00</WilliamHill_Away>
</Match>
<Match>
<Date>2012-04-09T18:20:00+02:00</Date>
<League>English League Championship</League>
<HomeTeam>West Ham United</HomeTeam>
<AwayTeam>Birmingham</AwayTeam>
<Location>Upton Park</Location>
</Match>
<Match>
<Date>2012-04-09T16:00:00+02:00</Date>
<League>English Premier League</League>
<HomeTeam>Queens Park Rangers</HomeTeam>
<AwayTeam>Swansea City</AwayTeam>
<Location>Loftus Road</Location>
<WilliamHill_Home>2,30</WilliamHill_Home>
<WilliamHill_Draw>3,20</WilliamHill_Draw>
<WilliamHill_Away>3,20</WilliamHill_Away>
</Match>
Data requested at 08-04-2012 14:33:25 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET F IXTURES B Y D ATE I NTERVAL A ND L EAGUE
<s:element name="GetFixturesByDateIntervalAndTeam">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="league" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="startDateString" type="s:stri
ng"/>
<s:element minOccurs="0" maxOccurs="1" name="endDateString" type="s:string
"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing future matches in a given interval for a
specific league. If market details are available, these will be presented as well.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetFixturesByDateIntervalAndLeague?ApiKey=YourAPIKey&startDate
String=2010-04-01&endDateString=2012-05-10&league=English%20Premier%20League
<XMLSOCCER.COM>
<Match>
<Date>2012-04-09T21:00:00+02:00</Date>
<League>English Premier League</League>
<HomeTeam>Fulham</HomeTeam>
<AwayTeam>Chelsea</AwayTeam>
<Location>Craven Cottage</Location>
<WilliamHill_Home>3,20</WilliamHill_Home>
<WilliamHill_Draw>3,20</WilliamHill_Draw>
<WilliamHill_Away>2,00</WilliamHill_Away>
</Match>
<Match>
<Date>2012-04-09T18:20:00+02:00</Date>
<League>English League Championship</League>
<HomeTeam>West Ham United</HomeTeam>
<AwayTeam>Birmingham</AwayTeam>
<Location>Upton Park</Location>
</Match>
<Match>
<Date>2012-04-09T16:00:00+02:00</Date>
<League>English Premier League</League>
<HomeTeam>Queens Park Rangers</HomeTeam>
<AwayTeam>Swansea City</AwayTeam>
<Location>Loftus Road</Location>
<WilliamHill_Home>2,30</WilliamHill_Home>
<WilliamHill_Draw>3,20</WilliamHill_Draw>
<WilliamHill_Away>3,20</WilliamHill_Away>
</Match>
Data requested at 08-04-2012 14:33:25 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET A LL T EAMS
<s:element name="GetAllTeams">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing all teams in the database.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetAllTeams?ApiKey=YourAPIKey
<XMLSOCCER.COM>
<Team>
<Id>42</Id>
<Name>Birmingham</Name>
<Country>England</Country>
<Stadium>St Andrews</Stadium>
<HomePageURL>http://www.bcfc.com</HomePageURL>
<WIKILink>http://en.wikipedia.org/wiki/Birmingham_City_F.C.</WIKILink>
</Team>
…..
<Team>
<Id>43</Id>
<Name>Blackburn</Name>
<Country>England</Country>
<Stadium>Ewood Park</Stadium>
<HomePageURL>http://www.bcfc.com</HomePageURL>
<WIKILink>http://en.wikipedia.org/wiki/Birmingham_City_F.C.</WIKILink>
</Team>
Data requested at 08-04-2012 14:40:26 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET A LL T EAMS B Y L EAGUE A ND S EASON
<s:element name="GetAllTeams">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="league" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="seasonDateString
" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing all teams in a league of a specific season.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetAllTeamsByLeagueAndSeason?ApiKey=YourAPIKey&league=Englis
h Premier League& seasonDateString=1011
<XMLSOCCER.COM>
<Team>
<Id>42</Id>
<Name>Birmingham</Name>
<Country>England</Country>
<Stadium>St Andrews</Stadium>
<HomePageURL>http://www.bcfc.com</HomePageURL>
<WIKILink>http://en.wikipedia.org/wiki/Birmingham_City_F.C.</WIKILink>
</Team>
…..
<Team>
<Id>43</Id>
<Name>Blackburn</Name>
<Country>England</Country>
<Stadium>Ewood Park</Stadium>
<HomePageURL>http://www.bcfc.com</HomePageURL>
<WIKILink>http://en.wikipedia.org/wiki/Birmingham_City_F.C.</WIKILink>
</Team>
Data requested at 08-04-2012 14:40:26 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET A LL L EAGUES
<s:element name="GetAllLeagues">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing all leagues in the database.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetAllLeagues?ApiKey=YourAPIKey
<XMLSOCCER.COM>
<League>
<Id>1</Id>
<Name>English Premier League</Name>
<Country>England</Country>
<Historical_Data>Yes</Historical_Data>
<Fixtures>Yes</Fixtures>
<Livescore>Yes</Livescore>
<NumberOfMatches>1070</NumberOfMatches>
<LatestMatch>2012-04-05T00:00:00+02:00</LatestMatch>
</League>
<League>
<Id>2</Id>
<Name>English League Championship</Name>
<Country>England</Country>
<Historical_Data>Yes</Historical_Data>
<Fixtures>Yes</Fixtures>
<Livescore>Yes</Livescore>
<NumberOfMatches>1588</NumberOfMatches>
<LatestMatch>2012-04-05T00:00:00+02:00</LatestMatch>
</League>
Data requested at 08-04-2012 14:42:02 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET L EAGUE S TANDINGS B Y S EASON
<s:element name="GetLeagueStandingsBySeason">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="league" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="seasonDateString" type="s:str
ing"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing previous matches between two given teams
in a given interval.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetLeagueStandingBySeason?ApiKey=YourAPIKey&league=English%2
0Premier%20League&seasonDateString=1112
<XMLSOCCER.COM>
<TeamLeagueStanding xmlns="http://xmlsoccer.com/LeagueStanding">
<Team>Man United</Team>
<Played>31</Played>
<PlayedAtHome>15</PlayedAtHome>
<PlayedAway>16</PlayedAway>
<Won>24</Won>
<Draw>4</Draw>
<Lost>3</Lost>
<NumberOfShots>765</NumberOfShots>
<YellowCards>38</YellowCards>
<RedCards>1</RedCards>
<Goals_For>76</Goals_For>
<Goals_Against>27</Goals_Against>
<Goal_Difference>49</Goal_Difference>
<Points>76</Points>
</TeamLeagueStanding>
<TeamLeagueStanding xmlns="http://xmlsoccer.com/LeagueStanding">
<Team>Man City</Team>
<Played>31</Played>
<PlayedAtHome>16</PlayedAtHome>
<PlayedAway>15</PlayedAway>
<Won>22</Won>
<Draw>5</Draw>
<Lost>4</Lost>
<NumberOfShots>855</NumberOfShots>
<YellowCards>42</YellowCards>
<RedCards>4</RedCards>
<Goals_For>75</Goals_For>
<Goals_Against>25</Goals_Against>
<Goal_Difference>50</Goal_Difference>
<Points>71</Points>
</TeamLeagueStanding>
…
</TeamLeagueStanding>
Data requested at 08-04-2012 14:06:38 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET L IVE S CORE
<s:element name="GetLiveScore">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing livescores from all leagues that are played
right now.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetLiveScore?ApiKey=YourAPIKey
<XMLSOCCER.COM>
<Match>
<Id>84926</Id>
<Date>2012-08-27T19:00:00+02:00</Date>
<League>Superliga</League>
<Hometeam>AC Horsens</Hometeam>
<HomeTeam_Id>311</HomeTeam_Id>
<Awayteam>AGF Aarhus</Awayteam>
<AwayTeam_Id>315</AwayTeam_Id>
<Time>50'</Time>
<HomeGoals>0</HomeGoals>
<AwayGoals>4</AwayGoals>
<HomeGoalDetails/>
<AwayGoalDetails>
48': penalty Aron Johannsson;36': Aron Johannsson;33': Aron
Johannsson;32': Aron Johannsson;
</AwayGoalDetails>
<HomeLineupGoalkeeper>Frederik Rønnow</HomeLineupGoalkeeper>
<AwayLineupGoalkeeper>Steffen Rasmussen</AwayLineupGoalkeeper>
<HomeLineupDefense>
Anders Nøhr; Morten Rasmussen; Mads Agesen; Thomas Kortegaard;
</HomeLineupDefense>
<AwayLineupDefense>
Mikkel Kirkeskov; Petri Pasanen; Anders Kure; Adam Eckersley;
</AwayLineupDefense>
<HomeLineupMidfield>
Troels Kløve; Steffen Kielstrup; Janus Drachmann; Jeppe Mehl;
</HomeLineupMidfield>
<AwayLineupMidfield>
Stephan Petersen; Hjalte Bo Nørregaard; Casper Sloth; Osama Akharraz;
</AwayLineupMidfield>
<HomeLineupForward>Henrik Toft; Martin Spelmann;</HomeLineupForward>
<AwayLineupForward>Aron Johannsson; David Devdariani;</AwayLineupForward>
<HomeSubDetails>
43': out Mads Agesen;43': in Nabil Aslam;37': out Martin Spelmann;37': in
Kenan Hajdarevic;43': out Mads Agesen;43': in Nabil Aslam;37': out Martin
Spelmann;37': in Kenan Hajdarevic;
</HomeSubDetails>
<AwaySubDetails/>
<Location>CASA Arena Horsens</Location>
<Stadium>CASA Arena Horsens</Stadium>
</Match>
<Match>
<Id>83475</Id>
<Date>2012-08-27T20:45:00+02:00</Date>
<League>Serie B</League>
<Hometeam>Cesena</Hometeam>
<HomeTeam_Id>77</HomeTeam_Id>
<Awayteam>Sassuolo</Awayteam>
<AwayTeam_Id>115</AwayTeam_Id>
<Time>Not started</Time>
<HomeGoals>0</HomeGoals>
<AwayGoals>0</AwayGoals>
<HomeGoalDetails/>
<AwayGoalDetails/>
<HomeLineupGoalkeeper/>
<AwayLineupGoalkeeper/>
<HomeLineupDefense/>
<AwayLineupDefense/>
<HomeLineupMidfield/>
<AwayLineupMidfield/>
<HomeLineupForward/>
<AwayLineupForward/>
<HomeSubDetails/>
<AwaySubDetails/>
<Location>Stadio D. Manuzzi</Location>
<Stadium>Stadio Dino Manuzzi</Stadium>
</Match>
<Match>
<Id>84278</Id>
<Date>2012-08-27T22:00:00+02:00</Date>
<League>La Liga</League>
<Hometeam>Ath Madrid</Hometeam>
<HomeTeam_Id>145</HomeTeam_Id>
<Awayteam>Ath Bilbao</Awayteam>
<AwayTeam_Id>143</AwayTeam_Id>
<Time>Not started</Time>
<HomeGoals>0</HomeGoals>
<AwayGoals>0</AwayGoals>
<HomeGoalDetails/>
<AwayGoalDetails/>
<HomeLineupGoalkeeper>Thibaut Courtois</HomeLineupGoalkeeper>
<AwayLineupGoalkeeper>Gorka Iraizoz Moreno</AwayLineupGoalkeeper>
<HomeLineupDefense>Diego Godin; Silvio; Filipe; Miranda;</HomeLineupDefense>
<AwayLineupDefense>
Carlos Gurpegi; Oscar De Marcos; Andoni Iraola; Mikel San José;
</AwayLineupDefense>
<HomeLineupMidfield>
Adrian; Arda Turan; Cristian Rodriguez; Mario Suarez; Gabi Fernández;
</HomeLineupMidfield>
<AwayLineupMidfield>
Markel Susaeta Laskurain; Iker Muniain; Soto Inigo Perez; Ander Herrera;
Ander Iturraspe;
</AwayLineupMidfield>
<HomeLineupForward>Radamel Falcao;</HomeLineupForward>
<AwayLineupForward>Aritz Aduriz;</AwayLineupForward>
<HomeSubDetails/>
<AwaySubDetails/>
<Location>Vicente Calderon</Location>
<Stadium>Estadio Vicente Calderón</Stadium>
</Match>
<AccountInformation>
Data requested at 27-08-2012 20:08:00 from 127.0.0.1, Username: Espectro.
Your current supscription runs out on xxxxx 11:01:25.
</AccountInformation>
</XMLSOCCER.COM>
G ET L IVE S CORE B Y L EAGUE
<s:element name="GetLiveScoreByLeague">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="league" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to get a resultset containing livescores from all a specific league that are
played right now.
R E S UL T S ET
E XA M P L E
http://www.xmlsoccer.com/FootballData.asmx/GetLiveScore?ApiKey=YourAPIKey&league=English%20Premier%20Le
ague
<XMLSOCCER.COM>
<Match>
<Date>2012-04-08T14:30:00+02:00</Date>
<Hometeam>Man United</Hometeam>
<Awayteam>QPR</Awayteam>
<Time>15'</Time>
<HomeGoals>1</HomeGoals>
<AwayGoals>0</AwayGoals>
<Location>Old Trafford</Location>
<Stadium>Old Trafford</Stadium>
</Match>
<Match>
<Date>2012-04-08T17:00:00+02:00</Date>
<Hometeam>Arsenal</Hometeam>
<Awayteam>Man City</Awayteam>
<Location>Emirates Stadium</Location>
<Stadium>Emirates Stadium</Stadium>
</Match>
Data requested at 08-04-2012 14:45:58 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
G ET T EAM
<s:element name="GetTeam">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="teamName" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to detailed information of a particular team.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/GetTeam?ApiKey=YourAPIKey&teamName=Liverpool
<XMLSOCCER.COM>
<Team>
<Name>Liverpool</Name>
<Stadium>Anfield</Stadium>
<Website>http://www.liverpoolfc.tv/</Website>
<WikiPageUrl>http://en.wikipedia.org/wiki/Liverpool_F.C.</WikiPageUrl>
<Country>England</Country>
</Team>
Data requested at 08-04-2012 14:55:44 from 127.0.0.1, Username: Espectro. Your
current supscription runs out on 01-08-2014 11:01:25.
</XMLSOCCER.COM>
C O D E E X A MP L E
C# .Net
using System.Xml;
XmlDocument doc = new XmlDocument();
doc.Load("http://www.xmlsoccer.com/FootballData.asmx/GetTeam?ApiKey=YourAPIKey&
teamName=Liverpool");
var stadium = doc.SelectNodes("/XMLSOCCER.COM/Team/Stadium")[0].InnerText;
Result: ‘Anfield’
C HECK A PI K EY
<s:element name="CheckApiKey">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ApiKey" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
Use this operation to check what kind of access you have.
R E S UL T S ET
E XA MP L E
http://www.xmlsoccer.com/FootballData.asmx/CheckApiKey?ApiKey=YourAPIKey
Results can either be:
“Hello {Full name}, you have access to all leagues (paying-member). Your current
subscription ends at {Subscription ends}”
Or
Api-key not accepted, please either sign up for a free demo account or buy a
subscription for our full service.
Or
Hello , you have access to free leagues (demo-user).
C ONTACT INFORMATION
My name is Michael Nielsen, and I am the owner/creator of this service. I am constantly
trying to improve the service by adding new functions, and greatly appreciate any feedback
or questions. Please contact me on this mail:
[email protected]
Don’t hesitate to contact me, if you have one particular function that you “desperately”
need. If I can see that your wish is general enough that others might find it useful, chances
are I will implement it.
Also – If you have some client-side codes that you wish to share when using this API, please
submit them (any language) and if I can use it for this documentation I might even grant
you some free-roll time on the service.
Kind regards
Michael