nfl api In 2012 Andrew Gallant developed and released a series of python projects that help insulate us from the repeated technical missteps of the NFL. In 2017, when I was commissioned to build an application reliant on live NFL game data, there was STILL no easy way to connect w/ nfl data streams.

Problem was; Andrew had moved on and his projects had begun to atrophy. So I took them under my wing! Most of this was updating stale api calls. Biggest problem was these were both python2 projects. SO I converted them!

nflgame-redux Downloads

nflgame is an API to retrieve and read NFL data feeds. It can work with real-time data, which can be used for fantasy football. This code begs/borrows/steals (lol jk its all public, just undocumented) from various sources to cache all of this data (play-by-play/schedule/player data) locally for you.


nfldb is a relational database bundled with a Python module to quickly and conveniently query and update the database with data from active games. Data is imported from nflgame, which in turn gets its data from a JSON feed on’s live GameCenter pages. This data includes, but is not limited to, game schedules, scores, rosters and play-by-play data for every preseason, regular season and postseason game dating back to 2009. I’m currently planning the project that will import data back to 1920!!!

Please check them out!

I’m very responsive on discord if you have any issues installing or using these. I’ll be monitoring this thread for the next couple months as well! These projects work on all platforms as long as you have python3. nfldb will require some extra work but I’ve included a docker-compose example and there are detailed installation instructions in the wiki.

The future of nflgame/nfldb

The code base in general has suffered from neglect; there are new (undocumented of course!) feeds to integrate with which can simplify a lot of the internals of nflgame. The relationship between these two projects also needs refactoring. This will affect nfldb a lot more than nflgame.

Are these stable?

nflgame - yes. There will be improvements to the quality and verbosity of the data. Worst case there will be some minor api changes. No major breaking changes. Should be easier to keep up-to-date.

nfldb - Probably not… I quite literally got this working and published in python3 yesterday. The game/player/play-by-play data should be relatively stable but the team model is lacking. Currently releasing under alpha status so expect breaking changes. The underlying db/query code is AMAZING; its more the data model that needs changing.

Thanks for your time! Also I cant emphasize enough that I am the maintainer of this code, but Andrew is by far the genius behind this. Show the dude some love.