{
    "openapi": "3.1.0",
    "info": {
        "title": "Horse Racing API UK",
        "version": "1",
        "description": "British and Northern Irish horse racing data since 2017. Factual data only: no predictions, ratings or tips.",
        "contact": {
            "name": "DeveloperData.net",
            "url": "https://horseracingapi.co.uk/support"
        },
        "termsOfService": "https://horseracingapi.co.uk/terms"
    },
    "servers": [
        {
            "url": "https://api.horseracingapi.co.uk"
        }
    ],
    "security": [
        {
            "ApiKey": []
        },
        {
            "Bearer": []
        }
    ],
    "paths": {
        "/v1/courses": {
            "get": {
                "operationId": "courses_list",
                "summary": "Every UK course",
                "description": "Every UK course, busiest first. Plans: Every plan, free key included.",
                "tags": [
                    "Courses"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "course_id": "cr_1wkcasv1",
                                            "name": "Wolverhampton",
                                            "nation": "England",
                                            "town": "Wolverhampton",
                                            "county": "West Midlands",
                                            "lat": 52.604,
                                            "lng": -2.1436,
                                            "direction": "left",
                                            "kinds": [
                                                "flat",
                                                "all_weather"
                                            ],
                                            "races": 6246,
                                            "first_meeting": "2017-01-04",
                                            "last_meeting": "2026-10-27"
                                        },
                                        {
                                            "course_id": "cr_xtryzmdd",
                                            "name": "Newcastle",
                                            "nation": "England",
                                            "town": "Newcastle upon Tyne",
                                            "county": "Tyne and Wear",
                                            "lat": 55.0308,
                                            "lng": -1.6008,
                                            "direction": "left",
                                            "kinds": [
                                                "flat",
                                                "jumps",
                                                "all_weather"
                                            ],
                                            "races": 5653,
                                            "first_meeting": "2017-01-03",
                                            "last_meeting": "2026-10-31"
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "03f58a1214ba7e5f",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "count": 68
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/courses-list"
                }
            }
        },
        "/v1/courses/{course_id}": {
            "get": {
                "operationId": "course",
                "summary": "One course",
                "description": "One course: what is raced there and the distances. Plans: Every plan, free key included.",
                "tags": [
                    "Courses"
                ],
                "parameters": [
                    {
                        "name": "course_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the course, as other answers give it (cr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "course_id": "cr_239y20yw",
                                        "name": "Abu Dhabi",
                                        "shortcode": null,
                                        "country": "UAE",
                                        "region": "UAE",
                                        "races": 22,
                                        "meetings": 3,
                                        "first_meeting": "2025-04-12",
                                        "last_meeting": "2026-10-29",
                                        "town": null,
                                        "county": null,
                                        "nation": null,
                                        "lat": null,
                                        "lng": null,
                                        "direction": null,
                                        "kinds": [],
                                        "run_types": [
                                            {
                                                "run_type": "Flat",
                                                "surface": "TURF",
                                                "races": 21,
                                                "first": "2025-04-12",
                                                "last": "2026-10-29"
                                            },
                                            {
                                                "run_type": null,
                                                "surface": "TURF",
                                                "races": 1,
                                                "first": "2025-04-12",
                                                "last": "2025-04-12"
                                            }
                                        ],
                                        "distances": [
                                            {
                                                "distance": "1m 3f",
                                                "races": 7
                                            },
                                            {
                                                "distance": "1m",
                                                "races": 6
                                            },
                                            {
                                                "distance": "7f",
                                                "races": 5
                                            }
                                        ]
                                    },
                                    "meta": {
                                        "request_id": "e7934fe3e2b0a40f",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T10:08:33+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/course"
                }
            }
        },
        "/v1/courses/{course_id}/fixtures": {
            "get": {
                "operationId": "course_fixtures",
                "summary": "A course's fixtures ahead",
                "description": "The meetings ahead at one course. Plans: Live, Archive and Complete.",
                "tags": [
                    "Courses"
                ],
                "parameters": [
                    {
                        "name": "course_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the course, as other answers give it (cr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [],
                                    "meta": {
                                        "request_id": "7a22c561a37a16ea",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T09:29:32+00:00",
                                        "count": 0
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/course-fixtures"
                }
            }
        },
        "/v1/meetings/calendar": {
            "get": {
                "operationId": "meetings_calendar",
                "summary": "The meetings calendar",
                "description": "Thirty days back and the week ahead, one row per UK course per day. Plans: Live, Archive and Complete.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "date": "2026-09-30",
                                            "course_id": "cr_ttc2m93z",
                                            "course": "Catterick",
                                            "country": "GB",
                                            "code": "flat",
                                            "fixtures": 1,
                                            "races": 8,
                                            "status": "run"
                                        },
                                        {
                                            "date": "2026-09-30",
                                            "course_id": "cr_qxzyn94c",
                                            "course": "Kempton",
                                            "country": "GB",
                                            "code": "aw",
                                            "fixtures": 1,
                                            "races": 9,
                                            "status": "run"
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "2d6f24742b86e537",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T12:18:33+00:00",
                                        "count": 125
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/meetings-calendar"
                }
            }
        },
        "/v1/meetings/{date}": {
            "get": {
                "operationId": "meetings_by_date",
                "summary": "Meetings on a date",
                "description": "Every UK meeting on a date, with going and weather. Plans: Every plan, free key included.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "required": true,
                        "description": "A UK racing day, YYYY-MM-DD, by the course's own clock.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "meeting_id": "mt_b5898ppq",
                                            "course_id": "cr_jqze1jjy",
                                            "course": "Bath",
                                            "shortcode": "BTH",
                                            "country": "ENG",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Soft (Heavy in places)",
                                            "surface": "TURF",
                                            "weather": "Sunny",
                                            "status": "DORMANT",
                                            "races": 8
                                        },
                                        {
                                            "meeting_id": "mt_rc6bwdyr",
                                            "course_id": "cr_7vbqtcfg",
                                            "course": "Ffos Las",
                                            "shortcode": "FFL",
                                            "country": "Wale",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Good",
                                            "surface": "TURF",
                                            "weather": "Mostly Cloudy",
                                            "status": "DORMANT",
                                            "races": 7
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "73755e24dae59fcb",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T08:03:04+00:00",
                                        "count": 4
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/meetings-by-date"
                }
            }
        },
        "/v1/meetings/{meeting_id}": {
            "get": {
                "operationId": "meeting",
                "summary": "One meeting",
                "description": "One meeting and every race on it. Plans: Every plan, free key included.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [
                    {
                        "name": "meeting_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the meeting, as other answers give it (mt_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "meeting_id": "mt_yzs5rm2b",
                                        "course_id": "cr_239y20yw",
                                        "course": "Abu Dhabi",
                                        "country": "UAE",
                                        "region": "UAE",
                                        "date": "2026-10-29",
                                        "going": "Good",
                                        "surface": "TURF",
                                        "weather": "Fine",
                                        "status": "DORMANT",
                                        "races": [
                                            {
                                                "race_id": "rc_0aa1c4st",
                                                "meeting_id": "mt_yzs5rm2b",
                                                "course": "Abu Dhabi",
                                                "time": "13:00",
                                                "off_time": "13:01:21",
                                                "name": "Race 1 - Al Ghadeer Handicap",
                                                "run_type": "Flat",
                                                "class": null,
                                                "distance": "6f",
                                                "going": "Good",
                                                "surface": "TURF",
                                                "handicap": true,
                                                "runners": 12,
                                                "result_available": true
                                            },
                                            {
                                                "race_id": "rc_z054gb4m",
                                                "meeting_id": "mt_yzs5rm2b",
                                                "course": "Abu Dhabi",
                                                "time": "13:30",
                                                "off_time": "13:32:18",
                                                "name": "Race 2 - Al Bidaya Maiden Stakes",
                                                "run_type": "Flat",
                                                "class": null,
                                                "distance": "7f",
                                                "going": "Good",
                                                "surface": "TURF",
                                                "handicap": false,
                                                "runners": 13,
                                                "result_available": true
                                            },
                                            {
                                                "race_id": "rc_ny78pgj5",
                                                "meeting_id": "mt_yzs5rm2b",
                                                "course": "Abu Dhabi",
                                                "time": "14:00",
                                                "off_time": "14:02:58",
                                                "name": "Race 3 - Al Maqam Classic Maiden Stakes",
                                                "run_type": "Flat",
                                                "class": null,
                                                "distance": "1m 3f",
                                                "going": "Good",
                                                "surface": "TURF",
                                                "handicap": false,
                                                "runners": 15,
                                                "result_available": true
                                            }
                                        ]
                                    },
                                    "meta": {
                                        "request_id": "f9641ec4a5704e10",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:05:06+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/meeting"
                }
            }
        },
        "/v1/racecards/today": {
            "get": {
                "operationId": "racecards_today",
                "summary": "Today's UK racecards",
                "description": "Today's UK cards, grouped by meeting. Plans: Live, Archive and Complete.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [
                    {
                        "name": "course",
                        "in": "query",
                        "required": false,
                        "description": "Only this course's meeting. Course ids come from GET /v1/courses.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "meeting_id": "mt_e6gdvcan",
                                            "course_id": "cr_m5cvpetc",
                                            "course": "Down Royal",
                                            "country": "Nort",
                                            "region": "NIR",
                                            "date": "2026-10-30",
                                            "going": "Yielding",
                                            "surface": "TURF",
                                            "races": [
                                                {
                                                    "race_id": "rc_2drzxxqn",
                                                    "meeting_id": "mt_e6gdvcan",
                                                    "course": "Down Royal",
                                                    "time": "13:00",
                                                    "off_time": null,
                                                    "name": "Irish Stallion Farms EBF Maiden Hurdle",
                                                    "run_type": null,
                                                    "class": null,
                                                    "distance": "2m 6f 110y",
                                                    "going": "Yielding",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 11,
                                                    "result_available": false
                                                },
                                                {
                                                    "race_id": "rc_tq45xw2w",
                                                    "meeting_id": "mt_e6gdvcan",
                                                    "course": "Down Royal",
                                                    "time": "13:30",
                                                    "off_time": null,
                                                    "name": "Eventsec Handicap Hurdle (0-100)",
                                                    "run_type": null,
                                                    "class": null,
                                                    "distance": "3m 45y",
                                                    "going": "Yielding",
                                                    "surface": "TURF",
                                                    "handicap": true,
                                                    "runners": 23,
                                                    "result_available": false
                                                },
                                                {
                                                    "race_id": "rc_97we86jg",
                                                    "meeting_id": "mt_e6gdvcan",
                                                    "course": "Down Royal",
                                                    "time": "14:00",
                                                    "off_time": null,
                                                    "name": "Irish Stallion Farms EBF Feathard Lady Mares Novice Hurdle (Grade 3)",
                                                    "run_type": null,
                                                    "class": "1",
                                                    "distance": "2m 190y",
                                                    "going": "Yielding",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 9,
                                                    "result_available": false
                                                }
                                            ]
                                        },
                                        {
                                            "meeting_id": "mt_27reay5r",
                                            "course_id": "cr_xtryzmdd",
                                            "course": "Newcastle",
                                            "country": "ENG",
                                            "region": "GB",
                                            "date": "2026-10-30",
                                            "going": "Standard",
                                            "surface": "ALLWEATHER",
                                            "races": [
                                                {
                                                    "race_id": "rc_jnae42nn",
                                                    "meeting_id": "mt_27reay5r",
                                                    "course": "Newcastle",
                                                    "time": "16:15",
                                                    "off_time": null,
                                                    "name": "Midnite: Built For 2026 Not 2006 Handicap",
                                                    "run_type": null,
                                                    "class": "6",
                                                    "distance": "1m 2f 42y",
                                                    "going": "Standard",
                                                    "surface": "ALLWEATHER",
                                                    "handicap": true,
                                                    "runners": 14,
                                                    "result_available": false
                                                },
                                                {
                                                    "race_id": "rc_385jyvxh",
                                                    "meeting_id": "mt_27reay5r",
                                                    "course": "Newcastle",
                                                    "time": "16:45",
                                                    "off_time": null,
                                                    "name": "All-Weather Championship Is Back Novice Stakes (GBB Race)",
                                                    "run_type": null,
                                                    "class": "4",
                                                    "distance": "7f 14y",
                                                    "going": "Standard",
                                                    "surface": "ALLWEATHER",
                                                    "handicap": false,
                                                    "runners": 10,
                                                    "result_available": false
                                                },
                                                {
                                                    "race_id": "rc_jxnrpja3",
                                                    "meeting_id": "mt_27reay5r",
                                                    "course": "Newcastle",
                                                    "time": "17:15",
                                                    "off_time": null,
                                                    "name": "AWC Finals Day At Newcastle 26th March Nursery",
                                                    "run_type": null,
                                                    "class": "5",
                                                    "distance": "1m 5y",
                                                    "going": "Standard",
                                                    "surface": "ALLWEATHER",
                                                    "handicap": true,
                                                    "runners": 5,
                                                    "result_available": false
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "05ff65a232f7aef7",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:14:03+00:00",
                                        "count": 5
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/racecards-today"
                }
            }
        },
        "/v1/racecards/upcoming": {
            "get": {
                "operationId": "racecards_upcoming",
                "summary": "Upcoming racecards",
                "description": "Declarations for the next few days. Plans: Live, Archive and Complete.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "description": "How many days ahead, 1 to 7. Today and tomorrow when left out.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 2
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "race_id": "rc_p0n4gn9t",
                                            "meeting_id": "mt_8fbc2mcy",
                                            "course": "Charles Town",
                                            "time": "00:02",
                                            "off_time": null,
                                            "name": "Race 3 - Maiden Claiming",
                                            "run_type": null,
                                            "class": null,
                                            "distance": "4f 110y",
                                            "going": null,
                                            "surface": "DIRT",
                                            "handicap": false,
                                            "runners": 8,
                                            "result_available": false,
                                            "date": "2026-10-30"
                                        },
                                        {
                                            "race_id": "rc_2pxrgadc",
                                            "meeting_id": "mt_dfs6rek9",
                                            "course": "Penn National",
                                            "time": "00:10",
                                            "off_time": null,
                                            "name": "Race 6 - Claiming",
                                            "run_type": null,
                                            "class": null,
                                            "distance": "1m 70y",
                                            "going": null,
                                            "surface": "DIRT",
                                            "handicap": false,
                                            "runners": 6,
                                            "result_available": false,
                                            "date": "2026-10-30"
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "4c4926d9c4c93fd5",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:33:04+00:00",
                                        "count": 327
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/racecards-upcoming"
                }
            }
        },
        "/v1/racecards/{date}": {
            "get": {
                "operationId": "racecards_by_date",
                "summary": "Racecards for a date",
                "description": "The full UK card for any date. Plans: Every plan, free key included.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "required": true,
                        "description": "A UK racing day, YYYY-MM-DD, by the course's own clock.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "course",
                        "in": "query",
                        "required": false,
                        "description": "Only this course's meeting. Course ids come from GET /v1/courses.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "meeting_id": "mt_b5898ppq",
                                            "course_id": "cr_jqze1jjy",
                                            "course": "Bath",
                                            "country": "ENG",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Soft (Heavy in places)",
                                            "surface": "TURF",
                                            "races": [
                                                {
                                                    "race_id": "rc_c2v2dgjt",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "12:42",
                                                    "off_time": "12:44:22",
                                                    "name": "David Cole Memorial EBF Novice Stakes (GBB/GBBPlus Race) (Div 1)",
                                                    "run_type": "Flat",
                                                    "class": "3",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 12,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_dk34v84n",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "13:12",
                                                    "off_time": "13:15:53",
                                                    "name": "David Cole Memorial EBF Novice Stakes (GBB/GBBPlus Race) (Div 2)",
                                                    "run_type": "Flat",
                                                    "class": "3",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 11,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_j4rqb8cc",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "13:42",
                                                    "off_time": "13:45:03",
                                                    "name": "Bath Luxury Toilet Hire Nursery",
                                                    "run_type": "Flat",
                                                    "class": "6",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": true,
                                                    "runners": 8,
                                                    "result_available": true
                                                }
                                            ]
                                        },
                                        {
                                            "meeting_id": "mt_rc6bwdyr",
                                            "course_id": "cr_7vbqtcfg",
                                            "course": "Ffos Las",
                                            "country": "Wale",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Heavy (Soft in places)",
                                            "surface": "TURF",
                                            "races": [
                                                {
                                                    "race_id": "rc_tkpw2q6x",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "13:30",
                                                    "off_time": "13:30:34",
                                                    "name": "bettingsites.co.uk Maiden Hurdle (GBB Race)",
                                                    "run_type": "Hurdle",
                                                    "class": "4",
                                                    "distance": "2m 4f",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 13,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_xqhxz6j1",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "14:00",
                                                    "off_time": "14:00:28",
                                                    "name": "Dandara Maiden Hurdle (GBB Race)",
                                                    "run_type": "Hurdle",
                                                    "class": "4",
                                                    "distance": "1m 7f 182y",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 10,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_zq7h6pfn",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "14:30",
                                                    "off_time": "14:31:05",
                                                    "name": "bettingsites.co.uk Handicap Hurdle",
                                                    "run_type": "Hurdle",
                                                    "class": "5",
                                                    "distance": "2m 4f",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": true,
                                                    "runners": 6,
                                                    "result_available": true
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "1ab14028c32b5422",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:05:06+00:00",
                                        "count": 4
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/racecards-by-date"
                }
            }
        },
        "/v1/results/latest": {
            "get": {
                "operationId": "results_latest",
                "summary": "Latest results",
                "description": "The latest settled UK races your plan can read. Plans: Every plan, free key included.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "race_id": "rc_s5e9rgr6",
                                            "meeting_id": "mt_24p8en3d",
                                            "course": "Newmarket",
                                            "time": "12:05",
                                            "off_time": "12:05:57",
                                            "name": "German G1 Racecourses Thank World Pool British EBF Novice Stakes (C & G) (Div 1)",
                                            "run_type": null,
                                            "class": "3",
                                            "distance": "7f",
                                            "going": "Good to Soft",
                                            "surface": "TURF",
                                            "handicap": false,
                                            "runners": 12,
                                            "result_available": true,
                                            "date": "2026-10-30",
                                            "winning_time": "1m 26.21s",
                                            "book_percentage": 122.14
                                        },
                                        {
                                            "race_id": "rc_syd1hjrz",
                                            "meeting_id": "mt_b05v6sym",
                                            "course": "Lyon-Parilly",
                                            "time": "11:50",
                                            "off_time": "11:53:48",
                                            "name": "Prix De Lacroix-laval Handicap",
                                            "run_type": null,
                                            "class": "3",
                                            "distance": "1m 3f 204y",
                                            "going": "Very Soft",
                                            "surface": "TURF",
                                            "handicap": true,
                                            "runners": 9,
                                            "result_available": true,
                                            "date": "2026-10-30",
                                            "winning_time": null,
                                            "book_percentage": 126.96
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "3e33473236a03abd",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T12:41:32+00:00",
                                        "count": 5
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/results-latest"
                }
            }
        },
        "/v1/results/yesterday": {
            "get": {
                "operationId": "results_yesterday",
                "summary": "Yesterday's results",
                "description": "Every settled UK race from yesterday. Plans: Every plan, free key included.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "meeting_id": "mt_b5898ppq",
                                            "course_id": "cr_jqze1jjy",
                                            "course": "Bath",
                                            "country": "ENG",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Soft (Heavy in places)",
                                            "surface": "TURF",
                                            "races": [
                                                {
                                                    "race_id": "rc_c2v2dgjt",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "12:42",
                                                    "off_time": "12:44:22",
                                                    "name": "David Cole Memorial EBF Novice Stakes (GBB/GBBPlus Race) (Div 1)",
                                                    "run_type": "Flat",
                                                    "class": "3",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 12,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_dk34v84n",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "13:12",
                                                    "off_time": "13:15:53",
                                                    "name": "David Cole Memorial EBF Novice Stakes (GBB/GBBPlus Race) (Div 2)",
                                                    "run_type": "Flat",
                                                    "class": "3",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 11,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_j4rqb8cc",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "13:42",
                                                    "off_time": "13:45:03",
                                                    "name": "Bath Luxury Toilet Hire Nursery",
                                                    "run_type": "Flat",
                                                    "class": "6",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": true,
                                                    "runners": 8,
                                                    "result_available": true
                                                }
                                            ]
                                        },
                                        {
                                            "meeting_id": "mt_rc6bwdyr",
                                            "course_id": "cr_7vbqtcfg",
                                            "course": "Ffos Las",
                                            "country": "Wale",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Heavy (Soft in places)",
                                            "surface": "TURF",
                                            "races": [
                                                {
                                                    "race_id": "rc_tkpw2q6x",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "13:30",
                                                    "off_time": "13:30:34",
                                                    "name": "bettingsites.co.uk Maiden Hurdle (GBB Race)",
                                                    "run_type": "Hurdle",
                                                    "class": "4",
                                                    "distance": "2m 4f",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 13,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_xqhxz6j1",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "14:00",
                                                    "off_time": "14:00:28",
                                                    "name": "Dandara Maiden Hurdle (GBB Race)",
                                                    "run_type": "Hurdle",
                                                    "class": "4",
                                                    "distance": "1m 7f 182y",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 10,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_zq7h6pfn",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "14:30",
                                                    "off_time": "14:31:05",
                                                    "name": "bettingsites.co.uk Handicap Hurdle",
                                                    "run_type": "Hurdle",
                                                    "class": "5",
                                                    "distance": "2m 4f",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": true,
                                                    "runners": 6,
                                                    "result_available": true
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "3fc5b745f31684fb",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T04:03:33+00:00",
                                        "count": 4
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/results-yesterday"
                }
            }
        },
        "/v1/results/{date}": {
            "get": {
                "operationId": "results_by_date",
                "summary": "Results for a date",
                "description": "Settled UK races for a date. Plans: Every plan, free key included.",
                "tags": [
                    "Cards and results"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "path",
                        "required": true,
                        "description": "A UK racing day, YYYY-MM-DD, by the course's own clock.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "meeting_id": "mt_b5898ppq",
                                            "course_id": "cr_jqze1jjy",
                                            "course": "Bath",
                                            "country": "ENG",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Soft (Heavy in places)",
                                            "surface": "TURF",
                                            "races": [
                                                {
                                                    "race_id": "rc_c2v2dgjt",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "12:42",
                                                    "off_time": "12:44:22",
                                                    "name": "David Cole Memorial EBF Novice Stakes (GBB/GBBPlus Race) (Div 1)",
                                                    "run_type": "Flat",
                                                    "class": "3",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 12,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_dk34v84n",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "13:12",
                                                    "off_time": "13:15:53",
                                                    "name": "David Cole Memorial EBF Novice Stakes (GBB/GBBPlus Race) (Div 2)",
                                                    "run_type": "Flat",
                                                    "class": "3",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 11,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_j4rqb8cc",
                                                    "meeting_id": "mt_b5898ppq",
                                                    "course": "Bath",
                                                    "time": "13:42",
                                                    "off_time": "13:45:03",
                                                    "name": "Bath Luxury Toilet Hire Nursery",
                                                    "run_type": "Flat",
                                                    "class": "6",
                                                    "distance": "1m",
                                                    "going": "Soft (Heavy in places)",
                                                    "surface": "TURF",
                                                    "handicap": true,
                                                    "runners": 8,
                                                    "result_available": true
                                                }
                                            ]
                                        },
                                        {
                                            "meeting_id": "mt_rc6bwdyr",
                                            "course_id": "cr_7vbqtcfg",
                                            "course": "Ffos Las",
                                            "country": "Wale",
                                            "region": "GB",
                                            "date": "2026-10-29",
                                            "going": "Heavy (Soft in places)",
                                            "surface": "TURF",
                                            "races": [
                                                {
                                                    "race_id": "rc_tkpw2q6x",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "13:30",
                                                    "off_time": "13:30:34",
                                                    "name": "bettingsites.co.uk Maiden Hurdle (GBB Race)",
                                                    "run_type": "Hurdle",
                                                    "class": "4",
                                                    "distance": "2m 4f",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 13,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_xqhxz6j1",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "14:00",
                                                    "off_time": "14:00:28",
                                                    "name": "Dandara Maiden Hurdle (GBB Race)",
                                                    "run_type": "Hurdle",
                                                    "class": "4",
                                                    "distance": "1m 7f 182y",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": false,
                                                    "runners": 10,
                                                    "result_available": true
                                                },
                                                {
                                                    "race_id": "rc_zq7h6pfn",
                                                    "meeting_id": "mt_rc6bwdyr",
                                                    "course": "Ffos Las",
                                                    "time": "14:30",
                                                    "off_time": "14:31:05",
                                                    "name": "bettingsites.co.uk Handicap Hurdle",
                                                    "run_type": "Hurdle",
                                                    "class": "5",
                                                    "distance": "2m 4f",
                                                    "going": "Heavy (Soft in places)",
                                                    "surface": "TURF",
                                                    "handicap": true,
                                                    "runners": 6,
                                                    "result_available": true
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "ff837b43678eb0a7",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:27:04+00:00",
                                        "count": 4
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/results-by-date"
                }
            }
        },
        "/v1/races/search": {
            "get": {
                "operationId": "races_search",
                "summary": "Search races",
                "description": "UK races by date, course, type, going, class and field size. Plans: Live, Archive and Complete.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "date_from",
                        "in": "query",
                        "required": false,
                        "description": "From this UK day, YYYY-MM-DD. Held to your plan's window; meta.searched says what was used.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "required": false,
                        "description": "To this UK day, YYYY-MM-DD. Held to your plan's window.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "course_id",
                        "in": "query",
                        "required": false,
                        "description": "Our id for the course, as other answers give it (cr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "run_type",
                        "in": "query",
                        "required": false,
                        "description": "The kind of race.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "Flat",
                                "Hurdle",
                                "Chase",
                                "NH Flat"
                            ]
                        }
                    },
                    {
                        "name": "class",
                        "in": "query",
                        "required": false,
                        "description": "The race class as published, for example Class 4.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "going",
                        "in": "query",
                        "required": false,
                        "description": "The going as published, matched exactly, for example Good to Soft.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "surface",
                        "in": "query",
                        "required": false,
                        "description": "Turf, or the all-weather surface by name, for example Polytrack or Tapeta.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "handicap",
                        "in": "query",
                        "required": false,
                        "description": "true for handicaps only, false for everything else.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "min_runners",
                        "in": "query",
                        "required": false,
                        "description": "Races with at least this many runners.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "max_runners",
                        "in": "query",
                        "required": false,
                        "description": "Races with at most this many runners.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "result_available",
                        "in": "query",
                        "required": false,
                        "description": "true for settled races only.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 200.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 50
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "race_id": "rc_676s9p1h",
                                            "meeting_id": "mt_4wycegh0",
                                            "course": "Stratford",
                                            "time": "13:50",
                                            "off_time": "13:51:40",
                                            "name": "EBF And Charlie Longsdon Racing 'National Hunt' Novices' Hurdle (GBB Race) (Div 1)",
                                            "run_type": "Hurdle",
                                            "class": "4",
                                            "distance": "2m 70y",
                                            "going": "Good to Soft (Soft in places)",
                                            "surface": "TURF",
                                            "handicap": false,
                                            "runners": 10,
                                            "result_available": true,
                                            "date": "2026-10-29"
                                        },
                                        {
                                            "race_id": "rc_rcq05g1h",
                                            "meeting_id": "mt_4wycegh0",
                                            "course": "Stratford",
                                            "time": "14:20",
                                            "off_time": "14:20:54",
                                            "name": "EBF And Charlie Longsdon Racing 'National Hunt' Novices' Hurdle (GBB Race) (Div 2)",
                                            "run_type": "Hurdle",
                                            "class": "4",
                                            "distance": "2m 70y",
                                            "going": "Good to Soft (Soft in places)",
                                            "surface": "TURF",
                                            "handicap": false,
                                            "runners": 10,
                                            "result_available": true,
                                            "date": "2026-10-29"
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "298eb4c0af1cf035",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T12:46:35+00:00",
                                        "count": 5
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/races-search"
                }
            }
        },
        "/v1/races/{race_id}": {
            "get": {
                "operationId": "race",
                "summary": "One race",
                "description": "One race: conditions, the market and every runner. Plans: Every plan, free key included.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "race_id": "rc_0aa1c4st",
                                        "meeting_id": "mt_yzs5rm2b",
                                        "course_id": "cr_239y20yw",
                                        "course": "Abu Dhabi",
                                        "country": "UAE",
                                        "region": "UAE",
                                        "date": "2026-10-29",
                                        "time": "13:00",
                                        "off_time": "13:01:21",
                                        "name": "Race 1 - Al Ghadeer Handicap",
                                        "run_type": "Flat",
                                        "class": null,
                                        "age": "3YO plus",
                                        "distance": "6f",
                                        "going": "Good",
                                        "surface": "TURF",
                                        "handicap": true,
                                        "winning_time": "1m 16.55s",
                                        "book_percentage": 133.36,
                                        "runners": [
                                            {
                                                "cloth": 6,
                                                "draw": 4,
                                                "horse_id": "hs_x73ps4xh",
                                                "horse": "Af Saqara",
                                                "age": 5,
                                                "weight": "8-11",
                                                "official_rating": null,
                                                "form": "11-30",
                                                "headgear": "Blinkers",
                                                "owner": "Khalid Khalifa Al Nabooda",
                                                "owner_id": "ow_neh55z1b",
                                                "trainer_id": "tr_j3qtz590",
                                                "trainer": "Ernst Oertel",
                                                "jockey_id": "jk_xr618k8m",
                                                "jockey": "Bernardo Pinheiro",
                                                "silk": "Black, white star, black sleeves, white cap",
                                                "sp": "7/1",
                                                "sp_decimal": 8,
                                                "price_path": {
                                                    "opening": null,
                                                    "opening_decimal": null,
                                                    "touched": null,
                                                    "sp": "7/1",
                                                    "sp_decimal": 8,
                                                    "drift": null,
                                                    "source": "starting_price_only"
                                                },
                                                "favourite": false,
                                                "market_position": 3,
                                                "position": 1,
                                                "beaten_distance": null,
                                                "casualty": null,
                                                "run_status": "ran",
                                                "last_run_days": 201,
                                                "speed_figure": null,
                                                "breeding": null,
                                                "handicap_mark": null
                                            },
                                            {
                                                "cloth": 11,
                                                "draw": 7,
                                                "horse_id": "hs_des8z34q",
                                                "horse": "Af Marmuq",
                                                "age": 8,
                                                "weight": "8-6",
                                                "official_rating": null,
                                                "form": "011506",
                                                "headgear": null,
                                                "owner": "Khalid Khalifa Al Nabooda",
                                                "owner_id": "ow_neh55z1b",
                                                "trainer_id": "tr_j3qtz590",
                                                "trainer": "Ernst Oertel",
                                                "jockey_id": "jk_bvfc3660",
                                                "jockey": "M Rodrigues",
                                                "silk": "Black, white star, black sleeves, blue cap",
                                                "sp": "10/1",
                                                "sp_decimal": 11,
                                                "price_path": {
                                                    "opening": null,
                                                    "opening_decimal": null,
                                                    "touched": null,
                                                    "sp": "10/1",
                                                    "sp_decimal": 11,
                                                    "drift": null,
                                                    "source": "starting_price_only"
                                                },
                                                "favourite": false,
                                                "market_position": 7,
                                                "position": 2,
                                                "beaten_distance": "3/4 length",
                                                "casualty": null,
                                                "run_status": "ran",
                                                "last_run_days": 208,
                                                "speed_figure": null,
                                                "breeding": null,
                                                "handicap_mark": null
                                            },
                                            {
                                                "cloth": 5,
                                                "draw": 8,
                                                "horse_id": "hs_5nzbfr73",
                                                "horse": "Ezzah",
                                                "age": 4,
                                                "weight": "8-13",
                                                "official_rating": null,
                                                "form": "15",
                                                "headgear": null,
                                                "owner": "Royal Cavalry Oman",
                                                "owner_id": "ow_2d8nknyk",
                                                "trainer_id": "tr_t473p4q2",
                                                "trainer": "I Hadhrami",
                                                "jockey_id": "jk_yrn5hzfm",
                                                "jockey": "Ray Dawson",
                                                "silk": "Yellow, green stripe, red sleeves, red cap",
                                                "sp": "8/1",
                                                "sp_decimal": 9,
                                                "price_path": {
                                                    "opening": null,
                                                    "opening_decimal": null,
                                                    "touched": null,
                                                    "sp": "8/1",
                                                    "sp_decimal": 9,
                                                    "drift": null,
                                                    "source": "starting_price_only"
                                                },
                                                "favourite": false,
                                                "market_position": 4,
                                                "position": 3,
                                                "beaten_distance": "1 3/4 length",
                                                "casualty": null,
                                                "run_status": "ran",
                                                "last_run_days": 201,
                                                "speed_figure": null,
                                                "breeding": null,
                                                "handicap_mark": null
                                            }
                                        ],
                                        "placed": 3,
                                        "stage": "WEIGHEDIN",
                                        "result_available": true,
                                        "weather": null,
                                        "class_figure": null,
                                        "speed_figure": null
                                    },
                                    "meta": {
                                        "request_id": "1c558294fbb3ce0b",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T10:58:35+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race"
                }
            }
        },
        "/v1/races/{race_id}/runners": {
            "get": {
                "operationId": "race_runners",
                "summary": "A race's runners",
                "description": "The field alone. Plans: Every plan, free key included.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "cloth": 6,
                                            "draw": 4,
                                            "horse_id": "hs_x73ps4xh",
                                            "horse": "Af Saqara",
                                            "age": 5,
                                            "weight": "8-11",
                                            "official_rating": null,
                                            "form": "11-30",
                                            "headgear": "Blinkers",
                                            "owner": "Khalid Khalifa Al Nabooda",
                                            "owner_id": "ow_neh55z1b",
                                            "trainer_id": "tr_j3qtz590",
                                            "trainer": "Ernst Oertel",
                                            "jockey_id": "jk_xr618k8m",
                                            "jockey": "Bernardo Pinheiro",
                                            "silk": "Black, white star, black sleeves, white cap",
                                            "sp": "7/1",
                                            "sp_decimal": 8,
                                            "price_path": {
                                                "opening": null,
                                                "opening_decimal": null,
                                                "touched": null,
                                                "sp": "7/1",
                                                "sp_decimal": 8,
                                                "drift": null,
                                                "source": "starting_price_only"
                                            },
                                            "favourite": false,
                                            "market_position": 3,
                                            "position": 1,
                                            "beaten_distance": null,
                                            "casualty": null,
                                            "run_status": "ran",
                                            "last_run_days": 201,
                                            "speed_figure": null,
                                            "breeding": null,
                                            "handicap_mark": null
                                        },
                                        {
                                            "cloth": 11,
                                            "draw": 7,
                                            "horse_id": "hs_des8z34q",
                                            "horse": "Af Marmuq",
                                            "age": 8,
                                            "weight": "8-6",
                                            "official_rating": null,
                                            "form": "011506",
                                            "headgear": null,
                                            "owner": "Khalid Khalifa Al Nabooda",
                                            "owner_id": "ow_neh55z1b",
                                            "trainer_id": "tr_j3qtz590",
                                            "trainer": "Ernst Oertel",
                                            "jockey_id": "jk_bvfc3660",
                                            "jockey": "M Rodrigues",
                                            "silk": "Black, white star, black sleeves, blue cap",
                                            "sp": "10/1",
                                            "sp_decimal": 11,
                                            "price_path": {
                                                "opening": null,
                                                "opening_decimal": null,
                                                "touched": null,
                                                "sp": "10/1",
                                                "sp_decimal": 11,
                                                "drift": null,
                                                "source": "starting_price_only"
                                            },
                                            "favourite": false,
                                            "market_position": 7,
                                            "position": 2,
                                            "beaten_distance": "3/4 length",
                                            "casualty": null,
                                            "run_status": "ran",
                                            "last_run_days": 208,
                                            "speed_figure": null,
                                            "breeding": null,
                                            "handicap_mark": null
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "84ef039c0c69f830",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:11:03+00:00",
                                        "count": 12
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race-runners"
                }
            }
        },
        "/v1/races/{race_id}/result": {
            "get": {
                "operationId": "race_result",
                "summary": "A race's result",
                "description": "Finishing order, casualties, dividends and prize money. Plans: Every plan, free key included.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "race_id": "rc_0aa1c4st",
                                        "course": "Abu Dhabi",
                                        "date": "2026-10-29",
                                        "off_time": "13:01:21",
                                        "winning_time": "1m 16.55s",
                                        "weather": null,
                                        "class_figure": null,
                                        "speed_figure": null,
                                        "book_percentage": 133.36,
                                        "placed": 3,
                                        "dividends": {
                                            "currency": "AED",
                                            "straight_forecast": 85.59
                                        },
                                        "prizes": [
                                            {
                                                "position": 1,
                                                "prize": 39601
                                            },
                                            {
                                                "position": 2,
                                                "prize": 13202
                                            },
                                            {
                                                "position": 3,
                                                "prize": 7259
                                            }
                                        ],
                                        "result": [
                                            {
                                                "position": 1,
                                                "cloth": 6,
                                                "horse_id": "hs_x73ps4xh",
                                                "horse": "Af Saqara",
                                                "sp": "7/1",
                                                "sp_decimal": 8,
                                                "beaten_distance": null,
                                                "casualty": null,
                                                "run_status": "ran",
                                                "speed_figure": null,
                                                "jockey": "Bernardo Pinheiro",
                                                "trainer": "Ernst Oertel"
                                            },
                                            {
                                                "position": 2,
                                                "cloth": 11,
                                                "horse_id": "hs_des8z34q",
                                                "horse": "Af Marmuq",
                                                "sp": "10/1",
                                                "sp_decimal": 11,
                                                "beaten_distance": "3/4 length",
                                                "casualty": null,
                                                "run_status": "ran",
                                                "speed_figure": null,
                                                "jockey": "M Rodrigues",
                                                "trainer": "Ernst Oertel"
                                            },
                                            {
                                                "position": 3,
                                                "cloth": 5,
                                                "horse_id": "hs_5nzbfr73",
                                                "horse": "Ezzah",
                                                "sp": "8/1",
                                                "sp_decimal": 9,
                                                "beaten_distance": "1 3/4 length",
                                                "casualty": null,
                                                "run_status": "ran",
                                                "speed_figure": null,
                                                "jockey": "Ray Dawson",
                                                "trainer": "I Hadhrami"
                                            }
                                        ],
                                        "unplaced": [
                                            {
                                                "position": null,
                                                "cloth": 12,
                                                "horse_id": "hs_n11js1na",
                                                "horse": "Khattaf Wrsan",
                                                "sp": "25/1",
                                                "sp_decimal": 26,
                                                "beaten_distance": null,
                                                "casualty": null,
                                                "run_status": "non_runner",
                                                "speed_figure": null,
                                                "jockey": "Non Runner",
                                                "trainer": "J Salman"
                                            }
                                        ]
                                    },
                                    "meta": {
                                        "request_id": "1882fec20696a4c6",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:05:06+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race-result"
                }
            }
        },
        "/v1/races/{race_id}/market": {
            "get": {
                "operationId": "race_market",
                "summary": "A race's market",
                "description": "Book percentage, every price and what moved. Plans: Live, Archive and Complete.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "race_id": "rc_0aa1c4st",
                                        "book_percentage": 133.36,
                                        "runners": [
                                            {
                                                "horse_id": "hs_x73ps4xh",
                                                "horse": "Af Saqara",
                                                "sp": "7/1",
                                                "sp_decimal": 8,
                                                "implied": 0.125,
                                                "price_path": {
                                                    "opening": null,
                                                    "opening_decimal": null,
                                                    "touched": null,
                                                    "sp": "7/1",
                                                    "sp_decimal": 8,
                                                    "drift": null,
                                                    "source": "starting_price_only"
                                                },
                                                "favourite": false,
                                                "market_position": 3,
                                                "exchange": null,
                                                "tote_final": null
                                            },
                                            {
                                                "horse_id": "hs_des8z34q",
                                                "horse": "Af Marmuq",
                                                "sp": "10/1",
                                                "sp_decimal": 11,
                                                "implied": 0.0909,
                                                "price_path": {
                                                    "opening": null,
                                                    "opening_decimal": null,
                                                    "touched": null,
                                                    "sp": "10/1",
                                                    "sp_decimal": 11,
                                                    "drift": null,
                                                    "source": "starting_price_only"
                                                },
                                                "favourite": false,
                                                "market_position": 7,
                                                "exchange": null,
                                                "tote_final": null
                                            },
                                            {
                                                "horse_id": "hs_5nzbfr73",
                                                "horse": "Ezzah",
                                                "sp": "8/1",
                                                "sp_decimal": 9,
                                                "implied": 0.1111,
                                                "price_path": {
                                                    "opening": null,
                                                    "opening_decimal": null,
                                                    "touched": null,
                                                    "sp": "8/1",
                                                    "sp_decimal": 9,
                                                    "drift": null,
                                                    "source": "starting_price_only"
                                                },
                                                "favourite": false,
                                                "market_position": 4,
                                                "exchange": null,
                                                "tote_final": null
                                            }
                                        ]
                                    },
                                    "meta": {
                                        "request_id": "24c90f9ffc95cc5e",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T08:11:33+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race-market"
                }
            }
        },
        "/v1/races/{race_id}/dividends": {
            "get": {
                "operationId": "race_dividends",
                "summary": "A race's dividends",
                "description": "Tote returns and prizes. Plans: Live, Archive and Complete.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "race_id": "rc_0aa1c4st",
                                        "course": "Abu Dhabi",
                                        "date": "2026-10-29",
                                        "dividends": {
                                            "currency": "AED",
                                            "straight_forecast": 85.59
                                        },
                                        "prizes": [
                                            {
                                                "position": 1,
                                                "prize": 39601
                                            },
                                            {
                                                "position": 2,
                                                "prize": 13202
                                            },
                                            {
                                                "position": 3,
                                                "prize": 7259
                                            }
                                        ]
                                    },
                                    "meta": {
                                        "request_id": "a0fec08b23811581",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T12:04:04+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race-dividends"
                }
            }
        },
        "/v1/races/{race_id}/analysis": {
            "get": {
                "operationId": "race_analysis",
                "summary": "A race's analysis",
                "description": "Market shape and what the course and distance usually produce. Plans: Live, Archive and Complete.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "race_id": "rc_0aa1c4st",
                                        "course": "Abu Dhabi",
                                        "date": "2026-10-29",
                                        "conditions": {
                                            "run_type": "Flat",
                                            "distance": "6f",
                                            "going": "Good",
                                            "surface": "TURF",
                                            "class": null,
                                            "handicap": true,
                                            "runners": 12
                                        },
                                        "market": {
                                            "book_percentage": 133.36,
                                            "shape": {
                                                "shortest": 2.75,
                                                "longest": 26,
                                                "median": 10.25,
                                                "spread": 9.5,
                                                "priced": 12
                                            },
                                            "favourites": [
                                                {
                                                    "horse_id": "hs_ngjpqrbn",
                                                    "horse": "Es Khairiyah",
                                                    "sp": "7/4",
                                                    "position": 4
                                                }
                                            ],
                                            "movers": []
                                        },
                                        "at_this_course_and_distance": {
                                            "races": 4,
                                            "typical_field": 12.8,
                                            "typical_book": 134.7,
                                            "favourite_runs": 4,
                                            "favourite_wins": 1,
                                            "favourite_strike": 0.25
                                        },
                                        "note": "Context for one race. For statistics across the archive see /v1/analysis/angles and the course endpoints."
                                    },
                                    "meta": {
                                        "request_id": "8c77b0ee699154b5",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T09:35:33+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race-analysis"
                }
            }
        },
        "/v1/upsets": {
            "get": {
                "operationId": "upsets",
                "summary": "The day's upsets",
                "description": "The day's UK shocks, scored 0 to 100. Plans: Every plan, free key included.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "A UK racing day, YYYY-MM-DD. Leave it out for the latest settled day.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [],
                                    "meta": {
                                        "request_id": "7cdcf0e3ff5e5615",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T10:59:03+00:00",
                                        "count": 0
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/upsets"
                }
            }
        },
        "/v1/upsets/{race_id}": {
            "get": {
                "operationId": "race_upset",
                "summary": "One race's upset score",
                "description": "One race judged by the upset rules. Plans: Every plan, free key included.",
                "tags": [
                    "Races and markets"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "race_id": "rc_0aa1c4st",
                                        "meeting_id": "mt_yzs5rm2b",
                                        "course_id": "cr_239y20yw",
                                        "course": "Abu Dhabi",
                                        "country": "UAE",
                                        "region": "UAE",
                                        "date": "2026-10-29",
                                        "off_time": "13:01:21",
                                        "name": "Race 1 - Al Ghadeer Handicap",
                                        "runners": 11,
                                        "is_upset": false,
                                        "shock_score": 0,
                                        "why": [],
                                        "rules": [],
                                        "winner": {
                                            "horse_id": "hs_x73ps4xh",
                                            "horse": "Af Saqara",
                                            "jockey_id": "jk_xr618k8m",
                                            "jockey": "Bernardo Pinheiro",
                                            "trainer_id": "tr_j3qtz590",
                                            "trainer": "Ernst Oertel"
                                        },
                                        "winner_price": {
                                            "price": "7/1",
                                            "decimal": 8,
                                            "source": "sp"
                                        },
                                        "favourite": {
                                            "horse_id": "hs_ngjpqrbn",
                                            "horse": "Es Khairiyah",
                                            "position": 4
                                        },
                                        "favourite_price": {
                                            "price": "7/4",
                                            "decimal": 2.75
                                        },
                                        "rating_gap": null
                                    },
                                    "meta": {
                                        "request_id": "c12477664e18f0a6",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T09:26:03+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race-upset"
                }
            }
        },
        "/v1/reports": {
            "get": {
                "operationId": "reports_search",
                "summary": "Search race reports",
                "description": "Written UK race reports since 2020. Plans: Complete.",
                "tags": [
                    "Race reports"
                ],
                "parameters": [
                    {
                        "name": "date_from",
                        "in": "query",
                        "required": false,
                        "description": "From this UK day, YYYY-MM-DD. Held to your plan's window; meta.searched says what was used.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "required": false,
                        "description": "To this UK day, YYYY-MM-DD. Held to your plan's window.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "course_id",
                        "in": "query",
                        "required": false,
                        "description": "Our id for the course, as other answers give it (cr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 25
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [],
                                    "meta": {
                                        "request_id": "cffe99c91baff1e4",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T08:11:33+00:00",
                                        "count": 0
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/reports-search"
                }
            }
        },
        "/v1/reports/{race_id}": {
            "get": {
                "operationId": "race_report",
                "summary": "One race report",
                "description": "The written account of one race. Plans: Complete.",
                "tags": [
                    "Race reports"
                ],
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the race, as other answers give it (rc_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "race_id": "rc_0aa1c4st",
                                        "headline": "Af Saqara Won After 201 Days",
                                        "preview": "Es Khairiyah was the favourite at 7/4 in the 133.36% book, with a 26.5% fair chance, while Af Yartaad was second at 5/1. Af Saqara was third at 7/1 after 201 days off; Bassam Al Wathba and Sand Storm Aa had been away for 208 and 221 days respectively. Ernst Oertel had 1 winner from 18 runners in the previous fortnight.",
                                        "report": "Af Saqara returned to win at 7/1 after 201 days off; the market ranked him third and assigned him a 9.1% fair chance. Es Khairiyah, the 7/4 favourite with a 26.5% chance, finished fourth of 12. Af Marmuq was second at 10/1 and Ezzah third at 8/1. All 12 completed and no horse failed to complete, although Khattaf Wrsan has no recorded finishing position.",
                                        "runners": {
                                            "Es Khairiyah": "Es Khairiyah finished fourth of 12 at 7/4; the favourite had been assigned a 26.5% fair chance and was returning after 229 days off.",
                                            "Af Yartaad": "Af Yartaad, the 5/1 second favourite, finished 10th of 12 after 202 days away, with 0 wins from 1 start and 0 from 1 at Abu Dhabi.",
                                            "Af Saqara": "Af Saqara won at 7/1 from third in the betting, a 9.1% fair chance, on his return after 201 days off.",
                                            "Bassam Al Wathba": "Bassam Al Wathba finished eighth of 12 at 8/1, having had 208 days off and 0 wins from 3 starts beforehand.",
                                            "Ezzah": "Ezzah finished third of 12 at 8/1 and had been joint fourth in the betting before a 201-day absence.",
                                            "Sand Storm Aa": "Sand Storm Aa was sixth of 12 at 17/2, with 1 win from 6 starts and 221 days off beforehand.",
                                            "Magic Touch": "Magic Touch finished fifth of 12 at 10/1 after 208 days away, having gone off seventh in the betting with 0 wins from 2 starts.",
                                            "Af Marmuq": "Af Marmuq finished second of 12 at 10/1, having been seventh in the betting and returning after 208 days off.",
                                            "Marta De Faust": "Marta De Faust finished ninth of 12 at 14/1 after 202 days away, with 0 wins from 6 starts.",
                                            "Namrood": "Namrood finished 11th of 12 at 16/1, returning after 202 days with 1 win from 16 starts.",
                                            "Af Layth": "Af Layth was seventh of 12 at 22/1; before the off he had been away for 201 days and had 1 win from 14 starts.",
                                            "Khattaf Wrsan": "Khattaf Wrsan completed at 25/1 but has no recorded finishing position, having returned after 292 days off."
                                        },
                                        "written_at": "2026-10-29T14:35:51+00:00"
                                    },
                                    "meta": {
                                        "request_id": "226035530bb04961",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T10:49:04+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/race-report"
                }
            }
        },
        "/v1/search": {
            "get": {
                "operationId": "search",
                "summary": "Search everything",
                "description": "One lookup across horses, trainers, jockeys and courses. Plans: Live, Archive and Complete.",
                "tags": [
                    "Horses"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Part of a name, two letters or more.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Only one kind of record.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "horse",
                                "trainer",
                                "jockey",
                                "course"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, Results per type, 1 to 25.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "type": "horse",
                                            "horse_id": "hs_yct1s0c9",
                                            "name": "Star"
                                        },
                                        {
                                            "type": "horse",
                                            "horse_id": "hs_2da44y7h",
                                            "name": "Star"
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "025df39c24b14b1a",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T12:19:33+00:00",
                                        "count": 16
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/search"
                }
            }
        },
        "/v1/horses/search": {
            "get": {
                "operationId": "horses_search",
                "summary": "Search horses",
                "description": "Horses by name. Plans: Live, Archive and Complete.",
                "tags": [
                    "Horses"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Part of a name, two letters or more.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 25
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "horse_id": "hs_yct1s0c9",
                                            "name": "Star",
                                            "sex": "g",
                                            "colour": null,
                                            "career": {
                                                "runs": 2,
                                                "wins": 0,
                                                "seconds": 0,
                                                "thirds": 0,
                                                "casualties": 0,
                                                "win_pct": 0,
                                                "first_run": "2021-11-16",
                                                "last_run": "2021-12-20"
                                            }
                                        },
                                        {
                                            "horse_id": "hs_2da44y7h",
                                            "name": "Star",
                                            "sex": "g",
                                            "colour": "b",
                                            "career": {
                                                "runs": 5,
                                                "wins": 0,
                                                "seconds": 0,
                                                "thirds": 0,
                                                "casualties": 0,
                                                "win_pct": 0,
                                                "first_run": "2022-09-26",
                                                "last_run": "2023-06-09"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "540652b2feefd55f",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:26:32+00:00",
                                        "count": 5
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/horses-search"
                }
            }
        },
        "/v1/horses/compare": {
            "get": {
                "operationId": "horses_compare",
                "summary": "Compare horses",
                "description": "Every race two to five horses met in. Plans: Live, Archive and Complete.",
                "tags": [
                    "Horses"
                ],
                "parameters": [
                    {
                        "name": "ids",
                        "in": "query",
                        "required": false,
                        "description": "Two to five horse ids, comma separated.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/horses-compare"
                }
            }
        },
        "/v1/horses/{horse_id}": {
            "get": {
                "operationId": "horse",
                "summary": "One horse",
                "description": "A horse's record and breeding. Plans: Live, Archive and Complete.",
                "tags": [
                    "Horses"
                ],
                "parameters": [
                    {
                        "name": "horse_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the horse, as other answers give it (hs_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/horse"
                }
            }
        },
        "/v1/horses/{horse_id}/form": {
            "get": {
                "operationId": "horse_form",
                "summary": "A horse's form",
                "description": "A horse's UK runs, newest first. Plans: Live, Archive and Complete.",
                "tags": [
                    "Horses"
                ],
                "parameters": [
                    {
                        "name": "horse_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the horse, as other answers give it (hs_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 20
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/horse-form"
                }
            }
        },
        "/v1/horses/{horse_id}/pedigree": {
            "get": {
                "operationId": "horse_pedigree",
                "summary": "A horse's pedigree",
                "description": "Sire, dam, damsire and others by the sire. Plans: Live, Archive and Complete.",
                "tags": [
                    "Horses"
                ],
                "parameters": [
                    {
                        "name": "horse_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the horse, as other answers give it (hs_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/horse-pedigree"
                }
            }
        },
        "/v1/trainers/search": {
            "get": {
                "operationId": "trainers_search",
                "summary": "Search trainers",
                "description": "Trainers by name. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Part of a name, two letters or more.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 25
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "trainer_id": "tr_zjh5aqvh",
                                            "name": "King Leatherbury"
                                        },
                                        {
                                            "trainer_id": "tr_5mrcnmbb",
                                            "name": "Kingston"
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "ead33a190e731b4d",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T04:25:05+00:00",
                                        "count": 5
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/trainers-search"
                }
            }
        },
        "/v1/trainers/{trainer_id}": {
            "get": {
                "operationId": "trainer",
                "summary": "One trainer",
                "description": "A trainer's runners, wins and horses. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "trainer_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the trainer, as other answers give it (tr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/trainer"
                }
            }
        },
        "/v1/trainers/{trainer_id}/form": {
            "get": {
                "operationId": "trainer_form",
                "summary": "A trainer's form",
                "description": "A trainer's UK runners, newest first. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "trainer_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the trainer, as other answers give it (tr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 20
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/trainer-form"
                }
            }
        },
        "/v1/jockeys/search": {
            "get": {
                "operationId": "jockeys_search",
                "summary": "Search jockeys",
                "description": "Jockeys by name. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Part of a name, two letters or more.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 25
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "jockey_id": "jk_st6bzh4s",
                                            "name": "Andrew Moore"
                                        },
                                        {
                                            "jockey_id": "jk_6647p5pw",
                                            "name": "Andy Moore"
                                        }
                                    ],
                                    "meta": {
                                        "request_id": "2794656568b22f9c",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days",
                                        "data_as_of": "2026-10-30T11:23:03+00:00",
                                        "count": 5
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/jockeys-search"
                }
            }
        },
        "/v1/jockeys/{jockey_id}": {
            "get": {
                "operationId": "jockey",
                "summary": "One jockey",
                "description": "A jockey's rides and wins. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "jockey_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the jockey, as other answers give it (jk_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/jockey"
                }
            }
        },
        "/v1/jockeys/{jockey_id}/form": {
            "get": {
                "operationId": "jockey_form",
                "summary": "A jockey's form",
                "description": "A jockey's UK rides, newest first. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "jockey_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the jockey, as other answers give it (jk_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 20
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required or outside_plan_window",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/jockey-form"
                }
            }
        },
        "/v1/owners/search": {
            "get": {
                "operationId": "owners_search",
                "summary": "Search owners",
                "description": "Owners by name. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Part of a name, two letters or more.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many rows in one answer, 1 to 100.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 25
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "next_cursor from the previous answer, to read the next rows. Never build one.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/owners-search"
                }
            }
        },
        "/v1/owners/{owner_id}": {
            "get": {
                "operationId": "owner",
                "summary": "One owner",
                "description": "An owner's runners, trainers and horses. Plans: Live, Archive and Complete.",
                "tags": [
                    "Trainers, jockeys and owners"
                ],
                "parameters": [
                    {
                        "name": "owner_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the owner, as other answers give it (ow_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/owner"
                }
            }
        },
        "/v1/trainers/{trainer_id}/stats": {
            "get": {
                "operationId": "trainer_stats",
                "summary": "A trainer's statistics",
                "description": "Strike rate, A/E and level stakes, by any dimension. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "trainer_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the trainer, as other answers give it (tr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "by",
                        "in": "query",
                        "required": false,
                        "description": "How to split the figures. Leave it out for the totals.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "course",
                                "region",
                                "run_type",
                                "distance",
                                "going",
                                "surface",
                                "class",
                                "year",
                                "month",
                                "draw",
                                "field_size",
                                "layoff",
                                "sp_band",
                                "jockey",
                                "owner",
                                "sire"
                            ]
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/trainer-stats"
                }
            }
        },
        "/v1/trainers/{trainer_id}/courses": {
            "get": {
                "operationId": "trainer_courses",
                "summary": "A trainer by course",
                "description": "A trainer's record by UK course. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "trainer_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the trainer, as other answers give it (tr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/trainer-courses"
                }
            }
        },
        "/v1/trainers/{trainer_id}/jockeys": {
            "get": {
                "operationId": "trainer_jockeys",
                "summary": "A trainer's jockeys",
                "description": "Which riders have paid for the yard. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "trainer_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the trainer, as other answers give it (tr_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/trainer-jockeys"
                }
            }
        },
        "/v1/jockeys/{jockey_id}/stats": {
            "get": {
                "operationId": "jockey_stats",
                "summary": "A jockey's statistics",
                "description": "A jockey's strike rate and A/E, by any dimension. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "jockey_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the jockey, as other answers give it (jk_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "by",
                        "in": "query",
                        "required": false,
                        "description": "How to split the figures. Leave it out for the totals.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "course",
                                "region",
                                "run_type",
                                "distance",
                                "going",
                                "surface",
                                "class",
                                "year",
                                "month",
                                "draw",
                                "field_size",
                                "layoff",
                                "sp_band",
                                "trainer",
                                "owner",
                                "sire"
                            ]
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/jockey-stats"
                }
            }
        },
        "/v1/jockeys/{jockey_id}/trainers": {
            "get": {
                "operationId": "jockey_trainers",
                "summary": "A jockey's trainers",
                "description": "Which yards a rider does well for. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "jockey_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the jockey, as other answers give it (jk_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/jockey-trainers"
                }
            }
        },
        "/v1/owners/{owner_id}/stats": {
            "get": {
                "operationId": "owner_stats",
                "summary": "An owner's statistics",
                "description": "An owner's strike rate and A/E, by any dimension. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "owner_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the owner, as other answers give it (ow_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "by",
                        "in": "query",
                        "required": false,
                        "description": "How to split the figures. Leave it out for the totals.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "course",
                                "region",
                                "run_type",
                                "distance",
                                "going",
                                "surface",
                                "class",
                                "year",
                                "month",
                                "draw",
                                "field_size",
                                "layoff",
                                "sp_band",
                                "trainer",
                                "jockey",
                                "sire"
                            ]
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/owner-stats"
                }
            }
        },
        "/v1/owners/{owner_id}/courses": {
            "get": {
                "operationId": "owner_courses",
                "summary": "An owner by course",
                "description": "Where the colours have done well. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "owner_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the owner, as other answers give it (ow_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/owner-courses"
                }
            }
        },
        "/v1/owners/{owner_id}/jockeys": {
            "get": {
                "operationId": "owner_jockeys",
                "summary": "An owner's jockeys",
                "description": "Riders used, and how they paid. Plans: Complete.",
                "tags": [
                    "Statistics"
                ],
                "parameters": [
                    {
                        "name": "owner_id",
                        "in": "path",
                        "required": true,
                        "description": "Our id for the owner, as other answers give it (ow_ and eight characters).",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "min_runs",
                        "in": "query",
                        "required": false,
                        "description": "Only rows with at least this many runs. Thirty or more before you act on a figure.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/owner-jockeys"
                }
            }
        },
        "/v1/usage": {
            "get": {
                "operationId": "usage",
                "summary": "Your usage",
                "description": "Your plan, window and calls used. Plans: Every plan, free key included.",
                "tags": [
                    "Your key"
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "The answer",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "data": {
                                        "plan": "complete",
                                        "plan_name": "Complete",
                                        "window": {
                                            "from": "2017-01-01",
                                            "to": "2026-11-02",
                                            "words": "January 2017 to the next 3 days"
                                        },
                                        "calls_today": 214,
                                        "calls_this_month": 18410,
                                        "per_minute": 180,
                                        "per_month": 400000,
                                        "resets": "2026-11-01",
                                        "house_key": false
                                    },
                                    "meta": {
                                        "request_id": "ff8b7aad6fe5ff6a",
                                        "plan": "complete",
                                        "window": "January 2017 to the next 3 days"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "externalDocs": {
                    "url": "https://horseracingapi.co.uk/documentation/usage"
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key"
            },
            "Bearer": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "Envelope": {
                "type": "object",
                "required": [
                    "data",
                    "meta"
                ],
                "properties": {
                    "data": {
                        "description": "One record, or a list"
                    },
                    "meta": {
                        "$ref": "#/components/schemas/Meta"
                    }
                }
            },
            "Meta": {
                "type": "object",
                "properties": {
                    "request_id": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "string"
                    },
                    "window": {
                        "type": "string"
                    },
                    "data_as_of": {
                        "type": "string"
                    },
                    "count": {
                        "type": "integer"
                    },
                    "next_cursor": {
                        "type": "string"
                    },
                    "has_more": {
                        "type": "boolean"
                    },
                    "note": {
                        "type": "string"
                    }
                }
            },
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "bad_request",
                                    "unauthorized",
                                    "upgrade_required",
                                    "outside_plan_window",
                                    "not_found",
                                    "unknown_parameter",
                                    "rate_limited",
                                    "quota_exceeded",
                                    "server_error"
                                ]
                            },
                            "message": {
                                "type": "string"
                            },
                            "plan": {
                                "type": "string"
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "docs": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        }
    }
}