APIHorseRacing

Documentation / Horses & pedigree

Search horses

GET /v1/horses/search

By name, with career totals attached.

Available on

Free key 24h – 7d
Live today + 3 days
Archive back to 2017
Complete 2017 → upcoming
Complete + Analyst 2017 → upcoming

Send your key in the X-API-Key header, or as ?key= if your tool cannot set one. A date outside your plan's window returns 403 outside_window naming the window, never an empty array.

Parameters

NameInTypeRequiredDescription
q query string yes At least two characters, matched against the name. A prefix match sorts above a match in the middle.
limit query integer no 1 to 100. Defaults to 25.
cursor query string no Opaque. Pass next_cursor from the previous response.

Request

curl https://api.apihorseracing.com/v1/horses/search \
  -H "X-API-Key: $AHR_KEY"

Response

200 OK application/json harvested 8 days ago
{
    "meta": {
        "request_id": "f17c3fed427c5eaf",
        "data_as_of": "2026-09-12T05:10:27+00:00",
        "plan": "analyst",
        "window": "2017 → upcoming",
        "query": "Sea",
        "count": 25
    },
    "data": [
        {
            "horse_id": "hs_1AJMZ29",
            "name": "Sea A Lucky Star",
            "sex": "f",
            "colour": null,
            "career": {
                "runs": 1,
                "wins": 0,
                "seconds": 0,
                "thirds": 0,
                "casualties": 0,
                "win_pct": 0,
                "first_run": "2025-10-25",
                "last_run": "2025-10-25"
            }
        },
        {
            "horse_id": "hs_1ND3VDM",
            "name": "Sea Admiral",
            "sex": "g",
            "colour": null,
            "career": {
                "runs": 6,
                "wins": 1,
                "seconds": 0,
                "thirds": 0,
                "casualties": 0,
                "win_pct": 0.167,
                "first_run": "2019-02-22",
                "last_run": "2021-07-20"
            }
        },
        "… 23 more"
    ]
}

A real response from /v1/horses/search?name=Sea, captured by calling the live API rather than written by hand.

Response fields

Each field is described once and rendered on every endpoint that returns it, so the wording cannot drift between pages.

FieldTypeWhat it is
horse_id string Opaque horse identifier.
name string Race title as published, sponsor and all.
runs integer Rides in the slice, priced or not.
win_pct number Wins over runs. The number everyone quotes and the one that tells you least.

Errors this endpoint returns

CodeStatusWhen
unauthorized 401 No key, or one we do not recognise. Check the header name and that the key has not been rotated from your account page.
invalid_param 422 A date that is not YYYY-MM-DD, a by= dimension we do not have, or a cursor that did not come from us. The message names the parameter.
rate_limited 429 Past your per-minute rate. Retry-After is set, and X-RateLimit-Remaining tells you where you stand on every successful response too.
server_error 500 Ours, not yours. Every response carries a request_id; quote it and we can find the exact request.

Run it live

A real request from your browser straight to api.apihorseracing.com with your own key. Nothing is proxied and nothing is logged by this page.

Remembered in this browser so you do not paste it on every page.

What this is for

Horses by name, with career runs, wins and the span of their racing attached to each result. Those figures are not decoration: horse names repeat constantly, across jurisdictions and across generations, and the career line is how a human tells two apart.

There is no single global horse identity. A horse that raced in Ireland and then in Britain may appear once or twice depending on what the source published, and we do not merge them on a guess. Matching records across jurisdictions on a name and a foaling year produces confident, wrong answers.

Common uses

Resolving a name to an identifier

The obvious one. Take the identifier and call the horse endpoint.

Disambiguating a repeated name

Two horses called the same thing are separated by their run counts and their date spans, both of which are here.

Type-ahead

A small limit and a prefix search is fast. /v1/search does the same across four entity types if you want one box.

Notes

Names are matched as published, including punctuation and apostrophes.

Related in Horses & pedigree