---
title: "Retrieve player box score for specified match id"
method: GET
path: "/baseball/box-scores/{id}"
tags: ["Baseball.Match Box Score"]
---

# Retrieve player box score for specified match id

`GET /baseball/box-scores/{id}`

## Request

- Base URL: `https://sports.highlightly.net`
- URL: `https://sports.highlightly.net/baseball/box-scores/{id}`
- Auth: none declared. Required headers: `x-rapidapi-host`, `x-rapidapi-key`
- TypeScript: <https://skmtc.dev/highlightly/apis/sports-api-highlightly/docs/baseball/box-scores/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

> Refresh interval: Every minute

Retrieve detailed per-player **MLB box score statistics** by specifying the `matchId` as the path parameter.

The response is an array with two elements:  
`[homeTeam, awayTeam]`

Each team object contains general team information and a list of player box scores, including both **batting** and **pitching** statistics.

---

## Team Structure

Each team (home or away) has the following shape:

| Field      | Description |
|-----------|-------------|
| id        | Unique identifier for the team. |
| name      | Team name. |
| logo      | Team logo identifier or URL, if available. |
| boxScores | List of per-player box score records for the team. |

---

## Player Box Score

Each item in `boxScores` represents a single player’s performance in the match.

### Player Metadata

| Field | Description |
|------|-------------|
| id   | Unique identifier for the player. |
| name | Player’s display name. |

---

## Player Statistics

Player performance data is provided as a list of statistic records.  
Each record includes a statistic name, its category, and the recorded value.

| Field | Description |
|------|-------------|
| name  | Name of the statistic (e.g. `Total At-Bats`, `Innings Pitched`). |
| group | Statistic category (`Batting` or `Pitching`). |
| value | Numeric value of the statistic. |

---

## Batting Statistics Explained

- **Total At-Bats (AB)**  
  Number of official at-bats for the player.

- **Total Runs Scored (R)**  
  Number of times the player scored a run.

- **Total Hits (H)**  
  Total number of hits recorded by the player.

- **Total Runs Batted In (RBI)**  
  Number of runs driven in by the player’s offensive actions.

- **Total Home Runs (HR)**  
  Number of home runs hit.

- **Total Walks (BB)**  
  Number of bases on balls earned.

- **Total Strikeouts (SO)**  
  Number of times the player struck out while batting.

- **Total Pitches Thrown (Batting)**  
  Total pitches seen by the player while at bat.

- **Batting Average (AVG)**  
  Hits divided by at-bats.

- **On-Base Percentage (OBP)**  
  Frequency at which the player reaches base safely.

- **Slugging Percentage (SLG)**  
  Measure of batting power based on total bases per at-bat.

---

## Pitching Statistics Explained

- **Innings Pitched (IP)**  
  Total number of innings pitched.

- **Hits Allowed (H)**  
  Number of hits allowed by the pitcher.

- **Runs Allowed (R)**  
  Total runs given up.

- **Total Earned Runs (ER)**  
  Runs that scored without defensive errors.

- **Total Walks Allowed (BB)**  
  Number of batters walked.

- **Total Strikeouts (SO)**  
  Number of batters struck out.

- **Home Runs Allowed (HR)**  
  Number of home runs conceded.

- **Earned Run Average (ERA)**  
  Average number of earned runs allowed per nine innings.

- **Total Pitches Thrown (Pitching)**  
  Total number of pitches thrown by the pitcher.

---

## Notes

- A player may appear with **batting stats**, **pitching stats**, or both.
- Some players may have zero values if they did not record a statistic in that category.
- Statistic availability may vary depending on player participation in the match.

## Path parameters

- `id` number, required

## Headers

- `x-rapidapi-host` string, required
- `x-rapidapi-key` string, required

## Response `200`

- BaseballPlayerBoxScoreMatchStatsResponseDto[]
  - `team` BaseballPlayerBoxScoreTeamResponseDto, required
    - `id` number, required
    - `name` string, required
    - `logo` string
  - `boxScores` BaseballBoxScoreItemResponseDto[], required
    - `player` BaseballBoxScorePlayerResponseDto, required
      - `id` number, required
      - `name` string, required
    - `statistics` BaseballBoxScoreStatisticsItemResponseDto[], required
      - `name` string, required
      - `group` string, required
      - `value` number, required

## Other responses

- `400`: Bad request descriptive error.
- `500`: Internal server error.

---

[API](https://skmtc.dev/highlightly/apis/sports-api-highlightly.md) - [All operations](https://skmtc.dev/highlightly/apis/sports-api-highlightly/llms.txt) - [OpenAPI document](https://skmtc.dev/highlightly/apis/sports-api-highlightly/revisions/c8a366d3091f?raw)
