harnessracingapi
DocumentationStatistics: people

Head to head

Analyst

Every race two horses met in, and who finished in front.

GEThttps://api.harnessracingapi.com/v1/stats/head-to-head

Try it

Runs against the real API with your key
No key yet? Get a free key and it is filled in here for you.
https://api.harnessracingapi.com/v1/stats/head-to-head

Parameters

astringrequired
First horse id
bstringrequired
Second horse id

Returns

One object in data with these fields.

aobject
The first horse, id and name
bobject
The second horse, id and name
meetingsinteger
Races both ran in
a_aheadinteger
Times the first finished in front
b_aheadinteger
Times the second finished in front
racesarray
Each race with both places

Example answer

A real answer from the API, read in the last six hours.

{
    "data": {
        "a": {
            "id": "hr_hs_3ehemezb",
            "name": "Hamilton Du Ham"
        },
        "b": {
            "id": "hr_hs_g7a90x4r",
            "name": "Jizou D'Etang"
        },
        "meetings": 1,
        "a_ahead": 1,
        "b_ahead": 0,
        "races": [
            {
                "id": "hr_rc_m4hyrrnr",
                "date": "2026-11-28",
                "a": 1,
                "b": 2
            }
        ]
    },
    "meta": {
        "about": "a place beats no place (did not finish, disqualified or out of the places the source gives); races newest first, at most 500"
    }
}

Errors