5 ms·
I had once built a set of apps for Alexa and Google Assistant that gave scores for MLB. What I did was use the same endpoints that MLB used for their website. I
by dustincoates 3y ago
I had once built a set of apps for Alexa and Google Assistant that gave scores for MLB. What I did was use the same endpoints that MLB used for their website. It worked pretty well, except during spring training, because so many things happened there that didn't happen in the regular season (like a team playing two games at the same time) that my code just wasn't equipped for it.
- spike021 3y agoI did the same thing for an IRC bot a long time ago. Last I heard I think they have a more modern API now but I haven't personally checked it out.
- lesuorac 3y agoI know for the NHL the website API's were pretty detailed. Like you could get second-by-second data on who was on the ice despite the fact that they change those players without a stoppage in time.
- spike021 3y agoThe baseball one was too. Even down to balls and strikes counts within seconds of them happening. The downside back then was that usually the API consisted of just rendered JSON blobs at certain endpoints and they weren't documented at all. But hey, better than undocumented XML or needing to actually scrape the webpages, Heh.
- Kon-Peki 3y ago> What I did was use the same endpoints that MLB used for their website. Yes, MLB has/had multiple wide open APIs for grabbing real-time data. You can get 100+ data points for every single pitch, including how fast the ball is spinning as it leaves the pitchers hand. The major, major, major caveat is that the API includes a notice stating that usage of their API is for non-commercial purposes only, unless you have prior written permission. I’ve spoken with people that have tried to walk the line very closely, and they universally state that MLB lawyers are tenacious (but fair). I doubt this service has any chance of surviving without some sort of license - if they’re using the MLB APIs.