Long Live the MLB XML API

If you have followed my other posts regarding the MLB LED scoreboard project, you will know that it uses a dependency called mlbgame to consume a version of the MLB API that we knew would eventually be deprecated. If that happened, our data source for the entire project would be defunct and the scoreboard would be effectively dead in the water (useful as a weather center, though!).

That day has since arrived. With it comes the fact that the scoreboard does not work in its current state and it was determined that moving to the newer API (called the MLBStatsAPI) would be a large and time-consuming effort for the maintainers of the project. I’ve contributed a small piece to the project by consuming MLBStatsAPI for league standings, but a general drop-in replacement was definitely a larger ask.

With luck, a community member has made the switch for us, and just in the nick of time for the opening weekend of the MLB season. Contributor Brian Ward put together a massive fork fo the entire project and converted all calls from the old XML API to the new MLBStatsAPI via a new wrapper object. His changes brought exciting new quality-of-life improvements as well, such as finally moving away from Python 2 in favor of Python 3 – not without its own migration issues, but a welcome change nonetheless. And I might be a bit biased, but the MLB LED scoreboard now supports emulation out of the box via RGBMatrixEmulator, though you’ll have to install it yourself.


Huge kudos to the team of contributors for mlb-led-scoreboard for responding so quickly at the beginning of the MLB season when we realized the data source was no longer functioning.

That’s all for now. Thanks for reading!