Canonical IDs
Discover IDs from the API and reuse them in follow-up paths. IDs are opaque; do not derive one from a name, abbreviation, upstream number, or documentation example. Records can carryid, canonical_id, and external_ids, a map from
source key to source-owned identifier. Baseball uses canonical IDs for lookups;
other sport projections commonly use id. Use the returned identifier for
that sport.
External-ID lookup uses the exact stored source key:
/v1/{league}/matches/by-external-id/{source}/{externalId}. These are not
name searches. URL-encode path values.
Soccer teams and players can recur across competitions and national-team
contexts. Store identity separately from league membership and season stats.
Proto returns mapped canonical fixtures; its detail ID is a canonical
game/match ID, not an upstream Proto row ID.
Images and localized text
Entity projections can materializelogo_url, headshot_url, or
official_logo_url when an asset exists. Use a UI fallback when absent. Use
the returned URL rather than reconstructing storage paths. Mirrored assets
and official/provider URLs can be separate fields.
Names, abbreviations, injury text, and descriptions may include localized
fields. Preserve raw/provider values alongside display text. Standings support
lang for supported display labels; there is no API-wide parameter that
translates every field.
Provenance
On supported single-resource reads,?provenance=true (or 1) exposes the
source selected for each field:
Freshness and completeness
Typical response cache classes are 5 seconds for live state, 10 seconds for
current fixture odds, 30 seconds for props, 60 seconds for pregame detail, and
5 minutes for schedules/season aggregates/history. Complete final detail can
be cached for 24 hours. Handlers can bypass or shorten caching while enrichment
is pending.
Live detail can return
404 data_not_yet_available for a missing or stale
record while the schedule still exists. Final status alone does not guarantee
a complete box score, recap, lineup, or shot chart.
Treat missing metrics as unavailable. Check lineup confirmation/projection
markers, report dates, sample sizes, bookmaker counts, and truncation before
presenting a result as complete.