APIs for game schedules

ImKittr

Registered User
May 24, 2018
42
17
Hello HF,

I'm looking for simple way to query game schedules and statistics for various hockey leagues(USHL, WHL, OHL, AHL, QMJHL, MHL, SHL and 20 others). Do you know if something like that exists?
 

JetsFan815

Registered User
Jan 16, 2012
19,211
24,262
I don't know of any API that is available. However you can go to the schedule page on the websites of the leagues you are interested in and if you are lucky those league pages calling a JSON API to get the schedule, you can open the network tab in your browser and observe the calls they are making to fetch the schedule and replicate them. For example the OHL, WHL, QMJHL are backed by the same underlying systems, the APIs they call to get the schedule looks like:


OHL:

https://lscluster.hockeytech.com/fe...n&season_id=68&team_id=&league_code=&fmt=json

WHL:

https://lscluster.hockeytech.com/fe...&season_id=270&team_id=&league_code=&fmt=json

QMJHL:

https://lscluster.hockeytech.com/fe...&season_id=193&team_id=&league_code=&fmt=json

For AHL and USHL it seems the backend returns a rendered HTML page for the schedule so doesn't seem like it's easy to figure out the api its calling to render the page so you might have to parse the html.

For all the other leagues you will have to look at the schedule page of that league and try to figure out if it is rendering the page client side by calling a json api (like OHL/WHL/QMJHL) and if so you can just copy that url and use it in your system or if it's returning a rendered HTML page (like AHL ) in which case you will have to write code to parse that HTML. Since this process will be most likely different for each league, it is a fair amount of work. I am not aware of an all encompassing API to fit your needs.
 
  • Like
Reactions: ImKittr

Ad

Upcoming events

Ad

Ad