---
title: "Get linups by match id"
method: GET
path: "/baseball/lineups/{matchId}"
tags: ["Baseball.Lineups"]
---

# Get linups by match id

`GET /baseball/lineups/{matchId}`

## Request

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

> Lineups should be queried up to a few hours before the game starts.

Retrieve home and away team lineups for a specific match.

Below is an example of what you can aim to achieve with the lineup endpoint:

![Nba lineups example](https://highlightly.net/assets/img/documentation/baseball/lineups.png)

## Path parameters

- `matchId` number, required

## Headers

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

## Response `200`

- BaseballLineupsResponseDto
  - `home` BaseballLineupsDto, required
    - `team` BaseballTeamResponseDto, required
      - `id` number, required
      - `logo` string
      - `name` string
      - `displayName` string, required
      - `abbreviation` string, required
      - `league` string, required
    - `lineup` BaseballLineupsPlayerDto[], required
      - `id` number, required
      - `jersey` number
      - `player` string, required
      - `position` string, required
      - `positionAbbreviation` string, required
      - `isStarter` boolean
  - `away` BaseballLineupsDto, required
    - `team` BaseballTeamResponseDto, required
      - `id` number, required
      - `logo` string
      - `name` string
      - `displayName` string, required
      - `abbreviation` string, required
      - `league` string, required
    - `lineup` BaseballLineupsPlayerDto[], required
      - `id` number, required
      - `jersey` number
      - `player` string, required
      - `position` string, required
      - `positionAbbreviation` string, required
      - `isStarter` boolean

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