Get Starting Grid
get_starting_gridFetch the starting grid for an F1 race from OpenF1 using a session_key. Retrieve grid positions and driver numbers after official results publish; retry earlier sessions if not yet available.
Instructions
Fetch the starting grid for an F1 race from OpenF1.
Grid data becomes available a few minutes after the official results are published on the Formula 1 website. If the API returns HTTP 404, the grid is not yet published for that session — retry with an earlier session_key (use get_sessions to find completed sessions).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| position | No | int — optional, >= 1. Position on the grid. | |
| session_key | No | int | str — required in practice, positive int or 'latest'. Session identifier; use get_sessions to discover it. | |
| driver_number | No | int — optional, 1-99. Driver number for the season. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |