statshawk
REST APIPersons

GET /v1/persons/{per_id}/game-log — the person's chronological game log (Workflow-1 task A4): per-game stat lines assembled over appearances + phase tables, each tied to its game. Store-only; no *_game_logs table.

cost 2 unitsany plan
GET
/v1/persons/{person_id}/game-log
X-API-Key<token>

Raw API key (sk_live_… or sk_test_…). Preferred for REST clients. Keys are read-only; the environment prefix is the only key role. See https://statshawk.ai/docs/getting-started/permissions

In: header

Path Parameters

person_id*string

Minted person id (per_…)

Query Parameters

competition?|

Competition slug (e.g. mlb) or minted comp_… id.

season?|

Season start year — cross-year leagues (NBA/NHL/NCAA) use the year the season STARTS in (2025 = the 2025-26 season).

edition?null|
from?|
Formatdate-time
to?|
Formatdate-time
role?|

Restrict the game log to appearances carrying a specific phase block (role=pitcher) — the agnostic replacement for the old pitching-games endpoint. Omitted ⇒ every phase (today's behavior, unchanged).

phase?|

Alias for role: phase=pitching is equivalent to role=pitcher.

stage?|

Contest-stage filter. Omitted defaults to regular-season (plus unknown-stage) appearances only — the same window the season fold uses. stage=all removes the filter entirely (every stage, including preseason/exhibition/allstar); an explicit stage (preseason/regular/postseason/exhibition/allstar) narrows to exactly that value. An unrecognized value is a 400.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/persons/string/game-log"
{
  "data": {
    "items": [
      {
        "event": null,
        "game": "cst_0a1b2c3d4e5f6g7h8i9j0k1l2m",
        "home": true,
        "kickoff": "2019-08-24T14:15:22Z",
        "line": {
          "appearance": "apr_0a1b2c3d4e5f6g7h8i9j0k1l2m",
          "baseball": null,
          "contest": "cst_0a1b2c3d4e5f6g7h8i9j0k1l2m",
          "person": "per_0a1b2c3d4e5f6g7h8i9j0k1l2m",
          "person_name": "string",
          "phases": [
            {
              "measures": {},
              "phase": "string"
            }
          ],
          "team": null
        },
        "opponent": null,
        "status": null,
        "team": null
      }
    ],
    "page": 0,
    "per_page": 0,
    "total": 0
  },
  "meta": {
    "cache": "HIT",
    "fetched_at": "2025-10-15T18:30:00Z",
    "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
    "source": "postgres",
    "version": "v1"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "property1": null,
    "property2": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "property1": null,
    "property2": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "property1": null,
    "property2": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "property1": null,
    "property2": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "property1": null,
    "property2": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "property1": null,
    "property2": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "property1": null,
    "property2": null
  }
}