MLB-StatsAPI
pybaseball
Our great sponsors
MLB-StatsAPI | pybaseball | |
---|---|---|
28 | 33 | |
470 | 1,123 | |
- | - | |
6.3 | 4.6 | |
4 months ago | 6 days ago | |
Python | Python | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
MLB-StatsAPI
-
I Built a Desktop Scoreboard to Follow Cardinals Games
Yeah, I used this API which made the code fairly straightforward: https://github.com/toddrob99/MLB-StatsAPI
-
Access Question
I don't know if you're using python, but even if not, there's info about the endpoints on the MLB-StatsAPI python wrapper wiki here.
- Innings data — am I calling the right API?
-
How to make a smaller call to https://statsapi.mlb.com/?
Yes, there are endpoints to get subsets of the game/live endpoint. The endpoints are documented here. You'll probably be interested in game_boxscore, game_linescore, and game_playByPlay.
-
Baseball Savant API
pybaseball and MLB-StatsAPI are the go-to python wrappers for the official MLB API.
- Data sources for MLB ABs?
-
Python for Baseball
The MLB-StatsAPI is really good too. The creator is active on the data sub, and I think is the mod of the sub.
-
API Endpoints?
The public endpoints are listed here. There is a statcast endpoint that's not listed there, but it requires authentication and MLB only gives access to teams and affiliates.
-
Python OOP Module for MLB Stats API ready for input
There are still several things that need completion, reactors, and documentation. If you are familiar with toddrob99's wrapper then some of this might be familiar. I must thank Toddrob for his work as we used a lot of his wiki and documentation to get started. https://github.com/toddrob99/MLB-StatsAPI
- MLB Stats API Question
pybaseball
- pybaseball help
- Best baseballdata source for datascraping
-
Baseball Savant API
pybaseball and MLB-StatsAPI are the go-to python wrappers for the official MLB API.
- Data sources for MLB ABs?
-
Looking for Spray Angle Data from this season (preferably)
I think pybaseball includes spray angle in their statcast() data frame! And if not, there definitely is the (x,y) location of where the ball landed, so you could probably do some trig to calculate that too.
-
Anyone willing to help create a webscrape for first pitch data?
Check out the docs here: https://github.com/jldbc/pybaseball/blob/master/docs/playerid_reverse_lookup.md
-
Python Code help
I think a lot of what you're looking to do though can be accomplished a bit easier by utilizing pre-existing Python libraries like Pybaseball.
- Help running pybaseball commands in Python
-
MLB Stats API Application time?
most folks without direct access to mlb's api scrape baseball savant's data api. packages like baseballr or pybaseball can help with this. remember, this is in the open on a trust model: no commercial use, and don't hammer the api.
-
Where to get started analyzing basic baseball metrics
And if you’re using Python, it’s pybaseball I believe. https://github.com/jldbc/pybaseball
What are some alternatives?
BaseballTheater
baseballr - A package written for R focused on baseball analysis. Currently in development.
mlbgame - A Python API to retrieve and read MLB GameDay data
boxball - Prebuilt Docker images with Retrosheet's complete baseball history data for many analytical frameworks. Includes Postgres, cstore_fdw, MySQL, SQLite, Clickhouse, Drill, Parquet, and CSV.
mangadex - A python wrapper for the mangadex API V5. Work in progress
sports.py - A simple Python package to gather live sports scores
MLB-Sharp - Unofficial .NET wrapper library for the MLB Stats API. [Moved to: https://github.com/markjamesm/Baseball-Sharp]
mara-pipelines - A lightweight opinionated ETL framework, halfway between plain scripts and Apache Airflow
zenpy - Python wrapper for the Zendesk API
strat-o-rama - Generating plausible Strat-O-Matic cards from MLB data
hvcc - The heavy hvcc compiler for Pure Data patches.
baseball-pi - Get the live box score, plays, and batter stats of your favorite MLB team right on your desktop.