Integration GuidesDocs
Coverage MatrixDocumentationChange LogLog InContact Us
Integration Guides

Tracking Live Races

This scenario explains how to follow a Formula 1 weekend live: find the in-progress event, poll the active session for lap-by-lap timing, and read final classifications when a session closes. Because the API is poll-based, "live" means polling the right stage at its short cache TTL.

This is commonly used to:

  • Drive a live timing screen or leaderboard
  • Update a race page lap by lap
  • Trigger UI changes on flag and safety-car states


Relevant Feeds

FeedPurpose
Stage ScheduleFind the live event and its sessions
Stage SummaryRead a session's live and final results, and per-lap order


High-Level Workflow

A typical live-race integration follows this flow:

Live Tracking WorkflowFind the live session, poll it, wind down
Find the eventStage Scheduleevent: Running
Find the sessionevent stages[]session: Running
Poll while liveStage Summaryabout every second
Lap detail (optional)lap stagesper-lap running order (races and sprints)
Wind downFinishedCompletedClosedcache the final classification
Cadences come from Update Frequencies; Stage Summary carries the one-second live TTL. Detect the live session by status, not by the clock; the control states (Safety car, Yellow flag, Red flag) count as live.
  1. Locate the event whose status is Running.
  2. Find the session within it that is Running.
  3. Poll that session's Stage Summary at the live TTL; for a race, also read the lap stages.
  4. When the session reaches Closed, read the final classification and stop fast polling.


1. Find the Live Event

An event in progress reports status: "Running", with its sessions carrying their own statuses. The snapshot below was captured during the 2026 Barcelona Grand Prix weekend: the three practices are Closed and qualifying and the race are Not started.

GET https://api.sportradar.com/formula1/trial/v2/en/sport_events/sr:stage:1287853/summary.json
x-api-key: YOUR_API_KEY
{
  "stage": {
    "id": "sr:stage:1287853",
    "description": "Barcelona Grand Prix 2026",
    "type": "event",
    "status": "Running",
    "scheduled": "2026-06-12T11:30:00+00:00",
    "scheduled_end": "2026-06-14T15:00:00+00:00",
    "venue": { "id": "sr:venue:1014", "name": "Circuit de Barcelona-Catalunya", "city": "Barcelona", "country": "Spain" },
    "stages": [
      { "id": "sr:stage:1287855", "description": "Practice 1", "type": "practice", "status": "Closed" },
      { "id": "sr:stage:1287857", "description": "Practice 2", "type": "practice", "status": "Closed" },
      { "id": "sr:stage:1287859", "description": "Practice 3", "type": "practice", "status": "Closed" },
      { "id": "sr:stage:1287861", "description": "Qualification", "type": "qualifying", "status": "Not started" },
      { "id": "sr:stage:1287867", "description": "Race", "type": "race", "status": "Not started", "laps": 66 }
    ]
  }
}

