---
title: "Get MLB game play-by-play"
method: GET
path: "/mlb/game-play-by-play"
tags: ["MLB"]
---

# Get MLB game play-by-play

`GET /mlb/game-play-by-play`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/mlb/game-play-by-play`
- Auth: API key in header `x-api-key`

Returns the at-bats of an MLB game by numeric `id`. Each play has its inning and half, batter, pitcher, event and description, and a list of individual pitch and event records with timing and pitch data. The response includes a `total` count of plays.

## Query parameters

- `id` string, required

## Headers

- `x-api-key` string, required

## Response `200`

OK

- MlbPlayByPlayResponseDoc
  - `code` integer
  - `data` MlbPlayByPlayResponse
    - `fetched_at` string
    - `game_id` integer
    - `plays` MlbPlay[]
      - `at_bat_index` integer
      - `batter` MlbNamedRef
        - `id` integer: MLB id of the player or league.
        - `name` string: Name of the player or league.
      - `description` string
      - `event` string
      - `event_type` string
      - `events` MlbPlayEvent[]
        - `description` string
        - `details` object
        - `end_time` string
        - `index` integer
        - `is_pitch` boolean
        - `pitch_data` object
        - `pitch_number` integer
        - `start_time` string
        - `type` string
      - `half_inning` string
      - `inning` integer
      - `is_complete` boolean
      - `pitcher` MlbNamedRef
        - `id` integer: MLB id of the player or league.
        - `name` string: Name of the player or league.
    - `source_url` string
    - `total` integer
  - `msg` string

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `503`: Service Unavailable

---

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