---
title: "H2H Finish Probability"
method: GET
path: "/v1/analytics/h2h"
tags: ["Analytics"]
---

# H2H Finish Probability

`GET /v1/analytics/h2h`

## Request

- Base URL: `https://api.racehooks.io`
- URL: `https://api.racehooks.io/v1/analytics/h2h`
- Auth: API key in header `Authorization`

Head-to-head finish probability between two drivers. Returns P(driverA finishes ahead of driverB) computed from the CTMC position distributions stored in rh_lap_analytics. Requires the Custom plan.

## Query parameters

- `driverA` string, required
- `driverB` string, required

## Response `200`

Default Response

- object
  - `driverA` object
    - `number` string
    - `driverId` string
    - `constructorId` string
    - `tla` string
    - `name` string
    - `team` string
  - `driverB` object
    - `number` string
    - `driverId` string
    - `constructorId` string
    - `tla` string
    - `name` string
    - `team` string
  - `pABeatsB` number
  - `pBBeatsA` number
  - `pTie` number
  - `lap` integer
  - `raceId` string, nullable
  - `updatedAt` string, nullable

---

[API](https://skmtc.dev/racehooks/apis/racehooks-api.md) · [All operations](https://skmtc.dev/racehooks/apis/racehooks-api/llms.txt) · [OpenAPI document](https://skmtc.dev/racehooks/apis/racehooks-api/revisions/2335b73f46e4?raw)
