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

Driver and Team Profile Guide

🏎️ Motorsport API Required

This guide requires an active Motorsport API subscription (€79/mo, 3,000 API calls/hr).

View pricing β†’

This guide walks through how to build driver and team profile pages using the Motorsport API - combining biographical data, current season context, championship standings, and race results into rich, data-driven profiles.

What you'll learn:

  • How to look up driver and team IDs by name

  • How to build a complete driver profile with biographical data, current team, and standings

  • How to build a complete team profile with constructor data, current drivers, and standings

  • How to enrich profiles with season race results

Prerequisites: Active Motorsport API subscription, API token, familiarity with REST APIs

1. When to use driver and team profiles

This approach is well suited to:

  • Driver profile pages showing career details, current team, championship position, and season results

  • Constructor profile pages showing team identity, current driver lineup, and championship standing

  • Fantasy F1 applications displaying driver cards with points and recent form

  • Comparison tools contrasting two drivers or constructors across a season

Profile data is relatively stable - driver biographical data rarely changes, and standings/results only update after each race weekend. Cache aggressively and refresh after race events.

2. Step 1: Look up the ID by name

Driver and team IDs are required for the standings and race results endpoints. Use the search endpoints to find them by name before making any other call.

Search for a driver:

Search for a team:

Both search endpoints accept partial names and are case-insensitive. The id in the response is the value to use in all subsequent calls. For drivers, this is the same value referenced as player_id in race result lineups and participant_id in standings, laps, pitstops, and stints responses.

3. Step 2: Build a driver profile

With the driver ID in hand, fetch the full profile in a single enriched call:

This returns:

  • Biographical data: full name, date of birth, headshot image

  • nationality - the country the driver represents

  • country - the driver's country of birth (may differ from nationality)

  • teams.team - the driver's current team with constructor name and logo

  • position - the driver's role within the team (first driver, second driver, or test driver)

  • metadata - additional profile data such as short name and debut information

Include depth on drivers is 3. teams.team counts as 2 levels (teams β†’ team), leaving one further level available.

Key fields to use in your UI:

Field
Use for

display_name

Full name on profile header (e.g. "Max Verstappen")

common_name

Compact name for cards and leaderboards (e.g. "M. Verstappen")

image_path

Driver headshot image

date_of_birth

Age calculation and biography

nationality.name

Nationality flag and label

teams[0].team.name

Current constructor name

teams[0].team.image_path

Constructor logo

position.name

Team role (first driver, second driver)

4. Step 3: Get the driver's championship standing

With the driver's participant_id (same as their id) and the current season ID, fetch their championship position:

This returns standings for all drivers. Filter client-side by participant_id to isolate the specific driver:

The stage include gives you the most recently completed race weekend - use stage.name and stage.sort_order to display "Championship position after Round X".

5. Step 4: Get the driver's season race results

Fetch the full season race result record for the driver using their ID and the season ID:

This returns all race and sprint race fixtures for the season with the driver's lineup and result details embedded. No includes are available - all data is pre-embedded.

Paginate through all pages to get the complete season. Use sort_order on each stage to order rounds chronologically. Extract position and points from the details array on each lineup object, resolving type_id values via the Results & Live Data Type Reference.

type_id: 9711 is the position result type confirmed from the live race results example (Norris P3 at Abu Dhabi). Verify all type IDs against the Results & Live Data Type Reference before deploying.

6. Building a team profile

Step 1: Fetch the team profile

This returns:

  • Team identity: name, short code, logo, founding year

  • country - the country the team is registered in

  • drivers.driver - current season driver lineup with full driver profiles

  • seasonDetails - per-season car details, team principal, and branding

  • seasonDrivers - driver participation details for the current season

Include depth on teams is 3. drivers.driver counts as 2 levels, leaving one further level.

Key fields for your UI:

Field
Use for

name

Team name on profile header (e.g. "McLaren")

short_code

Compact constructor code (e.g. "MCL")

image_path

Constructor logo

type

Power unit type (e.g. "hybrid")

drivers[].driver.display_name

Current driver names

drivers[].driver.image_path

Driver headshots

country.name

Constructor nationality

Step 2: Get the constructor championship standing

Filter by participant_id matching the team ID to isolate the specific constructor's standing. The points field contains the combined points of both drivers.

Step 3: Get the team's season race results

The team results response differs from the driver results response in one important way: the lineups array for each fixture contains both drivers who raced for that team. This means you can show both drivers' results side by side for each race weekend from a single call.

7. Complete driver profile implementation

The following brings together all four steps for a driver profile page.

8. Common pitfalls

Using name instead of display_name for UI display

The name field and display_name field often contain the same value but display_name is explicitly the field intended for application display. Use display_name for profile headers and common_name for compact timing-style displays.

Assuming teams[0] is always the current team

The teams include returns the driver's participation for the current season. In most cases this is a single entry, but always access it safely with optional chaining or a null check rather than assuming the array is populated.

Mixing up driver id and participant_id

The driver's id from the Drivers endpoint is the same value as player_id in race result lineups and participant_id in standings, laps, pitstops, and stints responses. These are three names for the same value. Always use the driver id as your cross-endpoint join key.

Fetching team results and expecting one driver per race

Unlike the driver results endpoint, the team results endpoint returns both drivers' lineups for each fixture. Your data processing must handle a lineups array with multiple entries per fixture, not just one.

Not paginating race results

Race results paginate at the stage level. A 24-round season will return results across multiple pages. Always paginate to get the complete season record.

10. FAQ

Q: How do I get a driver's age from date_of_birth?

date_of_birth is a YYYY-MM-DD string. Calculate age in your application by comparing it to the current date. Do not store a pre-calculated age value as it will become stale.

Q: The height and weight fields are null - is this expected?

Yes. These fields are present in the schema but sparsely populated. The search endpoint example shows height: 181 and weight: 72 for Verstappen, so data exists for some drivers. Always handle null gracefully in your application.

Q: How do I know which team a driver raced for in a past season?

The teams include returns current season participation. For historical team data, use the Race Results endpoint for that season - the team_id field in each lineup object shows which constructor the driver raced for in that specific race.

Q: Can I get a team's full historical driver roster across multiple seasons?

Use ?include=seasons on the team to get all seasons, then call the Race Results endpoint for each season using the team ID. The lineups array in each fixture shows all drivers who raced for that team.

Q: Is this available in all subscription plans?

All Motorsport API endpoints require an active Motorsport API subscription (€79/mo). View pricing β†’

Last updated

Was this helpful?