NFL API Update — Season Stats!

Suredbits
2 min readNov 4, 2016

--

We are officially halfway through the NFL season! Last week, we introduced player statistics for a given game and player.

Today’s update introduces season statistics!

You can query a player’s season stats from 2009 to the current NFL season. Querying single-game stats allowed you specify a type of statistic to search by. For season stats, this is not applicable — seasons stats will return all player stats, regardless of position. If a year is not specified, the search defaults to the current season.

Demo

A quick demo finding Julio Jone’s stats for the current season through Week 9, including Thursday Night Football between Falcons vs. Bucs:

// 20161104111613
// http://api.suredbits.com/nfl/v0/stats/00-0027944
{
"defense": {
"tackleLoss": 0,
"recoveredFumbles": 0,
"fgBlk": 0,
"assistedTackles": 0,
"recoveredFumbleYds": 0,
"tackleLossYards": 0,
"qbHit": 0,
"miscTds": 0,
"defenseInt": 0,
"miscYds": 0,
"extraPointBlock": 0,
"defenseSack": 0,
"intTds": 0,
"punkBlk": 0,
"recoveredFumbleTD": 0,
"tacklePrimary": 0,
"defenseSackYds": 0,
"tackle": 1,
"safety": 0,
"passDef": 0,
"intYds": 0,
"forcedFumbles": 0
},
"rushing": {
...
},
"fumbles": {
...
},
"kickReturn": {
...
},
"passing": {
...
},
"receiving": {
"receivingTwoPointAttemptMade": 0,
"fumblesLost": 0,
"receivingTwoPointAttemptMissed": 1,
"yacYds": 300,
"tds": 5,
"rec": 51,
"target": 81,
"receivingYds": 970,
"receivingTwoPointAttempt": 1
},
"playerId": "00-0027944",
"kicking": {
...
},
"punting": {
...
}
}

In the example above, we are searching for Julio Jones’ current season stats, but you can specify a year for previous seasons as far back as 2009. You can also search by name, rather than a playerID. Check out the documentation for further examples.

Current Info

A small addition to this release introduces a request to retrieve the current status on the API and the NFL:

// 20161104112552
// http://api.suredbits.com/nfl/v0/info/
{
"seasonYear": 2016,
"lastRosterDownload": "20161104T160824.181Z",
"week": "NflWeek9",
"version": "8",
"seasonType": "Regular"
}

NBA and Future Plans

This update marks a point where we are going to begin focusing on our NBA API. The NFL API data will continue to be updated weekly, but we will work on introducing the NBA API, rather than bringing new features to the NFL API.

We’re excited to be expanding our APIs to multiple sports!

In the future, our hope is to provide live data as our premium product, and you would only pay for what you want (no subscriptions)!

Stay up-to-date with the latest release by following us on Twitter!

--

--