The SODA primer
Posted by Casey Trauer on 03 April 2013 10:28 PM
Here is a basic overview of the Sports On Demand API (SODA) service.
What is Sports On Demand for Applications (SODA)?
SODA is a pay-per-document service designed for customers with more limited needs or more modest budgets. It is a web service, meaning you query our database over HTTP (essentially the same way a browser requests a web page).
Previous to 2014, this service was called FlexSport On Demand. The name was changed partly to reflect the addition of photo content to the service.
What kind of data can I find in SODA?
We populate the database with key statistical data — scores, boxscores, rosters, season-stats, etc — across the major sports. You can reference what xml data is available in SODA by referring to our inventory Showcase. SODA is designed to make available recent data in a timely manner. Archival data is not available. If you wish to purchase archival data sets, contact us and we can arrange that separately.
SODA also offers and extensive collection of action photos for recent sporting events, all available on a pay-per-picture basis.
How do I get started?
First you register, giving us details about your website or application and signing off on the contract. Our only requirement is that you must pre-purchase $50 worth of credits. This purchase takes place automatically during the SODA application process via credit card transaction. No monthly minimums or lengthy contracts are involved. Once purchased, credits cannot be transferred or refunded. They will not expire, however.
How do I get data?
There are two types of SODA queries: requests for documents and scoreboards.
For document queries, clients make a request using a set of parameters: primarily, a league key, a fixture-key (document type) and a time-published span (although there are other parameters such as team keys that can narrow the search). These queries return a listing of documents that matched the search. A second query uses a document id to return an actual xml document.
For scoreboard queries, clients can return a game list, current scores and clock information and a list of event-related documents such as previews and recaps and boxscores.
Photos can be easily browsed and downloaded in the Photo Finder.
How am I charged?
When querying for documents, the listing query is free. This query returns all documents that match your search criteria. The second step is a query to request a document, and the cost in credits varies for each document. There is a web interface called the Query Builder that will tell you the cost of each document, or you can refer to showcase.xmlteam.com for the cost for each document type.
For scoreboard queries, you pay one flat price for the current scores for every game in the league. You will be charged for every time you query the scoreboard.
The prices generally range from $0.25 to $2.50 per document (depending on the sport and league and document). In SODA, documents costs are listed in credits. If you buy credits in bulk, you will get a discounted rate.
How can I test my software against SODA?
We have a trial database that you can test against (the query uses a different API address). Just ask us the dates for the trial data. If there is no trial data that meets your needs, we can either add newer data to the trial database or provide you bonus credits to test against the live database.
We also have a form interface that will help you build your queries or monitor what content is currently available.
Can I get the data in formats other than XML?
Right now, the source data is delivered only in SportsML, an open-source data format. (Fortunately, this XML is easy to convert to other data formats.) While the actual data is in SportsML, our document listings can be returned in a variety of formats, including HTML, RSS and XML. XML is recommended as it has the most information about the documents themselves.
How do I track my account usage?
There is an account center which will show you your current credits and a log of your documents retrieved and the charge for each, if any.