Ergast API Puts Car Racing Fans in the Driver's Seat

Ajay Ohri
Dec. 05 2012, 01:00PM EST

We had a look at the Ergast Developer API , which basically covers car racing for Formula 1 enthusiasts and an interesting mashup using the Shiny statistical platform for web applications. We also had a look at the ESPN API which covers the Formula 1 sport but also the NASCAR racing.

The Ergast Developer API is an experimental web service which provides a historical record of motor racing data for non-commercial purposes. Please read the terms and conditions of use. The API provides data for the Formula One series, from the beginning of the world championship in 1950.

All API queries require a GET request using a URL of the form:

http://ergast.com/api/<series>/<season>/<round>/...

where:

<series> should be set to "f1"
<season> is a 4 digit integer
<round> is 1 or 2 digit integer

For queries concerning a whole season, or final standings, the round element may be omitted. For example:

http://ergast.com/api/f1/2008/...

For queries concerning the whole series both the round and the season elements may be omitted. For example:

http://ergast.com/api/f1/...

If you prefer using the ESPN API or in particular the Standings API , a look at the website shows the various sports that are covered. The ESPN Standings API is of course much more extensive and has four types of racing parameters-

/sports/racing/f1 Formula 1 Racing
/sports/racing/irl IndyCar Series Racing
/sports/racing/sprint NASCAR Sprint Racing
/sports/racing/truck NASCAR Truck Racing

The XML output is rendered with an internal key calling:
http://api.espn.com/v1/sports/racing/f1/standings?seasontype=2&_accept=t...:yourkey

So you may go direct and scrape (??)   the NASCAR data statistics  but if you prefer APIs to web scraping have a look  at this API .

The Sports LLC documentation for Nascar API product is available here.

It has comprehensive stats collection into six feeds, each focused on serving specific information needs:

  1. Drivers – detailed driver information, including a set of season summary statistics
  2. Driver Standings – provides driver level statistics including points, victories, and driver ranking
  3. Live Race Leaderboard– detailed, near real-time race statistics per driver
  4. Qualifying Race Leaderboard – detailed, near real-time qualifying statistics per driver
  5. Schedule – provides the date, time, location and other event details for every race
  6. Teams – provides information regarding the Sprint Cup teams

An example of an API call on this is

Live Race Leaderboard

Schema

Syntax: http://api.sportsdatallc.org/nascar-[access_level][version]/schema/race-...

But these APIs are not free, there is no free tier (!)  and you can see the pricing tiers available.

Another slightly older mashup using the NASCAR data feed is available here

But here lies the caveat emptor- the ESPN racing APIs are not public and not free. They are available only for premium partners and  espn itself with some data withheld.

Thus Ergast API remains the best racing API publicly available for racing enthusiasts of Formula 1 and you can see some of the interesting apps getting developed in their gallery. Of course, this lack of sharing data by ESPN is expected to show much lower usage and creation of interesting mashups. We personally believe, while APIs should have a clear monetization route, it should not be at the cost of innovation and availability. I mean , there can always be free usage tiers, and pricing can be based on API usage. So we applaud this move by Ergast-

The publication of a complete image of the Ergast database. This is made available under the Attribution-NonCommercial-ShareAlike 3.0 Unported Licence and will be updated at the end of each season. The image allows you to create an exact copy of the MySQL database for your own purposes.

Better and more open public APIs for racing fans- now what can be better than! Your sports fix- just another (public) API call away.

Ajay Ohri is the author of R for Business Analytics and likes to write on Enterprise ,Cloud and Statistical APIs with an emphasis on interviews. Follow Ajay on Google+ and connect on LinkedIn

Comments