FlexSport On Demand
Technology

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:

  • Your software calls XML Team's web server periodically asking for document listings that match your search criteria. (Or you may choose to search and download the files manually using our one of our web tools.)
  • XML Team sends back a free listing of relevant documents, including metadata and document URLs.
  • Your software then requests and downloads the file(s) using the URLs in the listing, and your account is billed. After that, you are free to parse, transform, load, query, format, and/or display that content however you'd like (within the Fair Publishing Rights terms laid out in our License Agreement).

Supported Formats

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.

Formats We Support
For Listings For Data
RSS 1.0
RSS 0.92
RSS 2.0
SportsML
xHTML
SportsML
xHTML
(cleanly formatted
and permeated with
CSS properties)

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:

http://fod.xmlteam.com/api/getListings.php?

league-keys = l.nhl.com &
// Metadata code for the NHL

fixture-keys = event-stats &
// Metadata code for a Box Score

max-result-count = 10 &
// List only the most recent 10

date-window = 24:00 &
// List content published in past 24 hours

stylesheet = sportsml-set2rss-1.0
// Display Listings in RSS 1.0 format

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:password@fod.xmlteam.com/.... 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:

<link>
http://fod.xmlteam.com/api/getDocuments?doc-ids=xt.1115498-box
// The Document ID of a file.
</link>

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.

MLB: SportsML | HTML

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&
date-offset-midnight=1600&publisher-keys=sportsnetwork.com
The same query but returns HTML:
http://fod.xmlteam.com/api/getScoreboard?league-keys=l.mlb.com&max-result-count=15&date-offset=0&
date-offset-midnight=1600&stylesheet=sportsml2html-scoreboard&publisher-keys=sportsnetwork.com

NFL: SportsML | HTML

NBA: SportsML | HTML

NHL: SportsML | 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:

  • You should be able to regularly schedule queries. You may query our database as many times as you like, within reason. Your queries should not overlap or duplicate each other. Each listing returns a unique, new set of documents. As a general rule, you should not query consistently for more than a day's worth of data.
  • You should keep track of the document IDs that have already been downloaded. This is so that you don't download them again if they appear in a query listing — you will be charged twice. It's also so that you can match all downloaded doc-ids with the revision ID; a revision ID indicates the file may be an update of a previous file and may be downloaded for free. (If the doc-id and revision-id of the file in the listing match, then it is not an update.)
  • You should be able to store each document locally.