Tutorial · 8 min · endpoints verified 2026-09-20
How to build an MLB standings dashboard
Render the current table exactly as served, retain team identity, and avoid inventing division fields the response does not expose.
API coverage and endpoint overview: Explore the MLB API
Why this is hard
A standings table should not add structure it did not receive
The MLB response serves one league group with team rows; division membership is not exposed on each row.
- Use the nested standings group.
- Sort by served rank.
- Keep wins, losses and win percentage distinct.
- Do not infer divisions from team names.
Path 1 · recommended
Have your AI agent build it
MCP can fetch the current standings and team Elo 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
get_standingsLeague table with wins, losses, win_pct, games_played.
get_team_eloTeam Elo rating, rank and optional rating history.
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 standings dashboard. Fetch MLB standings, render the nested rows in served rank order, retain team ids and logos, and do not create AL/NL divisions unless a served field provides them.What the agent cannot reach
The standings row does not expose division or games-behind. Team Elo is optional context, not standings rank.
Path 2 · hand-coded
Build it yourself
Read the nested group and fail visibly if its shape changes.
- 01
Fetch the current table
Use the exact MLB league filter.
MLB standingsbashcurl -s "https://api.bigballsdata.com/v1/standings?league=MLB" \ -H "x-api-key: $BBS_API_KEY" - 02
Read the nested rows
The table is data.standings[0].rows, not a flat data array.
Shape-safe tabletypescriptconst group = response.data.standings?.[0]; const rows = Array.isArray(group?.rows) ? group.rows : []; const ordered = [...rows].sort((a, b) => a.rank - b.rank); - 03
Add recent team form
Use canonical team_id for optional form detail.
Team formbashcurl -s "https://api.bigballsdata.com/v1/teams/$TEAM_ID/form?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/standings?league=MLB | Current nested MLB standings group and team rows | Drives rank, W-L, win percentage, games played and streak. | Free |
| GET | /v1/teams/:id/form?sport=baseball | Recent results for one canonical team | Adds detail without changing the standings rank. | Free |
Pricing, honestly
The current table is Free
Free covers current standings and form. Paid plans add history, quota and other capabilities, not hidden division fields.
Free key
Current MLB rows and team form.Solo
More history and production scale.- Keep rank authoritative.
- Show updated_at.
- Do not derive divisions.
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 pitching dashboard
- How to build an MLB betting model
- 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
Table boundaries
The first version follows the response rather than a hand-maintained league model.
- Division membership is not on the row.
- Games-behind is not exposed.
- Historical standings are not implied by game history.
Questions
- Does the endpoint return AL and NL divisions?
- No. The current row does not expose division membership, so the tutorial renders one served table.
- Should I calculate rank from win percentage?
- No. Use the served rank; the response is the authority for its table order.
- Can I show recent form?
- Yes. Follow each canonical team id to the team-form endpoint and keep that display separate from standings rank.