SofaScore

SofaScore event at-bats

Returns a baseball match's at-bat timeline from SofaScore, in play order: for each plate appearance the inning and half (top or bottom), pitcher, hitter, their teams, when it ended and the home and away win probabilities before and after it. Use an at-bat id with sofascore-event-at-bat-pitches to read its pitches. Returns 404 when SofaScore has no at-bat data for the match, which includes matches that have not started and sports other than baseball.

get/sofascore/event-at-bats

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/sofascore/event-at-bats
  • Auth: API key in header x-api-key

Query parameters

idstring required

Numeric SofaScore baseball event (match) id

Headers

x-api-keystring required

API key required

Response

OK

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": {
    "at_bats": [
      {
        "away_win_probability": 52.1,
        "away_win_probability_start": 49,
        "end_time": "2026-10-06T22:13:59Z",
        "end_timestamp": 1791324839,
        "hitter": {
          "id": 839956,
          "jersey_number": "9",
          "name": "Erling Haaland",
          "position": "F",
          "short_name": "E. Haaland",
          "slug": "erling-haaland"
        },
        "hitter_team": {
          "country": "Spain",
          "id": 2817,
          "name": "FC Barcelona",
          "short_name": "Barcelona",
          "slug": "barcelona"
        },
        "home_win_probability": 47.9,
        "home_win_probability_start": 51,
        "id": 2595879,
        "inning": 1,
        "inning_half": "top",
        "pitcher": {
          "id": 839956,
          "jersey_number": "9",
          "name": "Erling Haaland",
          "position": "F",
          "short_name": "E. Haaland",
          "slug": "erling-haaland"
        },
        "pitcher_team": {
          "country": "Spain",
          "id": 2817,
          "name": "FC Barcelona",
          "short_name": "Barcelona",
          "slug": "barcelona"
        }
      }
    ],
    "event_id": 17199139
  },
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.