Building a speed figure
The median per distance and going is the baseline. The percentiles tell you how much spread to expect before a time is remarkable.
Documentation / Courses & bias
/v1/courses/{course_id}/standard-times
Median winning time per distance, with the implausible ones counted.
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.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| course_id | path | string | yes | Opaque course identifier. |
| run_type | query | string | no | Restrict to one run type. |
| going | query | string | no | Restrict to one going. A standard time without a going is close to meaningless on turf. |
curl https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times \ -H "X-API-Key: $AHR_KEY"
$ch = curl_init('https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times'); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('AHR_KEY')], ]); $data = json_decode(curl_exec($ch), true)['data'];
const res = await fetch( 'https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times', { headers: { 'X-API-Key': process.env.AHR_KEY } } ); const { meta, data } = await res.json();
import os, requests r = requests.get( "https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times", headers={"X-API-Key": os.environ["AHR_KEY"]}, ).json()
curl https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times?key=$AHR_KEY
$url = 'https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times' . '?key=$AHR_KEY'; $data = json_decode(file_get_contents($url), true)['data'];
const res = await fetch( 'https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times?key=$AHR_KEY' ); const { meta, data } = await res.json();
import os, requests r = requests.get( "https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/standard-times?key=$AHR_KEY", ).json()
{ "meta": { "request_id": "d64f8e9397180233", "data_as_of": "2026-09-12T05:10:27+00:00", "plan": "analyst", "window": "2017 → upcoming", "count": 26 }, "data": { "course_id": "cr_JSRC8Z", "course": "Fontwell", "window": { "from": null, "to": null, "note": "The whole archive. Your plan sets no date limit." }, "method": "Median of recorded winning times, five race minimum. p10 and p90 rather than the extremes, because a single mistimed race would otherwise define the range. \"implausible\" counts times more than 30% either side of the median, which are almost certainly source errors.", "times": [ { "run_type": null, "distance": "2m 1f 162y", "races": 262, "standard_seconds": 269.68, "p10_seconds": 257.7, "p90_seconds": 287.67, "implausible": 0 }, { "run_type": null, "distance": "2m 5f 164y", "races": 112, "standard_seconds": 330.6, "p10_seconds": 319.2, "p90_seconds": 354.8, "implausible": 0 }, "… 24 more" ] } }
A real response from /v1/courses/cr_JSRC8Z/standard-times,
captured by calling the live API rather than written by hand.
Each field is described once and rendered on every endpoint that returns it, so the wording cannot drift between pages.
| Field | Type | What it is |
|---|---|---|
| course_id | string | Opaque course identifier. |
| course | string | Course name. |
| window | string | How far back and forward that plan can read. |
| run_type | string | Flat, Hurdle, Chase or NH Flat. |
| distance | string | Official distance as published, e.g. "3m 3f 119y". |
The code a race was run under lives on the horse profile rather than the race, so it arrives on a later pass. A null run_type means not yet fetched, not unclassified.
| Code | Status | When |
|---|---|---|
| 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. |
| upgrade_required | 403 | The endpoint returns computed statistics and your plan does not include them. The body names every plan that does reach it, so you never have to look it up. |
| not_found | 404 | The identifier is well formed but nothing has it. Distinct from invalid_id, which means the identifier itself is wrong. |
| invalid_id | 422 | The prefix does not match the kind of thing the path expects, or the identifier is malformed. A horse id passed where a race is wanted lands here rather than returning the wrong race. |
| 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. |
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. Forget it
The median winning time per distance, with the tenth and ninetieth percentiles, so you can see the spread rather than just the middle.
Median rather than mean, because winning times contain obvious data errors and a mean chases them. A single race recorded at four seconds moves an average and does nothing to a median.
Every row also returns how many times were implausible and therefore excluded. That count is part of the answer: a distance where a fifth of the times were unusable is one whose standard time you should not trust, and hiding that would be the dishonest choice.
Times are only published in some jurisdictions. Britain, Ireland and South Africa carry them on most races; France, America and Germany carry almost none. The coverage page has the measured figures.
The median per distance and going is the baseline. The percentiles tell you how much spread to expect before a time is remarkable.
Compare a winning time against the ninetieth percentile for that distance and ground rather than against a single published standard.
A high implausible count means the times at that track are not good enough to build on.