For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Fetch Pit Stop Data for a Race

βœ… Included in All Plans

The pitstops endpoints are included at no additional cost.

Plans differ only in leagues and API call limits.

Compare plans β†’

This guide shows you how to retrieve pit stop data for a race - all stops across the full field, per-driver filtering, lap-level querying, and pit duration breakdown using the details include.

When to use this

Use the pitstops endpoints when you want to:

  • Display a pit stop timeline showing when each driver stopped

  • Analyse team pit stop performance by stop duration

  • Correlate pit stops with position changes during a race

  • Build a strategy tracker showing each driver's stop sequence

The pitstops endpoints

Endpoint
URL pattern
Use case

GET Pitstops by Fixture ID

/fixtures/{id}/pitstops

All pit stops for every driver in the race

GET Pitstops by Fixture ID and Driver ID

/fixtures/{id}/pitstops/drivers/{driver_id}

All pit stops for one specific driver

GET Latest Pitstops by Fixture ID

/fixtures/{id}/pitstops/latest

Most recent pit stop entries (live polling)

GET Pitstops by Fixture ID and Lap Number

/fixtures/{id}/pitstops/{lap_number}

All pit stops that occurred on a given lap

None of these endpoints paginate - the full result set returns in one response.

Base response fields

lap_number is the lap on which the driver entered the pit lane. participant_id is the driver's ID - the same value as player_id in lineups and participant_id in standings responses. driver_number is the car number.

Adding pit duration with the details include

The base response tells you when a stop happened but not how long it took. The details include adds timing data:

From the Results and Live Data Type Reference, the pitstop detail types are:

type_id
Name
Value

9727

Pit Timestamp

Unix timestamp when the driver entered the pit lane

9728

Pit Duration

Time spent in the pit lane in seconds

Working with the data

Fetch all pit stops for a race

Fetch stops for a single driver

Fetch all stops on a specific lap

This is useful for identifying undercut or overcut windows - when multiple drivers stop on the same lap or within one or two laps of each other.

Poll latest pit stops during a live race

Common pitfalls

lap_number is when the driver entered the pit lane, not when they exited. The stop duration in details tells you how long the stop lasted. If you want to know which lap the driver rejoined on, add the duration to the lap timestamp.

participant_id is the driver ID, not the team ID. Cross-reference with the driver entity or lineups to display driver names. driver_number is the car number only.

details can be absent for stops logged without timing. Not every pit stop entry includes timing data, particularly for stops logged during safety car periods or for mechanical issues. Always handle null from getDetail().

GET Latest Pitstops returns the most recent stop entries across all drivers, not a per-driver latest. During a live race this may return several entries if multiple drivers stopped on the same or consecutive laps.

The pitstops endpoint covers all session types. If you pass a practice fixture ID, you'll get pit lane entries from that practice session. Make sure you're passing the race fixture ID for race data.

Advanced usage

To build a pit stop comparison table sorted by stop duration, fetch all stops with ?include=details, extract pit-duration from each, and sort ascending. Highlight outliers (stops more than 1 second above the median) as indicators of potential issues.

To identify safety car windows, look for laps where 3 or more drivers stopped - these cluster around virtual or physical safety car deployments when teams bring cars in to minimise time loss.

Common errors

Status
Likely cause

401

Missing or invalid api_token

404

The fixture_id or driver_id does not exist

422

Query complexity exceeded - remove includes

See also

Pitstops endpoints

Type references

Related entities

Related guides

FAQ

Do I need to paginate the pitstops endpoints? No. All pitstops endpoints return the full result set in a single response.

Can I see pit stop data during a live race? Yes. Use GET Latest Pitstops by Fixture ID during a live session. The base GET Pitstops by Fixture ID endpoint also updates in real time as new stops are logged.

Is pit duration available for all seasons? Pit duration data availability varies. Check the Results and Live Data Type Reference for season availability notes on specific type IDs.

Last updated

Was this helpful?