Lineups

GET https://baseball.highlightly.net/lineups/{matchId} MLB & NCAA API
GET https://sports.highlightly.net/baseball/lineups/{matchId} All Sports API

Retrieve the home and away lineups for a game.

Availability
Query up to a few hours before first pitch

The matchId comes from matches.

Both squads come back together, so one request covers the whole game rather than one per side.

Lineups rendered in a client application

Parameters

Parameter Type Description
matchIdrequired numberpath Requested match id.

Request

curl --request GET \
  --url 'https://baseball.highlightly.net/lineups/{matchId}' \
  --header 'x-rapidapi-key: YOUR_API_KEY'
const response = await fetch('https://baseball.highlightly.net/lineups/{matchId}', {
  headers: {
    'x-rapidapi-key': process.env.HIGHLIGHTLY_API_KEY
  }
})

if (!response.ok) {
  throw new Error(`Highlightly responded ${response.status}`)
}

const data = await response.json()
import os
import requests

response = requests.get(
    'https://baseball.highlightly.net/lineups/{matchId}',
    headers={
        'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
    },
    timeout=10,
)

response.raise_for_status()
data = response.json()

Response

homeBaseballLineupsrequired14 fields
teamBaseballTeamResponserequired6 fields
idnumberrequired
logostring
namestring
displayNamestringrequired
abbreviationstringrequired
leaguestringrequired
lineupBaseballLineupsPlayer[]required6 fields
idnumberrequired
jerseynumber
playerstringrequired
positionstringrequired
positionAbbreviationstringrequired
isStarterboolean
awayBaseballLineupsrequired14 fields
teamBaseballTeamResponserequired6 fields
idnumberrequired
logostring
namestring
displayNamestringrequired
abbreviationstringrequired
leaguestringrequired
lineupBaseballLineupsPlayer[]required6 fields
idnumberrequired
jerseynumber
playerstringrequired
positionstringrequired
positionAbbreviationstringrequired
isStarterboolean

Example response

200 application/json
{
  "home": {
    "team": {
      "id": 219,
      "logo": "https://example.com/logos/team/219.png",
      "name": "Bears",
      "displayName": "Baylor",
      "abbreviation": "BAY",
      "league": "NCAA"
    },
    "lineup": [
      {
        "id": 619412,
        "jersey": 22,
        "player": "Parker Meadows",
        "position": "Center field",
        "positionAbbreviation": "CF",
        "isStarter": true
      }
    ]
  },
  "away": {
    "team": {
      "id": 219,
      "logo": "https://example.com/logos/team/219.png",
      "name": "Bears",
      "displayName": "Baylor",
      "abbreviation": "BAY",
      "league": "NCAA"
    },
    "lineup": [
      {
        "id": 619412,
        "jersey": 22,
        "player": "Parker Meadows",
        "position": "Center field",
        "positionAbbreviation": "CF",
        "isStarter": true
      }
    ]
  }
}

Values are the examples declared in the OpenAPI spec, not a captured live response.

Errors

Status Description
400 Bad request descriptive error.
500 Internal server error.