Formula 1 UOF API score information
In-running statistics for Formula 1 races are provided via the summary endpoint in the Unified Odds API.
The<sport_event_status> element inlcludes the attribute period_of_leader indicating the current lap of the leading driver.
For each driver the following statistics are available:
position Reflecting the position of a driver (Integer).
time (Optional) Reflecting the time-difference to the leader in the format +mm:ss.SSS (String). Please note: For the leader the value reflects his entire race time in the format HH:mm:ss.SSS. If a driver retires, this attribute won't be exposed anymore, but the retired_in_lap attribute will be added instead.
finished_laps (Optional) Reflecting the number of laps which a specific driver has finished (Integer).
fastest_lap Reflecting the fastest lap of a specific driver in the format mm:ss.SSS (String).
no_pitstops Reflecting the number of pitstops made by a specific driver (Integer).
no_overtakings Reflecting the number of overtakings by a driver according to our sports betting rules (Integer).
retired_in_lap (Optional) Reflecting the lap in which a specific driver has retired (Integer).
The mentioned statistics are exposed for all competitors within multiple <result> elements (key value pairs):
<sport_event_status status="ended" period_of_leader="52">
<results>
<competitor id="sr:competitor:{id}">
<result value="4" type="position"/>
<result value="52" type="finished_laps"/>
<result value="1" type="no_pitstops"/>
<result value="2" type="no_overtakings"/>
<result value="01:29.482" type="fastest_lap"/>
<result value="+00:19.650" type="time"/>
</competitor>
...
<competitor id="sr:competitor:{id}">
<result value="20" type="position"/>
<result value="0" type="no_pitstops"/>
<result value="0" type="no_overtakings"/>
<result value="1" type="retired_in_lap"/>
</competitor>
</results>
</sport_event_status>
Additional attributes within the summary endpoint explained: <sport_event_status>
period_of_leader Reflecting the current lap of the leader in the race.
status Possible values: not_started, live, ended, unknown.
API call:
api.betradar.com/v1/sports/en/sport_events/sr:stage:{id}/summary.xml
An additional API endpoint (period_summary.xml) is available to fetch lap statistics such as:
time (Optional) Reflecting the lap time of a specific driver (String) If a driver retired, this attribute won't be exposed anymore, but the retired_in_lap attribute will be added instead. Please note: The lap time is updated after the lap is finished.
pitstop (Optional) Indicating if a driver was taking a pitstop in the specific lap (boolean). If a driver retired, this attribute won't be exposed anymore, but the retired_in_lap attribute will be added instead. Please note: The lap where the driver enters the pit is considered valid.
no_overtakings (Optional) Reflecting the number of overtakings by a driver within the specified lap according to our sports betting rules (Integer). If a driver retired, this attribute won't be exposed anymore, but the retired_in_lap attribute will be added instead.
retired_in_lap (Optional) Reflecting the lap in which a specific driver has retired (Integer).
<period_summary xmlns="http://schemas.sportradar.com/sportsapi/v1/unified" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" generated_at="2020-12-28T11:09:20+00:00" xsi:schemaLocation="http://schemas.sportradar.com/sportsapi/v1/unified http://schemas.sportradar.com/bsa/unified/v1/xml/endpoints/unified/period_summary.xsd">
<sport_event id="sr:stage:630553" name="Race" type="child" scheduled="2020-12-13T13:10:00+00:00" scheduled_end="2020-12-13T15:10:00+00:00" stage_type="race"/>
<period_statuses>
<period_status number="1" type="lap" status="completed">
<competitor id="sr:competitor:{id}">
<result value="02:15.827" type="time"/>
<result value="false" type="pitstop"/>
<result value="0" type="no_overtakings"/>
</competitor>
...
<competitor id="sr:competitor:{id}">
<result value="1" type="retired_in_lap"/>
</competitor>
</period_status>
...
</period_statuses>
</period_summary>
Additional attributes within the period_summary endpoint explained: <period_status>
type Possible values: lap
status Possible values: not_started, started, completed.
number Indicating the number of the specific lap.
API call and related query parameters:
api.betradar.com/v1/sports/en/sport_events/sr:stage:{id}/period_summary.xml?competitors=sr:competitor:{id}&competitors=sr:competitor:{id}&periods=2&periods=3&periods=4
Last updated
Was this helpful?