NHL.com + Sochi 2014 Data URLs in JSON and JSONP

Bear of Bad News

Your Third or Fourth Favorite HFBoards Admin
Sep 27, 2005
13,507
26,878
Dropping this @norrisnick post here because I think it's a valuable article on how to use the NHL API:



Is anyone aware of an American Hockey League API tutorial?
 
  • Like
Reactions: LT

Bear of Bad News

Your Third or Fourth Favorite HFBoards Admin
Sep 27, 2005
13,507
26,878
Going to ask a dumb question - my favorite. I do most of my stuff in Excel with VBA (I know, I know) and I want to pull the API down into that structure using Power Query.

I've dinked around for a couple of hours at this point and I'm not making good headway, so I figure I'd ask if anyone's tried this and wouldn't mind sharing an example or two (say, pulling from the live feed the end-of-game statistics for each player?). Or hell, just something that spits out the entire live feed into a semi-structure in Excel where things can be found and parsed there?

Code would be ideal because the data controls on this machine will prohibit me from downloading working Excel models.
 
Last edited:

Bear of Bad News

Your Third or Fourth Favorite HFBoards Admin
Sep 27, 2005
13,507
26,878
For instance, if I do this:

1698715898432.png


I can see all of player 8446261 (Randy Cunneyworth)'s game stats for game #2 of the 1997-98 season:

1698715992297.png


And I could then pick a single statistic and load it. Is there a way that I could pull *all* statistics for a given player/game into Excel?

More generally, is there a way that I can do conditionals (say, pull all goalie stats from game #2 of the 1997-98 season for all [ID] where [IDxxxxxxx].[position].[code ] = "G"?)
 

Cowumbus

Registered User
Mar 1, 2014
11,617
6,408
Arena District - Columbus
For instance, if I do this:

View attachment 760552

I can see all of player 8446261 (Randy Cunneyworth)'s game stats for game #2 of the 1997-98 season:

View attachment 760554

And I could then pick a single statistic and load it. Is there a way that I could pull *all* statistics for a given player/game into Excel?

More generally, is there a way that I can do conditionals (say, pull all goalie stats from game #2 of the 1997-98 season for all [ID] where [IDxxxxxxx].[position].[code ] = "G"?)
I can look into this tomorrow assuming I remember.

I haven’t looked into this data location, but just by your code it looks like you will need to remove some lines, then use the filters after the data is already brought by in.
 
  • Love
Reactions: Bear of Bad News

Bear of Bad News

Your Third or Fourth Favorite HFBoards Admin
Sep 27, 2005
13,507
26,878
Thank you! I've been hammering at different things but not making much progress (it appears to be hard to make progress in 20-minute increments via trial and error :D ).
 

Bear of Bad News

Your Third or Fourth Favorite HFBoards Admin
Sep 27, 2005
13,507
26,878
Anyone aware of an American Hockey League API? Reddit is suggesting it's (at minimum) hard to get.
 

Bear of Bad News

Your Third or Fourth Favorite HFBoards Admin
Sep 27, 2005
13,507
26,878
Is there any official announcement or literature pointing towards it? I might be able to help procure it, but I want to see how it's "advertised" (or not)...

Nothing official as far as I can see. I've been trying to reverse engineer something from their game center pages:

view-source:TheAHL.com | The American Hockey League

And I'm coming up wanting.
 

Bear of Bad News

Your Third or Fourth Favorite HFBoards Admin
Sep 27, 2005
13,507
26,878
I haven't tried that route yet (good find!) - it does look promising (it appears to be same tech that a lot of the minor leagues use, so could open up a lot of avenues with one screwdriver).
 
  • Like
Reactions: Michael Farkas

Michael Farkas

Celebrate 68
Jun 28, 2006
13,448
7,985
NYC
www.hockeyprospect.com
I haven't tried that route yet (good find!) - it does look promising (it appears to be same tech that a lot of the minor leagues use, so could open up a lot of avenues with one screwdriver).
Indeed that is the direction this is heading...response from the AHL.
"Our stats hosts at FloSports have API subscriptions available for some AHL content. You can contact them at [email protected] for pricing and details."
 

Ad

Upcoming events

Ad

Ad