---
title: "Get player statistics by player id"
method: GET
path: "/baseball/players/{id}/statistics"
tags: ["Baseball.Players"]
---

# Get player statistics by player id

`GET /baseball/players/{id}/statistics`

## Request

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

> Refresh interval: Once a day

Retrieve detailed player statistics for specified `playerId`.

Detailed player statistics are aggregated on a `perSeason` level. Each season has the following available coverage:

| Type               | Description                                                                 |
|--------------------|-----------------------------------------------------------------------------|
| Entire             | Combines both regular season and post-season statistics. Pre-season data is not included. |
| Season             | Includes only regular season statistics.                               |

Recorded stats are dependant on the player position. In total, the following stats are available:

| Type | Description |
|------|--------------|
| Pitching | Statistics that measure a pitcher's performance in preventing runs and controlling opposing hitters (innings pitched, strikeouts, walks, earned runs). |
| Batting | Statistics that measure a player's offensive performance at the plate, including hitting ability, power and on-base success (hits, batting average, home runs, RBIs). |

Note: As mentioned earlier, statistics are associated with specific player positions. This means the results you receive will vary depending on the player's position.

![Baseball Player stats example](https://highlightly.net/assets/img/documentation/baseball/player-stats.png)

## Path parameters

- `id` number, required

## Headers

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

## Response `200`

- BaseballDetailedPlayerStatisticsResponseDto[]
  - `id` number, required
  - `fullName` string
  - `logo` string
  - `perSeason` BaseballDetailedPlayerStatisticsPerSeasonDto[], required
    - `stats` BaseballStatEntry[], required: Relevant stats for player position.
      - `name` string, required
      - `value` number, required
      - `category` 'Pitching' | 'Batting', required
    - `teams` BaseballDetailedPlayerSummaryTeamDto[], required: Teams for which the player played in a given season.
      - `id` number, required
      - `logo` string
      - `name` string, required
      - `league` string, required
      - `displayName` string, required
      - `abbreviation` string, required
    - `league` string, required
    - `season` number, required
    - `seasonBreakdown` 'Entire' | 'Season', required: Represents the coverage for the stored statistics. Pre-season is never included.

## 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)
