How to Retrieve Player Stats from the NHL's undocumented REST API

How to Retrieve Player Stats from the NHL’s undocumented REST API

It’s that time of year again. Summer is coming to an end, Autumn is around the corner, and the NHL season is about to begin.

Jeez dude, awesome detective work here! I miss watching hockey – I was into the NHL around 2008, when the Red Wings won the Stanley Cup (I’m from Detroit, so it was a big deal, having been the first cup since Yzerman IIRC). Might have to start watching again this season.

Do you think they’ll be shutting this down or otherwise locking us out anytime soon? Any advice on how to programatically map out the endpoints? (It seems like they give links for certain endpoints for more data, at least, so it seems possible, but I’m curious if some are missing/incomplete). In any case, great stuff man! Keep 'em coming! :grin:

Thanks for the positive feedback.

I played around with this API about a year ago briefly and it appears to have stayed the same. I’m pretty sure they’re not doing away with it any time soon. I found some basic endpoints on Github and just started playing with the API and digging around. I’m not sure this API was intended for public use, as far as I know there is no official documentation.

As far as mapping out the endpoints I’m not sure. I’m a big Rangers fan and I’m working on a little project with this API that compares the Rangers top rookie (Kaapo Kakko) and the Devils top rookie (Jack Hughes) who are the number one and number two draft picks. I’m gonna compare stats, maybe do some data viz stuff with D3, etc… comparing the two players.

I’m sure I’ll get more familiar with the API as I work on this project. Maybe I’ll write another article in a few weeks after I discover/work with more endpoints.

Get back into hockey the Wings are gonna make a comeback in the next couple of years.:+1:

1 Like