MLB API: Get standings
Returns 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.
Unofficial. Not affiliated with or endorsed by MLB.
Inputs
Values from the run on Oct 27, 2026, shown under Output.
- Season optional
season MLB season year, for example 2025. Defaults to the current year.
Not set
Whole number 1876 or more.
Input as JSON
{}Output
{ "teams": [ { "rank": 1, "team": "Tampa Bay Rays", "wins": 98, "league": "American League", "losses": 64, "streak": "Lost 1", "last_10": "5-5", "division": "AL East", "page_url": "https://www.mlb.com/rays" , "games_back": "-", "win_percentage": 0.605, "wild_card_games_back": "-" }, { "rank": 2, "team": "New York Yankees", "wins": 93, "league": "American League", "losses": 68, "streak": "Won 1", "last_10": "5-5", "division": "AL East", "page_url": "https://www.mlb.com/yankees" , "games_back": "4.5", "win_percentage": 0.578, "wild_card_games_back": "+9.5" }, { "rank": 3, "team": "Boston Red Sox", "wins": 87, "league": "American League", "losses": 75, "streak": "Lost 1", "last_10": "5-5", "division": "AL East", "page_url": "https://www.mlb.com/redsox" , "games_back": "11.0", "win_percentage": 0.537, "wild_card_games_back": "+3.0" } ], "season": 2026}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"mlb.com/get_standings","input":{}}' # 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_standings" , "input": {}})# 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_standings" , "input": {} }), 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_standings# with {}"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": { "season": { "type": "integer", "minimum": 1876, "description": "MLB season year, for example 2025. Defaults to the current year." } }}Output schema
{ "type": "object", "required": [ "season", "teams" ], "properties": { "teams": { "type": "array", "items": { "type": "object", "required": [ "league", "division", "rank", "team", "wins", "losses", "win_percentage", "page_url" ], "properties": { "rank": { "type": "integer" }, "team": { "type": "string" }, "wins": { "type": "integer" }, "league": { "type": "string" }, "losses": { "type": "integer" }, "streak": { "type": [ "string", "null" ] }, "last_10": { "type": [ "string", "null" ] }, "division": { "type": "string" }, "page_url": { "type": "string" }, "games_back": { "type": [ "string", "null" ] }, "win_percentage": { "type": "number" }, "wild_card_games_back": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "description": "Teams ordered by league, division and division rank." }, "season": { "type": "integer", "description": "Standings season year." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
mlb.com/get_standings- Returns
- league, division, rank, team, wins, losses, win percentage, games back, streak, last 10, wild-card games back, team page
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_standings with the inputs above.
Ask your agent
- What are the current MLB division standings with win-loss records and games back?
- Show me the 2024 MLB standings for the American League East including streaks and last 10 results.
- Which teams lead their divisions right now, and how many wild-card games back is each team?
- Can you pull up the 1998 MLB standings by division with win percentages?
- On mlb.com, what do the 2019 National League Central standings look like, including each team's last 10 games?
See more
All MLB methodsLists 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.
mlb.com/get_scoresGets 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_statsGets NFL regular-season standings by conference and division for a season, with clinch status when shown.
nfl.com/get_standingsReturns Yahoo Sports team standings for a league and season, grouped by division or conference.
sports.yahoo.com/get_standingsReturns NBA regular-season standings for a season, with Eastern and Western Conference teams in rank order. Defaults to the season shown on the NBA standings page.
nba.com/get_standingsGets NHL standings as of a date, ordered by conference, division and division rank, with each team's official homepage.
nhl.com/get_standingsGets Formula 1 drivers' and teams' championship standings for a season, with the last completed race. Teams' standings begin in 1958.
formula1.com/get_standingsGets the Premier League table for the current season or a chosen season, with each club's last five league results.
premierleague.com/get_league_table