Period codes
The period field on a live match identifies which segment of the match
is being played. Codes differ per sport.
Football
| Code | Period | Notes |
|---|---|---|
| 12 | 1st half | minute runs 0 → 45 (+ stoppage). |
| 13 | 2nd half | minute runs 45 → 90 (+ stoppage). |
| 38 | Half-time | Break 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
| Code | Period | Notes |
|---|---|---|
| 22 | Q1 | First quarter. |
| 23 | Q2 | Second quarter. |
| 24 | Q3 | Third quarter. |
| 25 | Q4 | Fourth quarter. |
| 26 | OT1 | First overtime. |
| 27 | OT2 | Second 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.
Recommended labels
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.