# ESPN API

> ESPN returns sports scores, schedules, player statistics, game summaries and news as a workflow and API.

ESPN returns league scores and schedules for a selected date, with an optional team filter and time zone. Get team schedule returns past results and upcoming games for a team and season; Get player stats returns season and career statistics by player name. Get game summary returns matchup scores and available game statistics for two teams; List news returns headlines for a league or team.

- Page: https://fous.com/tools/espn
- Handle: `@espn`
- Category: [Sports](https://fous.com/tools/category/sports)
- Source website: https://espn.com
- Last verified: Sep 28, 2026

## Methods

### Get game summary

Operation `get_game_summary`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the latest or dated matchup between two teams, with the score, period scoring, leading players, team stats, and player box scores. Supports major US leagues and selected soccer leagues; unavailable stats are omitted.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | no | `"2026-09-25"` | Game date, for example 2026-02-22. If omitted, find the most recent game. |
| `league` | string | no | `"MLB"` | League if team names are ambiguous, for example NBA. |
| `team_1` | string | yes | `"Yankees"` | First team name, such as Lakers. |
| `team_2` | string | yes | `"Orioles"` | Second team name, such as Celtics. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "team_1",
    "team_2"
  ],
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Game date, for example 2026-02-22. If omitted, find the most recent game.",
      "examples": [
        "2026-09-25",
        "2026-09-27"
      ]
    },
    "league": {
      "type": "string",
      "description": "League if team names are ambiguous, for example NBA.",
      "examples": [
        "MLB",
        "NFL"
      ]
    },
    "team_1": {
      "type": "string",
      "description": "First team name, such as Lakers.",
      "examples": [
        "Yankees",
        "Lakers",
        "Bills"
      ]
    },
    "team_2": {
      "type": "string",
      "description": "Second team name, such as Celtics.",
      "examples": [
        "Orioles",
        "Celtics",
        "Chargers"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "2026-09-25",
      "league": "MLB",
      "team_1": "Yankees",
      "team_2": "Orioles"
    },
    {
      "team_1": "Lakers",
      "team_2": "Celtics"
    },
    {
      "date": "2026-09-27",
      "league": "NFL",
      "team_1": "Bills",
      "team_2": "Chargers"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `score` | object |  |  |
| `score.team_1` | string | `"New York Yankees"` |  |
| `score.team_2` | string | `"Baltimore Orioles"` |  |
| `score.team_1_score` | integer or null | `6` |  |
| `score.team_2_score` | integer or null | `3` |  |
| `venue` | string or null | `"Yankee Stadium"` |  |
| `league` | string | `"Major League Baseball"` |  |
| `status` | string or null | `"Final"` |  |
| `event_id` | string | `"401817073"` |  |
| `date_time` | string | `"2026-09-25T23:30:00+00:00"` | Game start in ISO 8601 with UTC offset. |
| `game_link` | string | `"https://www.espn.com/mlb/boxscore/_/gameId/401817073"` |  |
| `attendance` | integer or null | `46656` |  |
| `team_stats` | array |  |  |
| `team_stats[].stat` | string | `"Strikeouts"` |  |
| `team_stats[].team_1_value` | string or null | `"12"` |  |
| `team_stats[].team_2_value` | string or null | `"17"` |  |
| `top_performers` | array |  |  |
| `top_performers[].team` | string | `"New York Yankees"` |  |
| `top_performers[].player` | string | `"Anthony Volpe"` |  |
| `top_performers[].stat_line` | string | `"Hits per At Bats: 1-4, At Bats: 4, Runs: 0, Hits: 1, Runs Batted In: 2"` |  |
| `player_box_score` | array |  |  |
| `player_box_score[].team` | string | `"Baltimore Orioles"` |  |
| `player_box_score[].stats` | object |  |  |
| `player_box_score[].player` | string | `"Dylan Beavers"` |  |
| `player_box_score[].category` | string or null | `"Batting"` |  |
| `player_box_score[].position` | string or null | `"Left Fielder"` |  |
| `scoring_by_period` | array |  |  |
| `scoring_by_period[].period` | string | `"Inning 1"` |  |
| `scoring_by_period[].team_1_points` | integer or null | `0` |  |
| `scoring_by_period[].team_2_points` | integer or null | `0` |  |

**Example input**

```json
{
  "date": "2026-09-25",
  "league": "MLB",
  "team_1": "Yankees",
  "team_2": "Orioles"
}
```

**Example output**

```json
{
  "score": {
    "team_1": "New York Yankees",
    "team_2": "Baltimore Orioles",
    "team_1_score": 6,
    "team_2_score": 3
  },
  "venue": "Yankee Stadium",
  "league": "Major League Baseball",
  "status": "Final",
  "event_id": "401817073",
  "date_time": "2026-09-25T23:30:00+00:00",
  "game_link": "https://www.espn.com/mlb/boxscore/_/gameId/401817073",
  "attendance": 46656,
  "team_stats": [
    {
      "stat": "Strikeouts",
      "team_1_value": "12",
      "team_2_value": "17"
    }
  ],
  "top_performers": [
    {
      "team": "New York Yankees",
      "player": "Anthony Volpe",
      "stat_line": "Hits per At Bats: 1-4, At Bats: 4, Runs: 0, Hits: 1, Runs Batted In: 2"
    }
  ],
  "player_box_score": [
    {
      "team": "Baltimore Orioles",
      "stats": {
        "Hits": "1",
        "Runs": "1",
        "Walks": "0",
        "At Bats": "5",
        "Home Runs": "1",
        "Strikeouts": "2",
        "Pitches Seen": "19",
        "Runs Batted In": "1",
        "Batting Average": ".228",
        "Hits per At Bats": "1-5",
        "On Base Percentage": ".307",
        "Slugging Percentage": ".373"
      },
      "player": "Dylan Beavers",
      "category": "Batting",
      "position": "Left Fielder"
    }
  ],
  "scoring_by_period": [
    {
      "period": "Inning 1",
      "team_1_points": 0,
      "team_2_points": 0
    }
  ]
}
```

### Get player stats

Operation `get_player_stats`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get a player’s season and career statistics from ESPN by name. Choose a league to distinguish names or a past season; soccer career totals cover the displayed competition, and nonnumeric stats are omitted.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `league` | string | no | `"NBA"` | League to distinguish players with the same name, for example NFL. |
| `player` | string | yes | `"LeBron James"` | Player name, for example Patrick Mahomes. |
| `season` | string | no | `"2024"` | Season year or season label, for example 2024 or 2024-25. Defaults to the latest available season. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "player"
  ],
  "properties": {
    "league": {
      "type": "string",
      "default": "",
      "description": "League to distinguish players with the same name, for example NFL.",
      "examples": [
        "NBA",
        "MLB",
        "MLS"
      ]
    },
    "player": {
      "type": "string",
      "description": "Player name, for example Patrick Mahomes.",
      "examples": [
        "LeBron James",
        "Patrick Mahomes",
        "Shohei Ohtani"
      ]
    },
    "season": {
      "type": "string",
      "default": "",
      "description": "Season year or season label, for example 2024 or 2024-25. Defaults to the latest available season.",
      "examples": [
        "2024"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "league": "NBA",
      "player": "LeBron James",
      "season": "2024"
    },
    {
      "player": "Patrick Mahomes"
    },
    {
      "league": "MLB",
      "player": "Shohei Ohtani"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `age` | integer or null | `41` |  |
| `team` | string or null | `"Philadelphia 76ers"` |  |
| `stats` | array |  |  |
| `stats[].stat_name` | string | `"Games Played"` |  |
| `stats[].career_value` | number | `1622` |  |
| `stats[].season_value` | number | `70` |  |
| `stats[].stat_abbreviation` | string or null | `"GP"` |  |
| `height` | string or null | `"6' 9\""` |  |
| `league` | string | `"NBA"` |  |
| `season` | string | `"2024-25"` |  |
| `weight` | string or null | `"250 lbs"` |  |
| `position` | string or null | `"Forward"` |  |
| `player_id` | string | `"1966"` |  |
| `player_name` | string | `"LeBron James"` |  |
| `jersey_number` | string or null | `"23"` |  |
| `espn_player_link` | string | `"https://www.espn.com/nba/player/_/id/1966/lebron-james"` |  |
| `headshot_image_link` | string or null | `"https://a.espncdn.com/i/headshots/nba/players/full/1966.png"` |  |

**Example input**

```json
{
  "league": "NBA",
  "player": "LeBron James",
  "season": "2024"
}
```

**Example output**

```json
{
  "age": 41,
  "team": "Philadelphia 76ers",
  "stats": [
    {
      "stat_name": "Games Played",
      "career_value": 1622,
      "season_value": 70,
      "stat_abbreviation": "GP"
    },
    {
      "stat_name": "Games Started",
      "career_value": 1620,
      "season_value": 70,
      "stat_abbreviation": "GS"
    },
    {
      "stat_name": "Minutes Per Game",
      "career_value": 37.6,
      "season_value": 34.9,
      "stat_abbreviation": "MIN"
    }
  ],
  "height": "6' 9\"",
  "league": "NBA",
  "season": "2024-25",
  "weight": "250 lbs",
  "position": "Forward",
  "player_id": "1966",
  "player_name": "LeBron James",
  "jersey_number": "23",
  "espn_player_link": "https://www.espn.com/nba/player/_/id/1966/lebron-james",
  "headshot_image_link": "https://a.espncdn.com/i/headshots/nba/players/full/1966.png"
}
```

### Get scores

Operation `get_scores`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get ESPN scores and schedule for a league on a day, optionally filtered by team, with game times in your time zone. Player leaders and TV details appear when ESPN provides them; ESPN may show a limited college scoreboard selection.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | no | `"2026-04-16"` | Local calendar date, for example 2026-09-27. Defaults to today in the selected time zone. |
| `team` | string | no | `"Orlando Magic"` | Keep games for this team, for example Boston Celtics. |
| `league` | string | yes | `"NBA"` | League name, such as NBA, NFL, Premier League or college football. |
| `time_zone` | string | no | `"London"` | City or time zone for dates and start times, for example London or America/New_York. Defaults to US Eastern. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "league"
  ],
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Local calendar date, for example 2026-09-27. Defaults to today in the selected time zone.",
      "examples": [
        "2026-04-16",
        "2026-09-27",
        "2026-04-15"
      ]
    },
    "team": {
      "type": "string",
      "description": "Keep games for this team, for example Boston Celtics.",
      "examples": [
        "Orlando Magic",
        "Boston Celtics",
        "Minnesota Lynx"
      ]
    },
    "league": {
      "type": "string",
      "description": "League name, such as NBA, NFL, Premier League or college football.",
      "examples": [
        "NBA",
        "NFL",
        "Premier League"
      ]
    },
    "time_zone": {
      "type": "string",
      "default": "US Eastern",
      "description": "City or time zone for dates and start times, for example London or America/New_York. Defaults to US Eastern.",
      "examples": [
        "London"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "2026-04-16",
      "team": "Orlando Magic",
      "league": "NBA",
      "time_zone": "London"
    },
    {
      "date": "2026-09-27",
      "league": "NFL"
    },
    {
      "date": "2026-04-15",
      "team": "Boston Celtics",
      "league": "NBA",
      "time_zone": "London"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `games` | array |  | Games in local start-time order. |
| `games[].clock` | string or null |  | Game clock when live. |
| `games[].venue` | string or null | `"Xfinity Mobile Arena"` |  |
| `games[].period` | string or null |  | Game period when live. |
| `games[].status` | string | `"final"` | Scheduled, live, final or an exceptional ESPN status such as canceled or postponed. |
| `games[].away_team` | string | `"Orlando Magic"` |  |
| `games[].game_link` | string | `"https://www.espn.com/nba/game/_/gameId/401866757/magic-76ers"` |  |
| `games[].home_team` | string | `"Philadelphia 76ers"` |  |
| `games[].away_score` | integer or null | `97` |  |
| `games[].home_score` | integer or null | `109` |  |
| `games[].start_time` | string | `"2026-04-16T00:30:00+01:00"` | Local start time in ISO 8601 with UTC offset. |
| `games[].tv_network` | string or null | `"Prime Video"` |  |
| `games[].espn_event_id` | string | `"401866757"` |  |
| `games[].top_performers` | array |  |  |

**Example input**

```json
{
  "date": "2026-04-16",
  "team": "Orlando Magic",
  "league": "NBA",
  "time_zone": "London"
}
```

**Example output**

```json
{
  "games": [
    {
      "clock": null,
      "venue": "Xfinity Mobile Arena",
      "period": null,
      "status": "final",
      "away_team": "Orlando Magic",
      "game_link": "https://www.espn.com/nba/game/_/gameId/401866757/magic-76ers",
      "home_team": "Philadelphia 76ers",
      "away_score": 97,
      "home_score": 109,
      "start_time": "2026-04-16T00:30:00+01:00",
      "tv_network": "Prime Video",
      "espn_event_id": "401866757",
      "top_performers": [
        {
          "team": "Philadelphia 76ers",
          "player": "Tyrese Maxey",
          "stat_line": "31 PTS, 6 AST"
        },
        {
          "team": "Orlando Magic",
          "player": "Desmond Bane",
          "stat_line": "34 PTS"
        }
      ]
    }
  ]
}
```

### Get team schedule

Operation `get_team_schedule`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get a team’s past results and upcoming games for a season, including opponents, local start times, scores, broadcasts and venues. Soccer fixtures include all competitions shown for the team; some games may have no published time or network.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `team` | string | yes | `"Dallas Cowboys"` | Team name, such as Dallas Cowboys or Real Madrid. |
| `league` | string | no |  | League to distinguish teams with similar names, such as NFL or Spanish LALIGA. |
| `season` | integer | no | `2025` | Starting year of the season, such as 2025 for 2025–26. Defaults to the current ESPN season. |
| `time_zone` | string | no |  | Time zone for game start times, such as US/Eastern or Europe/Madrid. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "team"
  ],
  "properties": {
    "team": {
      "type": "string",
      "description": "Team name, such as Dallas Cowboys or Real Madrid.",
      "examples": [
        "Dallas Cowboys",
        "Real Madrid"
      ]
    },
    "league": {
      "type": "string",
      "default": "",
      "description": "League to distinguish teams with similar names, such as NFL or Spanish LALIGA."
    },
    "season": {
      "type": "integer",
      "description": "Starting year of the season, such as 2025 for 2025–26. Defaults to the current ESPN season.",
      "x-fous-developer": false,
      "examples": [
        2025,
        2026
      ]
    },
    "time_zone": {
      "type": "string",
      "default": "US/Eastern",
      "description": "Time zone for game start times, such as US/Eastern or Europe/Madrid."
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "team": "Dallas Cowboys",
      "season": 2025
    },
    {
      "team": "Dallas Cowboys"
    },
    {
      "team": "Real Madrid",
      "season": 2026
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `team` | string | `"Dallas Cowboys"` |  |
| `games` | array |  |  |
| `games[].score` | string or null | `"20-24"` | Team score followed by opponent score, or null before the result is final. |
| `games[].venue` | string or null | `"Lincoln Financial Field"` |  |
| `games[].result` | string or null | `"loss"` |  |
| `games[].event_id` | string | `"401772510"` |  |
| `games[].opponent` | string | `"Philadelphia Eagles"` |  |
| `games[].date_time` | string or null | `"2025-09-04T20:20:00-04:00"` | Local start time in ISO 8601 with offset, or null if not set. |
| `games[].game_link` | string or null | `"https://www.espn.com/nfl/game/_/gameId/401772510/cowboys-eagles"` |  |
| `games[].home_away` | string | `"away"` |  |
| `games[].tv_network` | string or null | `"NBC, Peacock"` |  |
| `league` | string | `"NFL"` |  |
| `season` | integer | `2025` |  |
| `team_id` | string | `"6"` |  |
| `team_link` | string | `"https://www.espn.com/nfl/team/_/name/dal/dallas-cowboys"` |  |

**Example input**

```json
{
  "team": "Dallas Cowboys",
  "season": 2025
}
```

**Example output**

```json
{
  "team": "Dallas Cowboys",
  "games": [
    {
      "score": "20-24",
      "venue": "Lincoln Financial Field",
      "result": "loss",
      "event_id": "401772510",
      "opponent": "Philadelphia Eagles",
      "date_time": "2025-09-04T20:20:00-04:00",
      "game_link": "https://www.espn.com/nfl/game/_/gameId/401772510/cowboys-eagles",
      "home_away": "away",
      "tv_network": "NBC, Peacock"
    },
    {
      "score": "40-37",
      "venue": "AT&T Stadium",
      "result": "win",
      "event_id": "401772834",
      "opponent": "New York Giants",
      "date_time": "2025-09-14T13:00:00-04:00",
      "game_link": "https://www.espn.com/nfl/game/_/gameId/401772834/giants-cowboys",
      "home_away": "home",
      "tv_network": "FOX"
    },
    {
      "score": "14-31",
      "venue": "Soldier Field",
      "result": "loss",
      "event_id": "401772844",
      "opponent": "Chicago Bears",
      "date_time": "2025-09-21T16:25:00-04:00",
      "game_link": "https://www.espn.com/nfl/game/_/gameId/401772844/cowboys-bears",
      "home_away": "away",
      "tv_network": "FOX"
    }
  ],
  "league": "NFL",
  "season": 2025,
  "team_id": "6",
  "team_link": "https://www.espn.com/nfl/team/_/name/dal/dallas-cowboys"
}
```

### List news

Operation `list_news`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

List the latest ESPN headlines for a league or team by name. Articles are limited to news ESPN publishes for that topic.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `topic` | string | yes | `"New York Yankees"` | League or team name, such as NBA or New York Yankees. |
| `max_results` | integer | no | `5` | Maximum articles to return, such as 10. Up to 50. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "topic": {
      "type": "string",
      "minLength": 1,
      "description": "League or team name, such as NBA or New York Yankees.",
      "examples": [
        "New York Yankees",
        "NBA",
        "Premier League"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum articles to return, such as 10. Up to 50.",
      "x-fous-developer": true,
      "examples": [
        5,
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "topic": "New York Yankees",
      "max_results": 5
    },
    {
      "topic": "NBA"
    },
    {
      "topic": "Premier League",
      "max_results": 3
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `articles` | array |  | Articles for the league or team, newest first. |
| `articles[].author` | string or null | `"Jorge Castillo"` | Author when shown. |
| `articles[].summary` | string or null | `"Red Sox rookie left-hander Payton Tolle will start Tuesday night's AL Wild Card Series opener against the Yankees and w` | Short article summary when shown. |
| `articles[].headline` | string | `"Red Sox rookie LHP Payton Tolle to start Game 1 vs. Yankees"` | Article headline. |
| `articles[].image_link` | string or null | `"https://a.espncdn.com/photo/2026/0424/r1648247_1296x729_16-9.jpg"` | Article image link when available. |
| `articles[].article_link` | string | `"https://www.espn.com/mlb/story/_/id/50053611/red-sox-rookie-lhp-payton-tolle-start-game-1-vs-yankees"` | ESPN article page link. |
| `articles[].published_at` | string or null | `"2026-09-28T22:28:03+00:00"` | Publication date and time with timezone. |

**Example input**

```json
{
  "topic": "New York Yankees",
  "max_results": 5
}
```

**Example output**

```json
{
  "articles": [
    {
      "author": null,
      "summary": "Red Sox rookie left-hander Payton Tolle will start Tuesday night's AL Wild Card Series opener against the Yankees and will be followed in the rotation by Sonny Gray and Ranger Suarez.",
      "headline": "Red Sox rookie LHP Payton Tolle to start Game 1 vs. Yankees",
      "image_link": "https://a.espncdn.com/photo/2026/0424/r1648247_1296x729_16-9.jpg",
      "article_link": "https://www.espn.com/mlb/story/_/id/50053611/red-sox-rookie-lhp-payton-tolle-start-game-1-vs-yankees",
      "published_at": "2026-09-28T22:28:03+00:00"
    },
    {
      "author": null,
      "summary": "PTI: Yankees-Red Sox is the most intriguing first-round matchup",
      "headline": "PTI: Yankees-Red Sox is the most intriguing first-round matchup",
      "image_link": "https://espnmedia-cdn.akamaized.net/espn/media/common/2026/0928/ss_20260928_181058492_3678804/ss_20260928_181058492_3678804.jpg",
      "article_link": "https://www.espn.com/video/clip/_/id/50054975/yankees-red-sox-most-intriguing-first-round-matchup",
      "published_at": "2026-09-28T22:20:11+00:00"
    },
    {
      "author": "Jorge Castillo",
      "summary": "Aaron Judge participated in batting practice on the field Monday for the first time since suffering a right calf strain Sept. 16, as he works to persuade the team's decision-makers to put him on their…",
      "headline": "Aaron Judge takes BP as Yankees' roster call nears",
      "image_link": "https://a.espncdn.com/photo/2026/0916/r1717725_600x600_1-1.jpg",
      "article_link": "https://www.espn.com/mlb/story/_/id/50054624/aaron-judge-set-take-bp-yankees-roster-call-nears",
      "published_at": "2026-09-28T21:40:43+00:00"
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@espn",
  "visibility": "public",
  "operation": "get_game_summary",
  "version": 1,
  "input": {
    "date": "2026-09-25",
    "league": "MLB",
    "team_1": "Yankees",
    "team_2": "Orioles"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@espn\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_game_summary\",\n  \"version\": 1,\n  \"input\": {\n    \"date\": \"2026-09-25\",\n    \"league\": \"MLB\",\n    \"team_1\": \"Yankees\",\n    \"team_2\": \"Orioles\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@espn",
  "visibility": "public",
  "operation": "get_game_summary",
  "version": 1,
  "input": {
    "date": "2026-09-25",
    "league": "MLB",
    "team_1": "Yankees",
    "team_2": "Orioles"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/espn`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_game_summary`: Get game summary. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_player_stats`: Get player stats. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_scores`: Get scores. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_team_schedule`: Get team schedule. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_news`: List news. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-espn https://api.fous.com/mcp/tools/espn --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Track league scores and schedules by date and team.
- Review a team’s past results and upcoming games.
- Compare player season and career statistics.
- Summarize a matchup with team stats and player box scores.
- Monitor headlines for a league or team.

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this ESPN tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a ESPN account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from espn.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 28, 2026.

### What are the scores for a league on a date?

Get scores returns games for a required league and selected date, optionally filtered by team and time zone.

### What games has a team played or scheduled?

Get team schedule returns a team’s past results and upcoming games for a season.

### What were the stats in a matchup?

Get game summary returns the score, period scoring, leading players, team stats and available player box scores for two teams.

## Related

- [All Sports tools](https://fous.com/tools/category/sports)
