Skip to main content

Period codes

The period field on a live match identifies which segment of the match is being played. Codes differ per sport.

Football

CodePeriodNotes
121st halfminute runs 0 → 45 (+ stoppage).
132nd halfminute runs 45 → 90 (+ stoppage).
38Half-timeBreak between halves. minute is fixed at 45.

For knockout matches that go beyond 90 minutes, the status_code flips to 9 (After Penalties) or 10 (After Extra Time) once decided. While extra time is in play, treat as live with period: 13 and a minute > 90.

Basketball

CodePeriodNotes
22Q1First quarter.
23Q2Second quarter.
24Q3Third quarter.
25Q4Fourth quarter.
26OT1First overtime.
27OT2Second overtime. (Further OTs use the next codes; rare in practice.)

For basketball, pair period with game_clock_secs to render the live clock. See the game clock section.

Default user-facing strings:

const FOOTBALL_PERIOD: Record<number, string> = {
12: '1st Half',
13: '2nd Half',
38: 'Half Time',
};

const BASKETBALL_PERIOD: Record<number, string> = {
22: 'Q1', 23: 'Q2', 24: 'Q3', 25: 'Q4',
26: 'OT1', 27: 'OT2',
};

The MCP server's get_match tool already returns a localized period label alongside the numeric period_code so AI agents don't need this mapping.