The NFL has made an impressive Application Programming Interface (API) available to application developers.
Fantasty Football Web Services allows existing or new applications to access live NFL data, potentially in real time. It also allows users to join existing fantasy leagues, or even create new leagues. Perhaps the most exciting offerings are still to come. Michael Vizard of Programmable Web writes:
A big part of that effort revolves around giving fans access to statistics and analytics tools that they can use to figure out which players to draft and keep. In the postseason, NFL.com even went so far as to create a separate fantasy game event that involved just the teams that made the playoffs.
Access to these statistics and analytic tools is something large organizations like the NFL need to compete with the powerful data analysis capabilities available to smaller companies today. In addition to the playoff fantasy game mentioned above, there's also a prowbowl api available. So the NFL seems to be running with the API.
First, let's have a closer look at the The Web services available now which are documented here: http://api.fantasy.nfl.com/v1/docs . Then we'll explore some hidden gems available now in the API that access some underlying predictive analytics, straight form the NFL!
Available Data
Any current player statistics are available through the well documented API calls. To write to the API you'll need a key which you request by emailing fantasy.football@nfl.com .
Scoring Leaders
{"season":"2010","week":"","positions":{"QB":[{"id":"2505996","esbid":"MAN473170","gsisPlayerId":"00-0022803","firstName":"Eli","lastName":"Manning","teamAbbr":"NYG","opponentTeamAbbr":"","position":"QB","rank":"11","statsLine":"","stats":{"PassYds":false,"PassTDs":false,"Int":false,"RushYds":false,"RushTDs":false,"RecYds":false,"RecTds":false,"FumTD":false,"TwoPt":false,"FumLost":false},"pts":"231.08","projectedPts":false,"status":""},{"id":"2539961","esbid":"NAS738294","gsisPlayerId":"00-0030586","firstName":"Ryan","lastName":"Nassib","teamAbbr":"NYG","opponentTeamAbbr":"","position":"QB","rank":"47","statsLine":"","stats":{"PassYds":false,"PassTDs":false,"Int":false,"RushYds":false,"RushTDs":false,"RecYds":false,"RecTds":false,"FumTD":false,"TwoPt":false,"FumLost":false},"pts":false,"projectedPts":false,"status":""}]}}
The data comes back in XML by default, but you can clean that up with a simple format parameter at the end of your request:
Weekly Stats
Users can further filter requests by position, team, week and season. The available stats go back to 2009.
Advanced Stats
Additional statistics such as RedZone Touches are also available
Managing Leagues with API Writes
Add a Player
This call adds a player to your fantasy team.
Create a League
You can even create a new league,
For the application developer and fantasy sports fan, the fun has just begun.
Analytic Tools
#SB49 Halftime Show Alternative: Watch @MoneyLynch & @RobGronkowski play #MortalKombatX with #Conan: http://t.co/wRyRFXk6Fv
— Team Coco (@TeamCoco) February 2, 2015
Predictions
Predictive analytics has become so prevalent that the NFL is now providing projections of next weeks fantasy points.
weekProjectedPts
Algorithms behind the scenes at the NFL boldly predicted at week 1 that NY Giants backup Quarterback Husain Abdullah would have no points the next week (weekProjectedPts)
The NFL algorithms were close. If you change the week number to 2 in the url above, you'll see that Husain did scrape up a point the next week.
seasonProjectedPts
Season projected points appears in the /playesrs/stats response as well. It appears to be a placeholder for now. It doesn't change week to week, and it's 0 for any year prior to 2014. It will be interesting to watch this attribute in 2015.
Watch for more updates to the NFL Fantasy Sports API during the offseason, and for some interesting applications build around the new API.