Establishing a base rate
Before deciding a horse is well treated off a break, know what horses off breaks generally do.
Documentation / Market & analysis
/v1/analysis/layoff
Performance by days since the last run, across everything.
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 |
|---|---|---|---|---|
| by | query | string | no | A second dimension to split the layoff bands by, e.g. run_type or class. |
| region | query | string | no | Jurisdiction. |
| run_type | query | string | no | One run type. |
| min_runs | query | integer | no | Drop rows with fewer runners than this. |
| date_from | query | string | no | YYYY-MM-DD. |
| date_to | query | string | no | YYYY-MM-DD. |
curl https://api.apihorseracing.com/v1/analysis/layoff \ -H "X-API-Key: $AHR_KEY"
$ch = curl_init('https://api.apihorseracing.com/v1/analysis/layoff'); 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/analysis/layoff', { 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/analysis/layoff", headers={"X-API-Key": os.environ["AHR_KEY"]}, ).json()
curl https://api.apihorseracing.com/v1/analysis/layoff?key=$AHR_KEY
$url = 'https://api.apihorseracing.com/v1/analysis/layoff' . '?key=$AHR_KEY'; $data = json_decode(file_get_contents($url), true)['data'];
const res = await fetch( 'https://api.apihorseracing.com/v1/analysis/layoff?key=$AHR_KEY' ); const { meta, data } = await res.json();
import os, requests r = requests.get( "https://api.apihorseracing.com/v1/analysis/layoff?key=$AHR_KEY", ).json()
No sample has been captured for this endpoint yet. Use the console below against your own key.
| 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. |
| 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
Performance by days since the last run, across the whole archive rather than for one horse. The population answer that makes the individual one readable.
Days off is one of the few variables that is knowable in advance, applies to every runner, and is not obviously priced. Whether the market handles it well is exactly the kind of question worth a large sample.
Read it alongside /v1/horses/{horse_id}/layoff. This endpoint says what a three month break usually means; that one says what it has meant for this horse. Neither is much use without the other.
Before deciding a horse is well treated off a break, know what horses off breaks generally do.
by=run_type. A summer break in jumps is normal and a summer break on the flat is not, and the numbers reflect that.
A band with an A/E clear of 1.00 over a large sample is one of the more plausible findings available in this data.
Days since previous run is computed from the runs we hold. Early in the archive a horse's first appearance has no previous run and is excluded rather than counted as a long layoff.