Skip to content
datasportsAPI

FixturesPitches

Documentation

/

Type to filter the docs by title or path.

FixturesEndpoint 29 of 116

Pitches

GET

/v2/fixtures/{id}/at-bats/{atBatId}/pitches

Plan
Pro + Business
Auth
Bearer dsa_live_…
Parameters
2 required · 0 optional
Returns
Pitch[]

Baseball only: every pitch of a single at-bat in sequence, with pitch type (MLB Statcast categories: four-seam fastball, sinker, cutter, slider, sweeper, curveball, changeup, …), zone, release speed, result, the resulting count and outs, the score, the batted ball (trajectory, hardness) and what the runners and fielders did.

Plays that happen between pitches, such as a stolen-base attempt, appear as rows with kind steal.

Plan access

Requires a Pro or Business plan; every other plan receives 403 endpoint_not_in_plan.

Worth knowing

  • Other sports get 200 and an empty array.
  • balls / strikes / outs reflect the count AFTER the pitch, and the final pitch (endsAtBat true) carries the at-bat’s result as its outcome.
  • outcome comes from a closed set; when it is other, outcomeCode holds the source’s own code.
  • zone follows MLB Statcast numbering (1–9 inside the strike zone, 11–14 outside it).
  • speedKmh holds the release speed in km/h; multiply it by 0.6214 for mph.
  • For runners, fromBase 0 is the batter, toBase 4 means a run scored, and toBase is null when the runner was put out.
  • Lists saved before 2026-11-04 show AtBat.id as null until they are refreshed.

01Parameters

  • idpathRequired

    fixture id issued by DataSportsAPI, a positive integer

  • atBatIdpathRequired

    at-bat identifier, taken from AtBat.id in /v2/fixtures/{id}/points

02Request

The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.

curl -H "Authorization: Bearer dsa_live_…" \
    "https://api.datasportsapi.com/v2/fixtures/{id}/at-bats/{atBatId}/pitches"

03Response

The top-level keys of the JSON body. Each object links to its full shape in the data reference.

data
Pitch[]
meta
atBatId, count
ObjectsPitch
Example response
{ "data": [
    { "kind": "steal", "number": 0, "at": "2026-10-18T00:12:56.000Z", "pitchType": null, "outcome": null, "endsAtBat": false,
      "balls": 0, "strikes": 0, "outs": 2, "runners": [ { "player": { "id": 9311, "name": "Chandler Simpson" }, "fromBase": 1, "toBase": 1, "out": false } ], … },
    { "kind": "pitch", "number": 1, "at": "2026-10-18T00:13:10.000Z",
      "pitcher": { "id": 9301, "name": "Shawn Armstrong", … }, "batter": { "id": 9302, "name": "Junior Caminero", … },
      "pitcherHand": "right", "batterHand": "right", "pitchType": "cutter", "pitchName": "Cutter", "speedKmh": 144.84, "zone": 5,
      "outcome": "fieldersChoice", "outcomeCode": "oFC", "endsAtBat": true, "balls": 0, "strikes": 0, "outs": 3,
      "homeScore": 0, "awayScore": 0, "hit": false, "bunt": false, "wildPitch": false, "passedBall": false,
      "doublePlay": false, "triplePlay": false, "overturned": false,
      "battedBall": { "trajectory": "groundBall", "hardness": "medium" },
      "runners": [ { "player": { "id": 9302, "name": "Junior Caminero" }, "fromBase": 0, "toBase": 1, "out": false },
                   { "player": { "id": 9311, "name": "Chandler Simpson" }, "fromBase": 1, "toBase": null, "out": true } ],
      "fielders": [] } ],
  "meta": { "atBatId": 70412, "count": 2 } }

04Errors

  • 403history_not_in_plan

    the fixture predates the history your plan covers

  • 404not_found

    the fixture or at-bat id does not exist

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code