Hacker News new | past | comments | ask | show | jobs | submit login

I didn't see an "About" page so would you mind sharing where the MLB data is coming from? Back in the day when I did a tennis scoring app[1] for fun, I screen-scraped the match data from a sports betting site.

[1] https://github.com/hbcondo/TennisWMC




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.


> 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.


I 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.


I 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.


The 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.


ESPN API is my guess.

Using the team logos is likely not permissible, legally speaking, although I hope I’m wrong. Projects like these are great.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: