Release of Historical NFL API and Future Plans

Suredbits
2 min readOct 7, 2016

--

We’re excited to announce the initial release of our NFL data API, which allows us to query NFL games from 2009-present.

Anyone can request data using the format api.suredbits.com/sport/version/param/teamId/year/week. Refer to this separate post for API documentation.

Here’s an example of making a cURL request for the Philadelphia Eagles game in week 3 of the 2016 season:

tom@tom:~$ curl http://api.suredbits.com/nfl/v0/games/PHI/2016/3/
{
"gsisId": "2016092510",
"seasonYear": 2016,
"startTime": "20160925T202500Z",
"timeInserted": "20160907T204104Z",
"dayOfWeek": "Sunday",
"gameKey": "56946",
"finished": true,
"homeTeam": {
"scoreQ3": 21,
"turnovers": 2,
"scoreQ2": 10,
"score": 34,
"team": "PHI",
"scoreQ1": 3,
"scoreQ4": 0
},
"timeUpdate": "20161004T201022Z",
"awayTeam": {
"scoreQ3": 0,
"turnovers": 3,
"scoreQ2": 3,
"score": 3,
"team": "PIT",
"scoreQ1": 0,
"scoreQ4": 0
},
"week": "NflWeek3",
"seasonType": "Regular"
}

You can see the Eagles hosted Pittsburgh for a Sunday afternoon game, and won by a score of 34–3. The times are displayed in UTC. This game started at 20:25 UTC, or 4:25PM EST.

Access to historical information or statistics is entirely free. In the near future, we will introduce access to live data, which will only cost a few cents per request. Games in our historical API will be updated weekly on Tuesdays at 18:00 UTC.

We will implement this metered-access through payment channels with bitcoin. When a user wants to request data, they will enter into a payment channel, in which they can make continuous data requests. At the end of their session, they close the payment channel by settling their balance with a single transaction that accounts for all the requests they made.

Under the hood of a payment channel, a user begins by making an initial deposit in bitcoin. Each time a user is making a request, they’re also signing a transaction to account for the total requests made up to that point. However, that signed transaction is not broadcast to the network until the channel is closed. A payment channel can be closed when a user is either finished making data requests, or their deposit is fully spent.

Payment channels allow a user to make continuous data requests, but requires only a single transaction for settlement. This benefits the user to continuously access data in a seamless process, and reduces the number of transactions on the bitcoin network.

To begin, NFL will be our first sport (regular season only), but we will be adding preseason and postseason games shortly. We hope to be ready for the NBA season opener on October 25.

Future releases will introduce access to players, and statistics.

Be sure to stay tuned and catch any updates on Twitter or join our mailing list!

--

--