MLB API: Get scores and schedule
Lists MLB games and scores for a date or up to seven days, optionally for one team. Start times are shown in the requested time zone.
Unofficial. Not affiliated with or endorsed by MLB.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Date optional
date First calendar date to show, for example 2026-09-29. Defaults to today.
2026-09-29
- Days optional
days Number of consecutive calendar days to show, for example 7.
1
Whole number from 1 to 7. Default
1.- Team optional
team Team name to include, for example New York Yankees or Yankees.
Not set
- Time Zone optional
time_zone Time zone for game start times, for example US Eastern or America/Los_Angeles.
US Eastern (default)
Input as JSON
{ "date": "2026-09-29", "days": 1}Output
{ "games": [ { "date": "2026-09-29", "inning": null, "status": "final", "game_id": 849845, "ballpark": "Truist Park", "away_runs": 3, "away_team": "Philadelphia Phillies", "game_link": "https://www.mlb.com/gameday/849845" , "home_runs": 5, "home_team": "Atlanta Braves", "start_time": "2026-09-29T14:00:00-04:00", "tv_channels": [ "NBC/Peacock" , "Universo/Peacock" ], "losing_pitcher": "Jhoan Duran", "winning_pitcher": "Dylan Lee", "away_probable_pitcher": null, "home_probable_pitcher": null }, { "date": "2026-09-29", "inning": null, "status": "final", "game_id": 849849, "ballpark": "Daikin Park", "away_runs": 6, "away_team": "Chicago White Sox", "game_link": "https://www.mlb.com/gameday/849849" , "home_runs": 3, "home_team": "Houston Astros", "start_time": "2026-09-29T17:00:00-04:00", "tv_channels": [ "Peacock/NBCSN" , "Universo/Peacock" ], "losing_pitcher": "AJ Blubaugh", "winning_pitcher": "Jordan Hicks", "away_probable_pitcher": null, "home_probable_pitcher": null }, { "date": "2026-09-29", "inning": null, "status": "final", "game_id": 849851, "ballpark": "Yankee Stadium", "away_runs": 0, "away_team": "Boston Red Sox", "game_link": "https://www.mlb.com/gameday/849851" , "home_runs": 9, "home_team": "New York Yankees", "start_time": "2026-09-29T20:00:00-04:00", "tv_channels": [ "NBC/Peacock" , "Universo/Peacock" ], "losing_pitcher": "Payton Tolle", "winning_pitcher": "Cam Schlittler", "away_probable_pitcher": null, "home_probable_pitcher": null } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"mlb.com/get_scores","input":{"date":"2026-09-29","days":1}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "mlb.com/get_scores" , "input": { "date": "2026-09-29", "days": 1 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "mlb.com/get_scores" , "input": { "date": "2026-09-29", "days": 1 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run mlb.com/get_scores# with {"date":"2026-09-29","days":1}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [], "properties": { "date": { "type": "string", "description": "First calendar date to show, for example 2026-09-29. Defaults to today." }, "days": { "type": "integer", "default": 1, "maximum": 7, "minimum": 1, "description": "Number of consecutive calendar days to show, for example 7." }, "team": { "type": "string", "description": "Team name to include, for example New York Yankees or Yankees." }, "time_zone": { "type": "string", "default": "US Eastern", "description": "Time zone for game start times, for example US Eastern or America/Los_Angeles." } }}Output schema
{ "type": "object", "required": [ "games" ], "properties": { "games": { "type": "array", "items": { "type": "object", "required": [ "date", "start_time", "away_team", "home_team", "away_runs", "home_runs", "status", "inning", "away_probable_pitcher", "home_probable_pitcher", "winning_pitcher", "losing_pitcher", "tv_channels", "ballpark", "game_link", "game_id" ], "properties": { "date": { "type": "string", "description": "Official game date." }, "inning": { "type": [ "string", "null" ], "description": "Current half-inning for live games." }, "status": { "type": "string", "description": "Scheduled, live, final, postponed or cancelled." }, "game_id": { "type": "integer", "description": "MLB game ID." }, "ballpark": { "type": [ "string", "null" ] }, "away_runs": { "type": [ "integer", "null" ] }, "away_team": { "type": "string" }, "game_link": { "type": "string" }, "home_runs": { "type": [ "integer", "null" ] }, "home_team": { "type": "string" }, "start_time": { "type": [ "string", "null" ], "description": "Scheduled start in the selected time zone; null when not announced." }, "tv_channels": { "type": "array", "items": { "type": "string" } }, "losing_pitcher": { "type": [ "string", "null" ] }, "winning_pitcher": { "type": [ "string", "null" ] }, "away_probable_pitcher": { "type": [ "string", "null" ] }, "home_probable_pitcher": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "description": "Games in start-time order." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
mlb.com/get_scores- Returns
- games with date, start time, teams, runs, status, inning, pitchers, TV channels, ballpark and game link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method mlb.com/get_scores with the inputs above.
Ask your agent
- What MLB games are on for 2026-09-29 and what are the current scores?
- Show me Yankees games this week with start times in Pacific time
- Any Dodgers results from yesterday on mlb.com, including the pitchers?
- List every MLB game over the next seven days starting 2026-10-02, times in America/Chicago
- Which TV channels are showing the Cubs game today and what inning is it in?
See more
All MLB methodsReturns MLB regular-season division standings for a season: records, win percentage, games back, streak, last 10 games and wild-card games back. Defaults to the current year.
mlb.com/get_standingsGets an MLB player's profile and regular-season hitting and pitching statistics for one season and for his career. Without a season it uses the current season, or the player's latest MLB season if he has no stats this year.
mlb.com/get_player_statsLists NHL games for a date, optionally limited to one team, with start times in the chosen time zone, scores, status, and TV networks.
nhl.com/get_scoresGets ESPN scores and the schedule for a league on a local day. You can filter by team, and start times are shown in your time zone.
espn.com/get_scoresGets NBA games for a date or up to seven days, using the NBA games calendar in US Eastern time. Each game has its score, status, start time, TV channels and venue.
nba.com/get_scoresGets scores and schedules for a league on a date, or for the football week that contains the date. Results can be limited to one team. Venue names come from each game page, for up to 22 games.
sports.yahoo.com/get_scoresGets NFL scores and scheduled games for the week that contains a date. You can keep only one team's games. Kickoff times are in US Eastern time unless you choose another time zone.
nfl.com/get_scoresFinds the latest game between two teams, or their game on a given date, in major US leagues, MLS or the EPL. Returns the score, scoring by period, leading players, team stats and player box scores.
espn.com/get_game_summary