---
title: "Headshots"
method: GET
path: "/v3/mlb/headshots/{format}/Headshots"
tags: ["MLB v3 Headshots"]
---

# Headshots

`GET /v3/mlb/headshots/{format}/Headshots`

## Request

- Base URL: `https://api.sportsdata.io`
- URL: `https://api.sportsdata.io/v3/mlb/headshots/{format}/Headshots`
- Auth: one of:
  - API key in header `Ocp-Apim-Subscription-Key`
  - API key in query parameter `key`
- TypeScript: <https://skmtc.dev/sportsdata/apis/mlb-api/docs/v3/mlb/headshots/:format/Headshots/get.ts> (a function with typed inputs; its response is checked against the schema)

USA Today/IMAGN cropped action headshots for all active NFL players, delivered shortly after the season starts.

## Path parameters

- `format` 'JSON' | 'XML', required

## Response `200`

Success

- Headshot[]
  - `PlayerID` integer: The player's unique PlayerID as assigned by SportsDataIO. Note: this ID will stay with the player throughout their MLB career
  - `Name` string, nullable: Player's full name
  - `TeamID` integer, nullable: The team's unique TeamID as assigned by SportsDataIO
  - `Team` string, nullable: The abbreviation [Key] of the team
  - `Position` string, nullable: The player's position associated with the given game or season. Possible values: 1B; 2B; 3B; C; CF; DH; IF; LF; OF; P; PH; PR; RF; RP; SP; SS
  - `PreferredHostedHeadshotUrl` string, nullable: The player's preferred hosted headshot URL. This returns the headshot with transparent background, if available.
  - `PreferredHostedHeadshotUpdated` string, nullable: The last updated date of the player's preferred hosted headshot.
  - `HostedHeadshotWithBackgroundUrl` string, nullable: The player's hosted headshot URL
  - `HostedHeadshotWithBackgroundUpdated` string, nullable: The last date and time the player's hosted headshot was updated in US Eastern Time
  - `HostedHeadshotNoBackgroundUrl` string, nullable: The player's transparent background hosted headshot URL
  - `HostedHeadshotNoBackgroundUpdated` string, nullable: The last date and time the player's transparent background hosted headshot was updated in US Eastern Time

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/sportsdata/apis/mlb-api.md) - [All operations](https://skmtc.dev/sportsdata/apis/mlb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sportsdata/apis/mlb-api/revisions/60fb38ac37e7?raw)
