Periods
The periods
include allows you to retrieve information about different periods within a football match, such as regular time, extra time, and penalties. Including the periods
in your API requests allows you to retrieve detailed information about the current minute and second of the fixture and the time that has already elapsed.
You can use the periods include by adding the &include=
parameter and setting it to periods
to retrieve this information. For a GET Fixture by ID request, that would look like this:
Fields
The "id"
field serves as a unique identifier for each period, while the "fixture_id"
corresponds to the associated fixture. The "type_id"
field indicates the type of the period, and "started"
and "ended
" are UNIX timestamps representing the period's start and end times, respectively. The "counts_from"
field denotes the minute from which the period starts counting, and "ticking"
is a boolean that signifies whether the period is currently being played. The "sort_order"
field establishes the order of the period, and the "description"
field provides a textual description. The "time_added"
field represents how much time was added to that period, and "period_length"
represents the scheduled length of the period. Information on the current minute and seconds of the period can be found in the "minutes"
and "seconds"
fields, respectively. The "has_timer"
boolean indicates whether detailed timer information is available for minutes and seconds.
How does it work?
When you use periods
in a regular match, you'll get two different period IDs. If the match goes into extra time or penalties, a new and unique period ID will be created and shown in the response. Look at the example of a World Cup final below:
Other include options
In addition to the periods
include you can use the currentPeriod
include. This allows you to retrieve the inplay period in a more convenient way compared to using the periods
include. Please note that include may return NULL
. For example, when the match has not yet started, is in half-time, or has ended.
Other include options are:
periods.statistics
which gives statistics for each periodperiods.events
which shows specific events in each periodperiods.timeline
which displays the timeline for a periodperiods.type
which helps you get the type of a specific period.
Last updated