Tutorial · 10 min · endpoints verified 2026-09-20
How to build an MLB pitching dashboard
Separate pitching rows, preserve source precision, and compare innings, strikeouts, walks and run prevention over time.
API coverage and endpoint overview: Explore the MLB API
Why this is hard
Pitching lines need baseball-aware parsing
Innings pitched is not an ordinary decimal and a player response can contain more than one statistical role.
- Use position and pitching-only fields together.
- Preserve display precision.
- Do not add missing innings.
- Keep game and season populations distinct.
Path 1 · recommended
Have your AI agent build it
MCP can retrieve a known pitcher’s player stats; REST supplies match and game-log context.
1. Connect the MCP server
Add the server in your MCP client and sign in with your Big Balls account. Your client registers itself and handles the token exchange — there is no key to copy.
{
"mcpServers": {
"bigballs-sports-data": {
"url": "https://mcp.bigballsdata.com/mcp"
}
}
}2. Tools your agent gets
find_playersFind canonical player IDs by name for use with player-stat tools.
get_player_statsPer-player career or per-season totals and per-game rates.
get_coverageMachine-readable map of what we hold and what we do not.
3. Ask for what you want
Paste this at your agent. It is written to make the model check coverage before it designs anything, which is what stops it inventing a field we do not serve.
Build an MLB pitching dashboard for player ids I provide. Show only returned pitching fields, retain string precision for IP and ERA, and label missing fields unavailable.What the agent cannot reach
MCP has no rolling-stats or match-stat tool. Use REST for those surfaces.
Path 2 · hand-coded
Build it yourself
Use pitching-specific keys without assuming every provider populated the same line.
- 01
Open one finished game box score
The match-stat response attaches players, teams, headshots and stat maps to one game id.
Game pitching linesbashcurl -s "https://api.bigballsdata.com/v1/stored/matches/$MATCH_ID/stats?sport=baseball" \ -H "x-api-key: $BBS_API_KEY" - 02
Select pitching rows
Prefer position P and confirm the row carries pitching fields such as IP, ERA or WHIP.
Pitcher guardtypescriptconst pitchers = data.players.filter((p) => p.position === 'P' || ['IP', 'ERA', 'WHIP'].some((key) => p.stats[key]) ); - 03
Load the player history
Use the canonical player id for season and game-log comparisons.
Pitcher game logbashcurl -s "https://api.bigballsdata.com/v1/players/$PLAYER_ID/game-log?sport=baseball" \ -H "x-api-key: $BBS_API_KEY"
Reference
Every endpoint this tutorial uses
All on the gateway at api.bigballsdata.com. Verified against production on 2026-09-20.
| Method | Path | Returns | Why you need it | Plan |
|---|---|---|---|---|
| GET | /v1/stored/matches/:id/stats?sport=baseball | Team and player match stat maps | Provides factual pitching lines for one game. | Free |
| GET | /v1/players/:id/stats?sport=baseball | Pitcher season fields where populated | Drives the profile summary. | Free |
| GET | /v1/players/:id/game-log?sport=baseball | Per-game pitching history | Supports trend charts and recent starts. | Free |
Pricing, honestly
The first pitching dashboard is Free
Core match and player lines are Free. Paid plans add quota, history and deeper production capabilities rather than changing baseball notation.
Free key
Current match stats and player game logs.Solo
More seasons, rolling form and production scale.- Retain IP as served.
- Show the source timestamp.
- Do not infer pitch-level fields.
More tutorials
Other build guides
- How to build a fantasy hockey app
- How to build a fantasy basketball app
- How to build a soccer xG app
- How to build a cricket app
- NFL fantasy football API tutorial
- How to build an NFL scouting tool
- How to build an NFL conditions analytics tool
- NFL betting model API tutorial
- NFL live game center API tutorial
- How to build an NCAAF scoreboard and live game center
- How to build college football rankings and conference standings
- How to build an NCAAF fantasy football app
- How to build an MLB live scoreboard
- How to build a fantasy baseball app
- How to build an MLB betting model
- How to build an MLB standings dashboard
- How to build a soccer fantasy app
- How to build a soccer betting model
- How to build a soccer live match center
- How to build a soccer scouting tool
- How to build an NCAAF betting model
- How to build an NCAAF conditions analytics tool
- How to build a WNBA live scoreboard
- How to build a WNBA quarter tracker
- How to build a WNBA odds board
- How to build a WNBA schedule browser
- How to build a WNBA team-form tool
- How to build an NCAAB scoreboard
- How to build a March Madness archive
- How to build an NCAAB game-detail view
- How to build an NCAAB team-form dashboard
- How to build an NCAAB head-to-head tool
Known gaps
What this is not
This guide is a box-score dashboard, not a public pitch-tracking product.
- Pitch-level data remains a separate in-development public surface.
- Pitcher role can vary.
- Historical player lines are narrower than game history.
Questions
- Can I parse innings pitched as a normal decimal?
- No. Baseball notation uses the fractional digit for outs, so preserve the served display value unless you deliberately convert it.
- Does every pitcher have ERA and WHIP?
- No. Render only populated fields and keep missing distinct from zero.
- Does this include every pitch?
- No. This uses box-score and game-log surfaces; the public pitch-level endpoint is still in development.