> For the complete documentation index, see [llms.txt](https://docs.sportmonks.com/v3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportmonks.com/v3/motorsport-api/tutorials-and-guides/tutorials/enrich-your-response/how-to-track-tyre-stints.md).

# How to Track Tyre Stints

> **✅ Included in All Plans**
>
> The stints endpoints are included at no additional cost.
>
> Plans differ only in leagues and API call limits.
>
> [Compare plans →](https://www.sportmonks.com/football-api/plans-pricing/)

This guide shows you how to retrieve tyre stint data for a race - all stints across the full field, per-driver filtering, start and end lap ranges, and live polling for the latest stint activity.

### When to use this

Use the stints endpoints when you want to:

* Display each driver's tyre strategy as a timeline of compounds and lap ranges
* Track how many stints a driver has completed during a live race
* Identify which drivers are on fresh versus old tyres at a given point in the race
* Build a strategy comparison showing different teams' approaches across the same race

### The stints endpoints

| Endpoint                                  | URL pattern                                 | Use case                                   |
| ----------------------------------------- | ------------------------------------------- | ------------------------------------------ |
| GET Stints by Fixture ID                  | `/fixtures/{id}/stints`                     | All stints for every driver in the race    |
| GET Stints by Fixture ID and Driver ID    | `/fixtures/{id}/stints/drivers/{driver_id}` | All stints for one specific driver         |
| GET Latest Stints by Fixture ID           | `/fixtures/{id}/stints/latest`              | Most recent stint entries (live polling)   |
| GET Stints by Fixture ID and Stint Number | `/fixtures/{id}/stints/{stint_number}`      | All drivers' data for a given stint number |

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

### Base response fields

```json
{
  "data": [
    {
      "id": 141,
      "fixture_id": 19402069,
      "stint_number": 1,
      "driver_number": 5,
      "participant_id": 37920819,
      "is_latest": false
    }
  ]
}
```

`stint_number` starts at 1 for each driver and increments with each tyre change. `participant_id` is the driver ID. `driver_number` is the car number.

### Adding start and end laps with the `details` include

The base response tells you the stint number but not its lap range. Add `details` to get when the stint started and ended:

```http
GET https://api.sportmonks.com/v3/motorsport/fixtures/19408487/stints
?api_token={your_token}&include=details
```

From the [Results and Live Data Type Reference](https://docs.sportmonks.com/v3/motorsport-api/welcome/results-and-live-data-type-reference), the stint detail types are:

| type\_id | Name           | Value                                       |
| -------- | -------------- | ------------------------------------------- |
| `9725`   | Stint Lap Info | Object containing `start_lap` and `end_lap` |
| `9726`   | Stint Number   | The stint number                            |

Note that tyre compound data (SOFT, MEDIUM, HARD, etc.) lives on the `results` or `lineups.details` include on the fixture itself under type `9729` (TYRE), not directly on the stints endpoint. The stints endpoint tells you the stint structure; the tyre compound at any moment comes from the live results data.

### Working with the data

#### Fetch all stints for a race

```javascript
const API_TOKEN = 'your_token';
const FIXTURE_ID = 19408487;

const response = await fetch(
  `https://api.sportmonks.com/v3/motorsport/fixtures/${FIXTURE_ID}/stints
?api_token=${API_TOKEN}&include=details`
);
const { data: stints } = await response.json();

function getDetail(details, typeId) {
  return details?.find(d => d.type_id === typeId)?.data ?? null;
}

const parsed = stints.map(stint => ({
  driverNumber: stint.driver_number,
  participantId: stint.participant_id,
  stintNumber: stint.stint_number,
  lapInfo: getDetail(stint.details, 9725)
}));

// Group by driver for a strategy overview
const byDriver = {};
parsed.forEach(stint => {
  if (!byDriver[stint.driverNumber]) byDriver[stint.driverNumber] = [];
  byDriver[stint.driverNumber].push(stint);
});

// Sort each driver's stints by stint number
Object.values(byDriver).forEach(driverStints => {
  driverStints.sort((a, b) => a.stintNumber - b.stintNumber);
});
```

#### Fetch stints for a single driver

```javascript
const DRIVER_ID = 37920800;

const response = await fetch(
  `https://api.sportmonks.com/v3/motorsport/fixtures/${FIXTURE_ID}/stints/drivers/${DRIVER_ID}
?api_token=${API_TOKEN}&include=details`
);
const { data: driverStints } = await response.json();

driverStints.forEach(stint => {
  const lapInfo = getDetail(stint.details, 9725);
  console.log(
    `Stint ${stint.stint_number}: laps ${lapInfo?.start_lap ?? '?'} - ${lapInfo?.end_lap ?? 'ongoing'}`
  );
});
```

#### Fetch by stint number to compare all drivers on their first stint

```javascript
const STINT_NUMBER = 1;

const response = await fetch(
  `https://api.sportmonks.com/v3/motorsport/fixtures/${FIXTURE_ID}/stints/${STINT_NUMBER}
?api_token=${API_TOKEN}&include=details`
);
const { data: firstStints } = await response.json();

// Shows how long each driver's opening stint ran before pitting
firstStints.forEach(stint => {
  const lapInfo = getDetail(stint.details, 9725);
  const stintLength = lapInfo
    ? (lapInfo.end_lap - lapInfo.start_lap + 1)
    : null;
  console.log(`Car #${stint.driver_number}: ${stintLength ?? '?'} laps`);
});
```

#### Poll latest stints during a live race

```javascript
async function pollLatestStints(fixtureId, token) {
  const response = await fetch(
    `https://api.sportmonks.com/v3/motorsport/fixtures/${fixtureId}/stints/latest
?api_token=${token}&include=details`
  );
  const { data } = await response.json();
  return data;
}

setInterval(async () => {
  const latest = await pollLatestStints(FIXTURE_ID, API_TOKEN);
  // Update strategy display when new stints appear
}, 15000);
```

`GET Latest Stints by Fixture ID` returns the most recently updated stint entries. During a live race, a new entry appears when a driver pits and begins a new stint.

### Common pitfalls

**Tyre compound is not on the stints endpoint.** The stints endpoint tracks stint structure (number, lap range). To show which compound a driver is currently on, use `GET All Livescores` with `?include=results` and read the `TYRE` type from the results include. The compound changes in real time as drivers pit.

**`end_lap` is `null` for the current active stint.** During a live race, the driver's most recent stint has no end lap until they pit or the session ends. Handle `null` gracefully - display it as "ongoing" rather than a number.

**`stint_number` resets per driver, not per race.** Each driver starts at stint 1. Stint 2 for driver A and stint 2 for driver B are unrelated - they just both happen to be on their second set of tyres.

**`participant_id` is the driver ID.** Cross-reference with driver entities or lineup data to display names. `driver_number` is car number only.

**`GET Latest Stints` is not per-driver.** It returns the most recently updated stint records across all drivers, which may be 1 entry or several if multiple drivers pitted at the same time.

### Advanced usage

To build a full race strategy visualisation, combine stints with pit stop data. Stints give you the lap ranges; pit stop data gives you the stop duration at each transition. Pair them by `driver_number` and `lap_number` to render a tyre strategy bar for each driver across the full race distance.

To calculate stint length distribution, fetch all stints for a race and compute `end_lap - start_lap + 1` for each completed stint. Plotting this as a histogram shows whether the race was primarily one-stop, two-stop, or more varied in strategy.

### 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

**Stints endpoints**

* [GET Stints by Fixture ID](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/stints/get-stints-by-fixture-id.md)
* [GET Stints by Fixture ID and Driver ID](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/stints/get-stints-by-fixture-id-and-driver-id.md)
* [GET Latest Stints by Fixture ID](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/stints/get-latest-stints-by-fixture-id.md)
* [GET Stints by Fixture ID and Stint Number](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/stints/get-stints-by-fixture-id-and-stint-number.md)

**Type references**

* [Results and Live Data Type Reference](https://docs.sportmonks.com/v3/motorsport-api/welcome/results-and-live-data-type-reference)

**Related entities**

* [Stint](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/stint.md)
* [Fixture](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/fixture.md)

**Related guides**

* [How to Fetch Pit Stop Data for a Race](https://docs.sportmonks.com/v3/motorsport-api/tutorials-and-guides/guides/how-to-fetch-pit-stop-data-for-a-race.md)
* [How to Build a Live Race Tracker](https://docs.sportmonks.com/v3/motorsport-api/tutorials-and-guides/guides/how-to-build-a-live-race-tracker.md)

### FAQ

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

**How do I know which tyre compound a driver is on during their stint?** The stints endpoint does not carry compound data. Use `GET All Livescores` with `?include=results` and read the `TYRE` type (type\_id `9729`) from the results array for each driver. This updates in real time as compounds change.

**What does stint number 1 represent for a driver who starts on used tyres?** Stint 1 is always the opening stint regardless of tyre age at the race start. Tyre age since the start of the race is available via the `TYRE` result type on the fixture, not directly from the stints endpoint.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sportmonks.com/v3/motorsport-api/tutorials-and-guides/tutorials/enrich-your-response/how-to-track-tyre-stints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
