Baseball Stats API

Eight fictional baseball teams with batting and pitching stats, a scoreboard, live games advanced inning by inning (extra innings included), play-by-play, standings and leaders.

Base URL: https://funapi.dev/api/baseball/v1 · 11 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.

teams

teams and rosters

players

players and stats

games

scoreboard and live games

season

standings and leaders

The Baseball Stats API is a fictional nine-inning league with batting and pitching numbers, a scoreboard, standings and leaders — including ERA, where the best value is the lowest, which is exactly the kind of rule a sort test should catch. Live games advance inning by inning, and a tied game is settled with a walk-off in the ninth so a final is never a draw.

What you can practise here

Example request and response

GET https://funapi.dev/api/baseball/v1/teams — List the 8 teams. No token, no signup:

curl -i https://funapi.dev/api/baseball/v1/teams

Response: 200 OK

{
  "league": "Fun Baseball League",
  "data": [
    {
      "id": 1,
      "city": "River City",
      "name": "Rapids",
      "fullName": "River City Rapids",
      "abbreviation": "RCR",
      "conference": "American",
      "venue": "River City Park"
    },
    {
      "id": 2,
      "city": "Maple Grove",
      "name": "Maples",
      "fullName": "Maple Grove Maples",
      "abbreviation": "MGM",
      "conference": "American",
      "venue": "Maple Grove Park"
    },
    {
      "id": 3,
      "city": "Fort Union",
      "name": "Patriots",
      "fullName": "Fort Union Patriots",
      "abbreviation": "FUP",
      "conference": "American",
      "venue": "Fort Union Field"
    },
    {
      "id": 4,
      "city": "Bluewater",
      "name": "Pelicans",
      "fullName": "Bluewater Pelicans",
      "abbreviation": "BWP",
      "conference": "American",
      "venue": "Bluewater Field"
    },
    {
      "id": 5,
      "city": "Desert Springs",
      "name": "Scorpions",
      "fullName": "Desert Springs Scorpions",
      "abbreviation": "DSS",
      "conference": "National",

(truncated — the full response comes back when you run it)

Open and run this endpoint

All 55 mock REST APIs

Use this response elsewhere

How these leagues differ from balldontlie

Last updated