Periods
What does the include do?
The periods and detailedPeriods includes allow you to retrieve detailed information about different periods within a football match, including regular time, extra time, and penalties. These includes provide comprehensive timing data including the current minute, seconds elapsed, period start/end times, and whether the period is currently active (ticking).
Why use periods?
The periods include is essential for:
Live match tracking: Display accurate match time with minute and second precision
Match state management: Know which period is currently being played
Time-based analysis: Analyse events by period (first half, second half, extra time)
Broadcast applications: Show precise match timing for live streams
Statistical analysis: Break down team performance by match period
Injury time tracking: Monitor added time in each period
In most cases, periods is enough for standard match timing. Use detailedPeriods when you need to split extra time into both halves for more precise reporting and analysis.
What is the difference between the periods and detailedPeriods includes?
periods and detailedPeriods includes?The only difference between these includes is in Extra Time:
periodsreturns Extra Time as a single period.detailedPeriodsreturns Extra Time 1st Half and Extra Time 2nd Half as two separate 15-minute periods.
Requesting periods
To retrieve period information for a fixture, use the following include:
Example: Get periods for Real Madrid vs FC Barcelona (fixture ID: 19439347)
Response structure
When you include periods in your request, you'll receive an array of period objects for each match period. Extra time is returned as a single period object:
When you include detailedPeriods in your request, you'll receive an array of period objects for each match period. Extra time is returned as two period objects, one for each half:
Field descriptions
id
integer
Unique identifier for this period
fixture_id
integer
ID of the fixture this period belongs to
type_id
integer
Type identifier for the period (see Period Types below)
started
integer
UNIX timestamp of when the period started
ended
integer/null
UNIX timestamp of when the period ended (null if ongoing)
counts_from
integer
Minute from which this period starts counting (e.g., 0 for 1st half, 45 for 2nd half)
ticking
boolean
Whether the period is currently active/being played
sort_order
integer
Sorting order of the period (1 = first, 2 = second, etc.)
description
string
Human-readable description of the period
time_added
integer/null
Additional injury/stoppage time added to the period (in minutes)
period_length
integer
Standard length of the period in minutes (usually 45 for regular time)
minutes
integer
Current minute within the match (cumulative)
seconds
integer
Seconds after the current minute (0-59)
has_timer
boolean
Whether detailed timer information (minutes/seconds) is available
Period types
The type_id field indicates what type of period this represents:
1
First Half (1ST_HALF)
0
45
periods & detailedPeriods
2
Second Half (2ND_HALF)
45
45
periods & detailedPeriods
3
Extra Time
90
30
periods only
5314
Extra Time - First Half
90
15
detailedPeriods only
39
Extra Time - Second Half
105
15
detailedPeriods only
5
Penalty Shootout
120
N/A
periods & detailedPeriods
Understanding period timing
counts_from
This field indicates the starting minute for the period:
1st half:
counts_from = 0(minutes 0-45)2nd half:
counts_from = 45(minutes 45-90)Extra time (combined):
counts_from = 90(minutes 90-120)Extra time 1st:
counts_from = 90(minutes 90-105)Extra time 2nd:
counts_from = 105(minutes 105-120)
minutes and seconds
These fields provide the current match time:
minutes: Cumulative minute count from match start (e.g., 47 means 47th minute)seconds: Seconds within current minute (0-59)
Example: minutes = 47, seconds = 23 means the match is at 47:23
ticking
true: This period is currently active (match is live in this period)false: This period is not currently active (e.g. period has ended or is interrupted)
time_added (Injury time)
The additional minutes added to the period for stoppages:
Usually 1-5 minutes in regular time
Shows as "45+2" in match displays when 2 minutes added to 1st half
Current period include
In addition to the periods include, you can use the currentPeriod include for a more convenient way to get only the active period:
This returns only the period that is currently ticking (or null if match hasn't started or has ended).
Nested includes
The periods include supports the following nested includes:
periods.type
Get detailed information about the period type:
periods.events
Get all events that occurred during this specific period:
periods.statistics
Get statistics specific to this period:
Code examples
Python example
JavaScript example
Common use cases
1. Live match timer display
Display accurate live match time with injury time:
2. Period-based statistics
Analyze team performance by period:
3. Match state detection
Determine current match state:
Best practices
Use has_timer to check data availability: Not all matches have detailed timer information. Check
has_timerbefore displaying seconds.Handle null ended timestamps: For live matches,
endedwill be null for the current period.Use currentPeriod for live updates: If you only need the active period, use
include=currentPeriodinstead of fetching all periods.Calculate injury time correctly: Display as "45+2" not "47" when showing injury time to users.
Check ticking for live status: The
tickingfield is the most reliable way to determine if a period is currently active.Sort by sort_order: Always use
sort_orderto display periods in chronological order.Cache completed periods: Period data doesn't change after a period ends. Cache historical periods to reduce API calls.
Related includes
Events - Cross-reference events with periods to show when they occurred
Statistics - Get period-specific statistics
States - Understand match state transitions
Scores - See scores by period
Summary
The periods include provides comprehensive timing information for all match periods including first half, second half, extra time, and penalties. With fields for current minutes/seconds, injury time, and active status, it enables accurate live match timers, period-based analysis, and match state management. Use currentPeriod for live matches when you only need the active period data.
Last updated
Was this helpful?