# Formula 1 lap times API

Get Formula 1 Lap Times data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as driver_id, limit, output, and retrieve structured data including championship season year, race round number, grand Prix event name, circuit venue name, and lap number for plot race pace charts, and correlate pace with pit stops.

Documentation: https://openany.si/formula-1/formula-1-lap-times-api/97ea0bfb-f289-46e4-9310-11d829d89465/
API ID: 97ea0bfb-f289-46e4-9310-11d829d89465
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/f1/v1/laps
Page update time: 2026-12-03T02:43:27.350Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:43:25.842Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## Formula 1 Lap Times API

Call GET with optional season (from 1950 or current), round (round number or last by default), lap (single lap integer), driver\_id, limit (1-100, default 100) and offset (default 0). Returned timings\[\] rows include lap, driver\_id, position and time together with race and circuit metadata.

## What You Can Build

- **Plot race pace charts**: Filter by season, round and driver\_id to graph lap-by-lap times across stints.
- **Compare drivers on a single lap**: Pass lap to retrieve every driver's position and time on that specific lap.
- **Correlate pace with pit stops**: Combine lap timings with the Formula 1 Pit Stops API to study undercuts and out-lap pace.

## Returned Data

| Field | Meaning |
| --- | --- |
| `season` | Championship season year |
| `round` | Race round number |
| `name` | Grand Prix event name |
| `circuit.name` | Circuit venue name |
| `total` | Total matching lap timing rows |
| `next_offset` | Next pagination offset, or null |
| `timings[].lap` | Lap number |
| `timings[].driver_id` | Driver identifier for the lap |
| `timings[].position` | Driver track position on that lap |
| `timings[].time` | Formatted lap time string |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Formula 1 lap times API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "season": {
          "type": "string",
          "description": "Season year from 1950, or current (default)."
        },
        "round": {
          "type": "string",
          "description": "Round number in the season, or last (default)."
        },
        "lap": {
          "type": "integer",
          "description": "Only this lap."
        },
        "driver_id": {
          "type": "string",
          "description": "Only this driver (id from `/f1/v1/drivers`)."
        },
        "limit": {
          "type": "integer",
          "description": "Rows per page, 1-100 (default 100)."
        },
        "offset": {
          "type": "integer",
          "description": "Row offset (default 0)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "applied_filters": {
      "type": "object",
      "properties": {
        "driver_id": {
          "type": "string"
        },
        "lap": {
          "type": "null"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "circuit": {
      "type": "object",
      "properties": {
        "circuit_id": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "locality": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "wiki": {
          "type": "string"
        }
      }
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "date": {
      "type": "string"
    },
    "fetched_at": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "next_offset": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    },
    "round": {
      "type": "integer"
    },
    "season": {
      "type": "integer"
    },
    "sessions": {
      "type": "object",
      "properties": {
        "first_practice": {
          "type": "null"
        },
        "qualifying": {
          "type": "null"
        },
        "race": {
          "type": "string"
        },
        "second_practice": {
          "type": "null"
        },
        "sprint": {
          "type": "null"
        },
        "sprint_qualifying": {
          "type": "null"
        },
        "third_practice": {
          "type": "null"
        }
      }
    },
    "start": {
      "type": "string"
    },
    "time": {
      "type": "string"
    },
    "timings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "driver_id": {
            "type": "string"
          },
          "lap": {
            "type": "integer"
          },
          "position": {
            "type": "integer"
          },
          "time": {
            "type": "string"
          }
        }
      }
    },
    "total": {
      "type": "integer"
    },
    "wiki": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/f1/v1/laps?driver_id=max_verstappen&limit=1&output=json&raw=0&round=1&season=2024' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "applied_filters": {
    "driver_id": "max_verstappen",
    "lap": null
  },
  "cached": false,
  "circuit": {
    "circuit_id": "bahrain",
    "country": "Bahrain",
    "lat": 26.0325,
    "lng": 50.5106,
    "locality": "Sakhir",
    "name": "Bahrain International Circuit",
    "wiki": "https://en.wikipedia.org/wiki/Bahrain_International_Circuit"
  },
  "count": 1,
  "credits_used": 1,
  "date": "2024-03-02",
  "fetched_at": "2026-11-19T12:21:29.829Z",
  "name": "Bahrain Grand Prix",
  "next_offset": 1,
  "offset": 0,
  "round": 1,
  "season": 2024,
  "sessions": {
    "first_practice": null,
    "qualifying": null,
    "race": "2024-03-02T15:00:00Z",
    "second_practice": null,
    "sprint": null,
    "sprint_qualifying": null,
    "third_practice": null
  },
  "start": "2024-03-02T15:00:00Z",
  "time": "15:00:00Z",
  "timings": [
    {
      "driver_id": "max_verstappen",
      "lap": 1,
      "position": 1,
      "time": "1:37.284"
    }
  ],
  "total": 57,
  "wiki": "https://en.wikipedia.org/wiki/2024_Bahrain_Grand_Prix"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### What race is returned if season and round are omitted?
It defaults to the current season and the last completed round.

### How do I paginate through all laps in a Grand Prix?
Use limit (1 to 100, default 100) and offset (default 0), then pass next_offset on subsequent requests until null.

### Can I retrieve lap times for just one driver?
Yes. Pass driver_id (from the Formula 1 Drivers API, such as max_verstappen) to narrow timings[] to that driver.

### Can I inspect all cars on a single lap?
Yes. Set lap to the target lap integer without driver_id to see every car's time and position on that lap.

### Does the response include circuit and session metadata?
Yes. The response includes circuit details and the sessions schedule object alongside timings[].

### How do I avoid cached data right after a race?
Pass fresh=1 to bypass the 24-hour cache and raw=0 to omit bulky raw blocks.

## Available implementations
- apish: https://openany.si/formula-1/formula-1-lap-times-api/97ea0bfb-f289-46e4-9310-11d829d89465/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