Pick the session whose status is Running and use its stage ID for live polling. (You can find the season's events from Stage Schedule; see Pulling Schedules.)



2. Read a Session's Results

Each session (practice, qualifying, sprint, or race) is read with Stage Summary on its stage ID. The competitors are ordered by classification, and each carries a result. The Practice 3 classification from that same Barcelona weekend:

{
  "stage": {
    "id": "sr:stage:1287859",
    "description": "Practice 3",
    "type": "practice",
    "status": "Closed",
    "competitors": [
      {
        "id": "sr:competitor:391432",
        "name": "Russell, George",
        "team": { "id": "sr:competitor:41127", "name": "Mercedes AMG Motorsport" },
        "result": { "position": 1, "fastest_lap_time": "1:15.679", "gap_to_leader": "-", "laps": 11, "car_number": 63, "status": "Finished" }
      },
      {
        "id": "sr:competitor:953189",
        "name": "Piastri, Oscar",
        "team": { "id": "sr:competitor:4514", "name": "McLaren" },
        "result": { "position": 2, "fastest_lap_time": "+0.214", "gap_to_leader": "+0.214", "laps": 12, "car_number": 81, "status": "Finished" }
      },
      {
        "id": "sr:competitor:269471",
        "name": "Leclerc, Charles",
        "team": { "id": "sr:competitor:4510", "name": "Ferrari" },
        "result": { "position": 3, "fastest_lap_time": "+0.243", "gap_to_leader": "+0.243", "interval_to_position_ahead": "+0.029", "laps": 17, "car_number": 16, "status": "Finished" }
      }
    ]
  }
}

Note the gap convention: the leader shows gap_to_leader: "-", and trailing cars show a relative time such as +0.214. The same result shape is reused across session types, so always branch on the stage type; see Fundamentals.



3. Poll the Race Lap by Lap

A race (or sprint_race) stage carries laps and laps_completed on the header, a competitors list with live finishing data, and a nested stages list of lap stages. While the race is Running, poll the race summary at the live TTL and read the current order; for a specific lap, call Stage Summary on that lap's stage ID.

{
  "stage": {
    "id": "sr:stage:1189269",
    "description": "Lap 29",
    "type": "lap",
    "competitors": [
      {
        "id": "sr:competitor:495898",
        "name": "Norris, Lando",
        "result": { "position": 1, "interval_to_position_ahead": "-", "status": "In race", "substatus": "Unknown" }
      },
      {
        "id": "sr:competitor:953189",
        "name": "Piastri, Oscar",
        "result": { "position": 2, "gap_to_leader": "+0.772", "interval_to_position_ahead": "+0.772", "status": "In race", "substatus": "Unknown" }
      },
      {
        "id": "sr:competitor:178318",
        "name": "Verstappen, Max",
        "result": { "position": 3, "gap_to_leader": "+16.104", "interval_to_position_ahead": "+15.332", "status": "In race", "substatus": "Unknown" }
      }
    ]
  }
}

A lap result is intentionally lean: position, gap_to_leader, interval_to_position_ahead, and the driver status (for example In race or Pit stop). Use the lap stages to animate position changes; use the parent race summary for the full result. The flag and safety-car states that appear in the session status while Running are listed in Race Status Workflow.

Two things to know about lap data:

  • The order, gaps, and positions advance once a lap is completed (when the leader crosses the start/finish line), not continuously within a lap. Expect a new lap of data roughly once per lap, not many times per second.
  • Lap stages belong to race and sprint_race sessions. Practice has no sub-stages, and qualifying's sub-stages are its qualifying_part stages (Q1, Q2, Q3): drivers run independent lap counts and times in those sessions, so a synchronized lap-by-lap order does not apply.


4. Read the Final Classification

When a race reaches Closed with substatus: "All laps completed", the result is final. The full race header carries conditions (weather, air_temperature, track_temperature, humidity, pit_open), and each competitor's result carries the finishing detail.

{
  "stage": {
    "id": "sr:stage:1189139",
    "description": "Race",
    "type": "race",
    "status": "Closed",
    "substatus": "All laps completed",
    "laps": 57,
    "laps_completed": 57,
    "air_temperature": 16,
    "track_temperature": 18,
    "humidity": 71,
    "weather": "Sunny",
    "pit_open": true,
    "competitors": [
      {
        "id": "sr:competitor:495898",
        "name": "Norris, Lando",
        "team": { "id": "sr:competitor:4514", "name": "McLaren" },
        "result": { "points": 25, "position": 1, "grid": 1, "time": "1:42:06.304", "gap_to_leader": "-", "laps": 57, "lapsled": 54, "pitstop_count": 5, "fastest_lap_time": "1:22.167", "status": "Finished", "car_number": 4 }
      },
      {
        "id": "sr:competitor:178318",
        "name": "Verstappen, Max",
        "team": { "id": "sr:competitor:4978", "name": "Red Bull Racing" },
        "result": { "points": 18, "position": 2, "grid": 3, "time": "+0.895", "gap_to_leader": "+0.895", "interval_to_position_ahead": "+0.895", "laps": 57, "lapsled": 2, "pitstop_count": 5, "fastest_lap_time": "1:23.081", "status": "Finished", "car_number": 1 }
      }
    ]
  }
}
<?xml version="1.0" ?>
<summary xmlns="http://schemas.sportradar.com/sportsapi/formula1/v2" generated_at="2026-06-13T13:14:33+00:00">
  <stage id="sr:stage:1189139" description="Race" type="race" status="Closed" laps="57" laps_completed="57" air_temperature="16" track_temperature="18" humidity="71" weather="Sunny" substatus="All laps completed" pit_open="true">
    <competitors>
      <competitor id="sr:competitor:495898" name="Norris, Lando" abbreviation="NOR" gender="male" nationality="Great Britain" country_code="GBR">
        <team id="sr:competitor:4514" name="McLaren" gender="male" nationality="England" country_code="ENG"/>
        <result points="25" fastest_lap_time="1:22.167" gap_to_leader="-" interval_to_position_ahead="-" laps="57" position="1" grid="1" pitstop_count="5" status="Finished" substatus="Unknown" lapsled="54" time="1:42:06.304" car_number="4"/>
      </competitor>
    </competitors>
    <stages>
      <stage id="sr:stage:1189213" description="Lap 1" type="lap"/>
    </stages>
  </stage>
</summary>

Key race result fields: position, points, grid (starting position), time (winner's total; others show the gap), gap_to_leader, interval_to_position_ahead, laps, lapsled, pitstop_count, fastest_lap_time, and the driver status.

The gap_to_leader value is a string whose form depends on the car: "-" for the leader, a time gap such as "+0.895" for cars on the lead lap, and a lap deficit such as "11L" for lapped or retired cars. A car that did not finish carries the driver status "Out" (and may have an absent gap and zero laps if it did not start).



Refresh Strategy

  • Poll the live session at the response cache-control TTL (about one second while Running). See Update Frequencies.
  • Drive cadence off status: fast while Running; slow once the session is Finished, Completed, or Closed.
  • Remember that results between Finished and Closed are provisional. The race typically reaches Closed within about 90 minutes of the finish; see Race Status Workflow.


Best Practices

  • Detect the live session by status, not by the clock; session start times can shift.
  • Cache Closed sessions aggressively; their data is final.
  • Use the lap stages for position animations and the parent summary for the authoritative classification.
  • Respect the TTL, and on 429 slow your request rate before retrying. See Update Frequencies.


Did this page help you?