FlexSport On Demand
FlexSport On Demand is built atop open standards and open protocols. Its technical objective is to make our content as easy as possible to integrate into websites, applications, databases and editorial systems:
Our platform supports multiple formats for the free listings and for the documents themselves. The most common combination is RSS for listings, and SportsML for documents.
RSS, commonly known as "Rich Site Syndication" or "Really Simple Syndication," is employed by hundreds of thousands of users worldwide. It comes in many flavors, and XML Team supports them all, so you can take your pick. If you're unsure which way to go, we recommend RSS 1.0. If you're new to RSS, then here are some excellent technical resources:
SportsML is the open XML vocabulary for sports data, and is the only international standard designed for scores, standings, schedules, and statistics designed to accommodate every sport, country and language. For more information on SportsML, visit our Why XML? page or SportsML.com.
How to request listings
Listings are requested by making a standard, authenticated http request. You can manually request listings by just typing the appropriate URL into a web browser. Use our Query Builder tool to determine the parameters within the URL, or read our API Specification for details. Broken down and documented for clarity, one sample URL for Listings might look like this:
league-keys = l.nhl.com &
fixture-keys = event-stats &
max-result-count = 10 &
date-window = 24:00 &
stylesheet = sportsml-set2rss-1.0
FlexSport On Demand uses standard http authentication. When using a web browser to display Listings, this means that a small popup window appears asking for your username and password. Login information can also be included in the URL itself, as in: http://username:firstname.lastname@example.org/.... Please note that Microsoft's Internet Explorer has dropped support for this type of URL. Microsoft cites security issues, and current updates of Internet Explorer no longer support adding the "username:password@" string to the start of a URL. See Microsoft's support page on this issue for more details.
How to request documents
Depending upon which format you've chosen for the Listings, you'll be able to determine what URL to use to retrieve the actual documents themselves.
If you've selected RSS, then the final-form URLs for the various documents are included in the <link> elements. Broken down and documented for clarity, one sample URL for Document might look like this:
Other parts of the RSS Listing give you the title of the document, its publication date, and other useful pieces of metadata.
Like with the Listings URL, document retrieval uses standard http authentication.
How to request scoreboards
You can also retrieve scoreboards from FOD, which are slightly different in scope from documents and are not included in the sample library. Scoreboards allow you to query for all game time and score information for a given date. You will also be able to see the latest document id's associated with that event for fixtures such as boxscores, recaps and previews (these are documents that you will find in the Sample Showcase).
You can retrieve the current linescores for every game for a given day.
SportsML query to find all MLB games for today:
http://fod.xmlteam.com/api/getScoreboard?league-keys=l.mlb.com&max-result-count=15&date-offset=0&The same query but returns HTML:
Key practices when automating listing requests and doc retrieval
XML Team does not provide software for querying the webservice — all clients have different needs and operating environments — but the mechanics are not difficult for an experienced programmer. Here are some key requirements for any such software: