statshawk
REST APIPersons

`GET /v1/persons/{per_id}/appearances`.

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

In: header

Path Parameters

person_id*string

Minted person id (per_…)

Query Parameters

competition?|

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

season?integer
Formatint32
edition?string
from?|
Formatdate-time
to?|
Formatdate-time
role?string

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

Value in"pitcher"
phase?string

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

stage?string

Contest-stage filter (issue #164). 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

curl -X GET "https://example.com/v1/persons/string/appearances"
{
  "data": {
    "items": [
      {
        "contest": "cst_0a1b2c3d4e5f6g7h8i9j0k1l2m",
        "entrant": "ent_0a1b2c3d4e5f6g7h8i9j0k1l2m",
        "id": "apr_0a1b2c3d4e5f6g7h8i9j0k1l2m",
        "person": "per_0a1b2c3d4e5f6g7h8i9j0k1l2m",
        "team": "team_0a1b2c3d4e5f6g7h8i9j0k1l2m"
      }
    ],
    "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
  }
}