get_sector_times
Retrieve fastest sector times, theoretical best lap, and actual best lap per driver for any F1 session since 2018. Optionally get per-lap sector breakdowns for detailed analysis.
Instructions
Get best sector times and theoretical best lap for each driver.
Data source: FastF1 Live Timing Coverage: 2018-present
Set include_laps=True when the user wants per-lap sector breakdowns
(e.g. "show me Antonelli's sector times each lap") rather than just
the per-driver best/theoretical-best summary.
Args:
year: Season year (2018+)
event: Race name or round number
session: Session type (R, Q, S, FP1, FP2, FP3)
driver: Optional driver code to filter (default: all drivers)
include_laps: If True, include a laps array per driver with each
accurate lap's S1/S2/S3 and total lap time. Default
False keeps responses compact for the typical
"fastest sectors / theoretical best" question.
Returns:
For each driver: driver (code), fullName, teamName, bestS1, bestS2,
bestS3, theoreticalBest, actualBest, gapSec. With include_laps,
each entry also has laps: [{lapNumber, s1, s2, s3, lapTime}, ...].
Example: get_sector_times(2024, "Monaco", "Q") → [ {"driver": "VER", "fullName": "Max Verstappen", "teamName": "Red Bull Racing", "bestS1": "0:00:22.123", "bestS2": "0:00:24.456", "bestS3": "0:00:21.789", "theoreticalBest": "0:01:08.368", "actualBest": "0:01:08.570", "gapSec": -0.202}, ... ]
Note: A negative gapSec means the theoretical best (sum of individual sector bests) is faster than the actual best lap — typical, since sector bests usually come from different laps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| event | Yes | ||
| session | Yes | ||
| driver | No | ||
| include_laps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |