Setting a benchmark
Before claiming a method works, check what simply backing the favourite here would have returned.
Documentation / Courses & bias
/v1/courses/{course_id}/favourites
How the market leader holds up here.
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. |
| field_size | query | string | no | A field size band. Favourite performance depends heavily on how many it is beating. |
curl https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/favourites \ -H "X-API-Key: $AHR_KEY"
$ch = curl_init('https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/favourites'); 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/favourites', { 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/favourites", headers={"X-API-Key": os.environ["AHR_KEY"]}, ).json()
curl https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/favourites?key=$AHR_KEY
$url = 'https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/favourites' . '?key=$AHR_KEY'; $data = json_decode(file_get_contents($url), true)['data'];
const res = await fetch( 'https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/favourites?key=$AHR_KEY' ); const { meta, data } = await res.json();
import os, requests r = requests.get( "https://api.apihorseracing.com/v1/courses/cr_JSRC8Z/favourites?key=$AHR_KEY", ).json()
{ "meta": { "request_id": "7b86fe7f06ace2a5", "data_as_of": "2026-09-12T05:10:27+00:00", "plan": "analyst", "window": "2017 → upcoming", "count": 3 }, "data": { "course_id": "cr_JSRC8Z", "course": "Fontwell", "window": { "from": null, "to": null, "note": "The whole archive. Your plan sets no date limit." }, "note": "Favourites only, joint favourites included.", "overall": { "runs": 1395, "priced": 1395, "first": 503, "second": 294, "third": 204, "fourth": 88, "win_pct": 0.3606, "top3_pct": 0.7176, "expected_wins": 468.49, "a_e": 1.074, "a_e_range": [ 0.98, 1.167 ], "a_e_beats_market": false, "significant": false, "low_sample": false, "pl_1pt": -200.01, "roi_pct": -14.34 }, "by": "run_type", "run_type": [ { "run_type": "Hurdle", "runs": 217, "priced": 217, "first": 67, "second": 53, "third": 25, "fourth": 14, "win_pct": 0.3088, "top3_pct": 0.6682, "expected_wins": 68.26, "a_e": 0.982, "a_e_range": [ 0.747, 1.217 ], "a_e_beats_market": false, "significant": false, "low_sample": false, "pl_1pt": -53.08, "roi_pct": -24.46 }, { "run_type": "Chase", "runs": 173, "priced": 173, "first": 67, "second": 34, "third": 24, "fourth": 13, "win_pct": 0.3873, "top3_pct": 0.7225, "expected_wins": 60.47, "a_e": 1.108, "a_e_range": [ 0.843, 1.373 ], "a_e_beats_market": false, "significant": false, "low_sample": false, "pl_1pt": -18.67, "roi_pct": -10.79 }, "… 1 more" ] } }
A real response from /v1/courses/cr_JSRC8Z/favourites,
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. |
| runs | integer | Rides in the slice, priced or not. |
| priced | integer | Rides carrying a starting price. A/E and the profit figures use these; runs is the wider count. |
| first | integer | Wins. |
| second | integer | Seconds. Positions are returned separately so you apply your own place terms. |
| third | integer | Thirds. |
| fourth | integer | Fourths. |
| win_pct | number | Wins over runs. The number everyone quotes and the one that tells you least. |
| top3_pct | number | First, second or third over runs. Not a place strike rate; place terms vary. |
| expected_wins | number | Wins the market implied, summed over the slice. |
| a_e | number | Actual wins over expected. Above 1.00 means winning more often than the prices said. |
| a_e_range | array | Ninety five percent interval on A/E. If it spans 1.00 the figure is not evidence of anything. |
| a_e_beats_market | boolean | True only where the whole interval sits above 1.00. |
| significant | boolean | Whether the interval excludes 1.00 in either direction. |
| low_sample | boolean | Fewer than five expected wins. Treat A/E as noise. |
| pl_1pt | number | One point on every runner, settled at starting price. |
| roi_pct | number | Level stakes return. Backing everything loses more than the book margin, because equal stakes overweight the longshots. |
| run_type | string | Flat, Hurdle, Chase or NH Flat. |
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
How the market leader holds up at this track: strike rate, place rate, A/E and level stakes, split by field size.
The favourite is the single most useful baseline in racing, because it is the market's own best guess and every model should be measured against it rather against random selection.
Across the whole archive favourites return an A/E close to 1.00 and lose money at a rate near the book margin, which is what an efficient market looks like. A course and field size where that is not true is worth a second look, though most apparent exceptions are sample size.
Joint favourites are all counted as favourites, since they share the shortest price. This inflates the runner count slightly in the races where it happens and is the honest treatment: picking one arbitrarily would be worse.
Before claiming a method works, check what simply backing the favourite here would have returned.
A low favourite A/E with a tight interval means something at this course is harder to price than usual.
Field size changes everything. A favourite in a field of five and one in a field of twenty are different propositions.