{"openapi":"3.1.0","info":{"title":"The Racing API","version":"1.4.3","x-logo":{"url":"https://www.theracingapi.com/static/images/logo_padded.png"}},"paths":{"/v1/courses/regions":{"get":{"tags":["Courses","Free Plan","Basic Plan","Standard Plan","Pro Plan"],"summary":"Regions","description":"<h4>Get a list of regions, with region codes.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free</td></tr><tr><td><b>Rate Limit</b></td><td>1 requests per second</td></tr></tbody></table>","operationId":"regions_v1_courses_regions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Region"},"type":"array","title":"Response Regions V1 Courses Regions Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBasic":[]}],"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/courses/regions\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/courses/regions\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/courses/regions\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/courses/regions?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/courses/regions')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/courses/regions\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/courses/regions?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/courses/regions?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/courses":{"get":{"tags":["Courses","Free Plan","Basic Plan","Standard Plan","Pro Plan"],"summary":"Courses","description":"<h4>Get a list of courses, with course ids and regions.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free</td></tr><tr><td><b>Rate Limit</b></td><td>1 requests per second</td></tr></tbody></table>","operationId":"courses_v1_courses_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"region_codes","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions","description":"Filter courses by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.","examples":["gb","ire"]},"description":"Filter courses by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoursesPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/courses\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/courses\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/courses\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/courses?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/courses')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/courses\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/courses?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/courses?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/dams/search":{"get":{"tags":["Dams","Standard Plan","Pro Plan"],"summary":"Dam Search","description":"<h4>Search dams by name</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"dam_search_v1_dams_search_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dams"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/dams/search\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/dams/search\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/dams/search\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/dams/search?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/dams/search')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/dams/search\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/dams/search?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/dams/search?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/dams/{dam_id}/results":{"get":{"tags":["Dams","Pro Plan"],"summary":"Dam Progeny Results","description":"<h4>Get full historical results for a dam's progeny</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table><p>ℹ️ To view a dam's own racing results, use the <a href='#tag/Horses/operation/horse_results_v1_horses__horse_id__results_get'>horse results endpoint</a>, repacing the 'dam_' id prefix with 'hrs_'.</p>","operationId":"dam_progeny_results_v1_dams__dam_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"dam_id","in":"path","required":true,"schema":{"type":"string","title":"Dam Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/dams/{dam_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/dams/{dam_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/dams/{dam_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/dams/{dam_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/dams/{dam_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/dams/{dam_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/dams/{dam_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/dams/{dam_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/dams/{dam_id}/analysis/classes":{"get":{"tags":["Dams","Standard Plan","Pro Plan"],"summary":"Dam Progeny Class Analysis","description":"<h4>Get dam progeny statistics by race class</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"dam_progeny_class_analysis_v1_dams__dam_id__analysis_classes_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"dam_id","in":"path","required":true,"schema":{"type":"string","title":"Dam Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamClassAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/classes?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/dams/{dam_id}/analysis/distances":{"get":{"tags":["Dams","Standard Plan","Pro Plan"],"summary":"Dam Progeny Distance Analysis","description":"<h4>Get dam progeny statistics by race distance</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"dam_progeny_distance_analysis_v1_dams__dam_id__analysis_distances_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"dam_id","in":"path","required":true,"schema":{"type":"string","title":"Dam Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamDistanceAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/dams/{dam_id}/analysis/distances?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/damsires/search":{"get":{"tags":["Damsires","Standard Plan","Pro Plan"],"summary":"Damsire Search","description":"<h4>Search damsires by name</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"damsire_search_v1_damsires_search_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Damsires"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/damsires/search\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/damsires/search\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/damsires/search\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/damsires/search?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/damsires/search')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/damsires/search\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/damsires/search?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/damsires/search?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/damsires/{damsire_id}/results":{"get":{"tags":["Damsires","Pro Plan"],"summary":"Damsire Grandoffspring Results","description":"<h4>Get full historical results for a damsire's grandoffspring</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table><p>ℹ️ To view a damsire's own racing results, use the <a href='#tag/Horses/operation/horse_results_v1_horses__horse_id__results_get'>horse results endpoint</a>, repacing the 'dsi_' id prefix with 'hrs_'.</p>","operationId":"damsire_grandoffspring_results_v1_damsires__damsire_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"damsire_id","in":"path","required":true,"schema":{"type":"string","title":"Damsire Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/damsires/{damsire_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/damsires/{damsire_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/damsires/{damsire_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/damsires/{damsire_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/damsires/{damsire_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/damsires/{damsire_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/damsires/{damsire_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/damsires/{damsire_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/damsires/{damsire_id}/analysis/classes":{"get":{"tags":["Damsires","Standard Plan","Pro Plan"],"summary":"Damsire Grandoffspring Class Analysis","description":"<h4>Get damsire grandoffspring statistics by race class</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"damsire_grandoffspring_class_analysis_v1_damsires__damsire_id__analysis_classes_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"damsire_id","in":"path","required":true,"schema":{"type":"string","title":"Damsire Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamsireClassAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/damsires/{damsire_id}/analysis/distances":{"get":{"tags":["Damsires","Standard Plan","Pro Plan"],"summary":"Damsire Grandoffspring Distance Analysis","description":"<h4>Get damsire grandoffspring statistics by race distance</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"damsire_grandoffspring_distance_analysis_v1_damsires__damsire_id__analysis_distances_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"damsire_id","in":"path","required":true,"schema":{"type":"string","title":"Damsire Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DamsireDistanceAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/distances?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/horses/search":{"get":{"tags":["Horses","Standard Plan","Pro Plan"],"summary":"Horse Search","description":"<h4>Search horses by name</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"horse_search_v1_horses_search_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Horses"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/horses/search\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/horses/search\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/horses/search\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/horses/search?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/horses/search')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/horses/search\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/horses/search?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/horses/search?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/horses/{horse_id}/results":{"get":{"tags":["Horses","Pro Plan"],"summary":"Horse Results","description":"<h4>Get full historical results for a horse</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"horse_results_v1_horses__horse_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"horse_id","in":"path","required":true,"schema":{"type":"string","title":"Horse Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/horses/{horse_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/horses/{horse_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/horses/{horse_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/horses/{horse_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/horses/{horse_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/horses/{horse_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/horses/{horse_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/horses/{horse_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/horses/{horse_id}/analysis/distance-times":{"get":{"tags":["Horses","Basic Plan","Standard Plan","Pro Plan"],"summary":"Horse Distance Time Analysis","description":"<h4>Get horse statistics by race distance, with breakdowns of times.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Basic</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"horse_distance_time_analysis_v1_horses__horse_id__analysis_distance_times_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"horse_id","in":"path","required":true,"schema":{"type":"string","title":"Horse Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HorseDistanceTimeAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/horses/{horse_id}/analysis/distance-times?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/horses/{horse_id}/standard":{"get":{"tags":["Horses","Standard Plan","Pro Plan"],"summary":"Horse Standard","description":"<h4>Get a basic horse profile</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table><p>ℹ️ You may also get profiles for a sire/dam/damsire using this endpoint by replacing their id prefix with 'hrs_'</p>","operationId":"horse_standard_v1_horses__horse_id__standard_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"horse_id","in":"path","required":true,"schema":{"type":"string","title":"Horse Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Horse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/horses/{horse_id}/standard\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/horses/{horse_id}/standard\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/horses/{horse_id}/standard\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/horses/{horse_id}/standard?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/horses/{horse_id}/standard')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/horses/{horse_id}/standard\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/horses/{horse_id}/standard?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/horses/{horse_id}/standard?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/horses/{horse_id}/pro":{"get":{"tags":["Horses","Pro Plan"],"summary":"Horse Pro","description":"<h4>Get a detailed horse profile including dob, sex, color and breeder.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table><p>ℹ️ You may also get profiles for a sire/dam/damsire using this endpoint by replacing their id prefix with 'hrs_'</p><p>ℹ️ If a detailed profile for a horse can't be found, a basic profile may still be found using the <a href='https://api.theracingapi.com/documentation#tag/Horses/operation/horse_standard_v1_horses__horse_id__standard_get'>Horse Standard</a> endpoint</p>","operationId":"horse_pro_v1_horses__horse_id__pro_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"horse_id","in":"path","required":true,"schema":{"type":"string","title":"Horse Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HorsePro"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/horses/{horse_id}/pro\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/horses/{horse_id}/pro\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/horses/{horse_id}/pro\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/horses/{horse_id}/pro?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/horses/{horse_id}/pro')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/horses/{horse_id}/pro\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/horses/{horse_id}/pro?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/horses/{horse_id}/pro?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/jockeys/search":{"get":{"tags":["Jockeys","Standard Plan","Pro Plan"],"summary":"Jockey Search","description":"<h4>Search jockeys by name</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"jockey_search_v1_jockeys_search_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jockeys"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/jockeys/search\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/jockeys/search\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/jockeys/search\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/jockeys/search?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/jockeys/search')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/jockeys/search\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/jockeys/search?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/jockeys/search?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/jockeys/{jockey_id}/results":{"get":{"tags":["Jockeys","Pro Plan"],"summary":"Jockey Results","description":"<h4>Get full historical results for a jockey</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"jockey_results_v1_jockeys__jockey_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"jockey_id","in":"path","required":true,"schema":{"type":"string","title":"Jockey Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/jockeys/{jockey_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/jockeys/{jockey_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/jockeys/{jockey_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/jockeys/{jockey_id}/analysis/courses":{"get":{"tags":["Jockeys","Standard Plan","Pro Plan"],"summary":"Jockey Course Analysis","description":"<h4>Get jockey statistics by course</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"jockey_course_analysis_v1_jockeys__jockey_id__analysis_courses_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"jockey_id","in":"path","required":true,"schema":{"type":"string","title":"Jockey Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JockeyCourseAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/courses?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/jockeys/{jockey_id}/analysis/distances":{"get":{"tags":["Jockeys","Standard Plan","Pro Plan"],"summary":"Jockey Distance Analysis","description":"<h4>Get jockey statistics by race distance</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"jockey_distance_analysis_v1_jockeys__jockey_id__analysis_distances_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"jockey_id","in":"path","required":true,"schema":{"type":"string","title":"Jockey Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JockeyDistanceAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/distances?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/jockeys/{jockey_id}/analysis/owners":{"get":{"tags":["Jockeys","Standard Plan","Pro Plan"],"summary":"Jockey Owner Analysis","description":"<h4>Get jockey statistics by owner</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"jockey_owner_analysis_v1_jockeys__jockey_id__analysis_owners_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"jockey_id","in":"path","required":true,"schema":{"type":"string","title":"Jockey Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JockeyOwnerAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/owners?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/jockeys/{jockey_id}/analysis/trainers":{"get":{"tags":["Jockeys","Standard Plan","Pro Plan"],"summary":"Jockey Trainer Analysis","description":"<h4>Get jockey statistics by trainer</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"jockey_trainer_analysis_v1_jockeys__jockey_id__analysis_trainers_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"jockey_id","in":"path","required":true,"schema":{"type":"string","title":"Jockey Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JockeyTrainerAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/jockeys/{jockey_id}/analysis/trainers?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/odds/{race_id}/{horse_id}":{"get":{"tags":["Odds","Pro Plan"],"summary":"Odds Runner","description":"<h4>Get detailed pre-race runner odds data, including price movements, for UK and Irish racing.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table><p>ℹ️ Price movements, displayed in the 'history' fields, are available for runners in races from 2025-03-17 onwards.</p>","operationId":"odds_runner_v1_odds__race_id___horse_id__get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}},{"name":"horse_id","in":"path","required":true,"schema":{"type":"string","title":"Horse Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaceRunnerOdds"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/odds/{race_id}/{horse_id}?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/owners/search":{"get":{"tags":["Owners","Standard Plan","Pro Plan"],"summary":"Owner Search","description":"<h4>Search owners by name</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"owner_search_v1_owners_search_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Owners"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/owners/search\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/owners/search\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/owners/search\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/owners/search?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/owners/search')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/owners/search\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/owners/search?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/owners/search?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/owners/{owner_id}/results":{"get":{"tags":["Owners","Pro Plan"],"summary":"Owner Results","description":"<h4>Get full historical results for an owner</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"owner_results_v1_owners__owner_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"owner_id","in":"path","required":true,"schema":{"type":"string","title":"Owner Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/owners/{owner_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/owners/{owner_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/owners/{owner_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/owners/{owner_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/owners/{owner_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/owners/{owner_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/owners/{owner_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/owners/{owner_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/owners/{owner_id}/analysis/courses":{"get":{"tags":["Owners","Standard Plan","Pro Plan"],"summary":"Owner Course Analysis","description":"<h4>Get owner statistics by course</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"owner_course_analysis_v1_owners__owner_id__analysis_courses_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"owner_id","in":"path","required":true,"schema":{"type":"string","title":"Owner Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerCourseAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/courses?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/owners/{owner_id}/analysis/distances":{"get":{"tags":["Owners","Standard Plan","Pro Plan"],"summary":"Owner Distance Analysis","description":"<h4>Get owner statistics by race distance</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"owner_distance_analysis_v1_owners__owner_id__analysis_distances_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"owner_id","in":"path","required":true,"schema":{"type":"string","title":"Owner Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerDistanceAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/distances?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/owners/{owner_id}/analysis/jockeys":{"get":{"tags":["Owners","Standard Plan","Pro Plan"],"summary":"Owner Jockey Analysis","description":"<h4>Get owner statistics by jockey</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"owner_jockey_analysis_v1_owners__owner_id__analysis_jockeys_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"owner_id","in":"path","required":true,"schema":{"type":"string","title":"Owner Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerJockeyAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/jockeys?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/owners/{owner_id}/analysis/trainers":{"get":{"tags":["Owners","Standard Plan","Pro Plan"],"summary":"Owner Trainer Analysis","description":"<h4>Get owner statistics by trainer</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"owner_trainer_analysis_v1_owners__owner_id__analysis_trainers_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"owner_id","in":"path","required":true,"schema":{"type":"string","title":"Owner Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerTrainerAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/owners/{owner_id}/analysis/trainers?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/free":{"get":{"tags":["Racecards","Free Plan"],"summary":"Racecards Free","description":"<h4>Get racecards for today and tomorrow (basic data only)</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free</td></tr><tr><td><b>Rate Limit</b></td><td>1 request per second</td></tr></tbody></table>","operationId":"racecards_free_v1_racecards_free_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day","description":"Query racecards by day:<br> today, tomorrow","default":"today"},"description":"Query racecards by day:<br> today, tomorrow"},{"name":"region_codes","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions","description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Courses","description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit","default":500}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardsBasicPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/free\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/free\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/free\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/free?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/free')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/free\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/free?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/free?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/basic":{"get":{"tags":["Racecards","Basic Plan"],"summary":"Racecards Basic","description":"<h4>Get racecards for today and tomorrow</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Basic</td></tr><tr><td><b>Rate Limit</b></td><td>2 requests per second</td></tr></tbody></table>","operationId":"racecards_basic_v1_racecards_basic_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day","description":"Query racecards by day:<br> today, tomorrow","default":"today"},"description":"Query racecards by day:<br> today, tomorrow"},{"name":"region_codes","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions","description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Courses","description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit","default":500}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardsPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/basic\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/basic\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/basic\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/basic?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/basic')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/basic\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/basic?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/basic?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/standard":{"get":{"tags":["Racecards","Standard Plan"],"summary":"Racecards Standard","description":"<h4>Get racecards for today and tomorrow, including runner odds for UK & Irish racing.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>2 requests per second</td></tr></tbody></table>","operationId":"racecards_standard_v1_racecards_standard_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day","description":"Query racecards by day:<br> today, tomorrow","default":"today"},"description":"Query racecards by day:<br> today, tomorrow"},{"name":"region_codes","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions","description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Courses","description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit","default":500}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardsOddsPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/standard\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/standard\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/standard\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/standard?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/standard')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/standard\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/standard?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/standard?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/pro":{"get":{"tags":["Racecards","Pro Plan"],"summary":"Racecards Pro","description":"<h4>Get future and historical racecards, including runner odds for UK & Irish racing.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>2 requests per second</td></tr></tbody></table><p>ℹ️ Historical racecards are available from 2023-01-23, when our tracking began. Future racecards are available up to 1 week in advance.</p>","operationId":"racecards_pro_v1_racecards_pro_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","description":"Query racecards by date with format YYYY-MM-DD (e.g 2023-04-05)"},"description":"Query racecards by date with format YYYY-MM-DD (e.g 2023-04-05)"},{"name":"region_codes","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions","description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Courses","description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit","default":500}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardsOddsProPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/pro\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/pro\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/pro\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/pro?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/pro')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/pro\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/pro?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/pro?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/big-races":{"get":{"tags":["Racecards","Standard Plan","Pro Plan"],"summary":"Racecards Big Races","description":"<h4>Get detailed racecards for future big races and main events, such as Cheltenham, The Grand National and The Derby.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>2 requests per second</td></tr></tbody></table>","operationId":"racecards_big_races_v1_racecards_big_races_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p>Date must be today or greater, defaults to today.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p>Date must be today or greater, defaults to today.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region_codes","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions","description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Courses","description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit","default":500}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardsOddsPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/big-races\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/big-races\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/big-races\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/big-races?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/big-races')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/big-races\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/big-races?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/big-races?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/summaries":{"get":{"tags":["Racecards","Basic Plan","Standard Plan","Pro Plan"],"summary":"Racecards Summaries","description":"<h4>Get racecard summaries by date</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Basic</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"racecards_summaries_v1_racecards_summaries_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","description":"Query racecard summaries by date with format YYYY-MM-DD (e.g 2023-04-05)","default":"2026-08-09"},"description":"Query racecard summaries by date with format YYYY-MM-DD (e.g 2023-04-05)"},{"name":"region_codes","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Regions","description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Courses","description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardsSummary"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/summaries\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/summaries\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/summaries\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/summaries?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/summaries')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/summaries\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/summaries?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/summaries?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/{horse_id}/results":{"get":{"tags":["Racecards","Basic Plan","Standard Plan"],"summary":"Racecard Horse Results","description":"<h4>Get historic results for a horse on any upcoming racecard.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Basic</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"racecard_horse_results_v1_racecards__horse_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"horse_id","in":"path","required":true,"schema":{"type":"string","title":"Horse Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsBasicPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/{horse_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/{horse_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/{horse_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/{horse_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/{horse_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/{horse_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/{horse_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/{horse_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/{race_id}/standard":{"get":{"tags":["Racecards","Standard Plan"],"summary":"Race Standard","description":"<h4>Get a race scheduled for today or tomorrow (or if classified as a 'big race'), including runner odds for UK & Ireland races.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"race_standard_v1_racecards__race_id__standard_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardOdds"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/{race_id}/standard\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/{race_id}/standard\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/{race_id}/standard\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/{race_id}/standard?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/{race_id}/standard')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/{race_id}/standard\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/{race_id}/standard?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/{race_id}/standard?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/racecards/{race_id}/pro":{"get":{"tags":["Pro Plan"],"summary":"Race Pro","description":"<h4>Get a race, including runner odds for UK & Ireland races only.</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"race_pro_v1_racecards__race_id__pro_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RacecardOddsPro"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/racecards/{race_id}/pro\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/racecards/{race_id}/pro\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/racecards/{race_id}/pro\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/racecards/{race_id}/pro?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/racecards/{race_id}/pro')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/racecards/{race_id}/pro\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/racecards/{race_id}/pro?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/racecards/{race_id}/pro?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/results":{"get":{"tags":["Results","Standard Plan","Pro Plan"],"summary":"Results","description":"<h4>Get historic results for all races in the last 12 months</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr><tr><td><b>Add-ons</b></td><td><b>[Optional] Core database historical results add-on</b>: users on the Pro Plan can pay a one-time fee of £499 to remove the 12 month restriction and access over 20 years of results from this endpoint. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</td></tr></tbody></table><h4>Efficiently querying and exporting results data</h4><p>While the parameters for this endpoint allow for a wide date range to be set (utilising 'start_date' and 'end_date'), the necessary use of 'skip' to access all results for a wide date range query will reduce perfomance the larger that range is.</p><p>ℹ️ The most efficient way to query results data over time is to build a list of dates within your date range, then make queries for each date in that list. A sample python script outlining this method can be viewed here: <a href='https://gist.github.com/theracingapi/4d492dbdba58c2072fe4f98ee090126f' target='_blank'>https://gist.github.com/theracingapi/4d492dbdba58c2072fe4f98ee090126f</a></p>","operationId":"results_v1_results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Limited to up to 365 days in the past; pro plan users can purchase the historical results add-on to remove this limitation and query back to 2005-01-01.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Limited to up to 365 days in the past; pro plan users can purchase the historical results add-on to remove this limitation and query back to 2005-01-01.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/results/today":{"get":{"tags":["Results","Basic Plan","Standard Plan","Pro Plan"],"summary":"Results Today","description":"<h4>Get today's results</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Basic</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"results_today_v1_results_today_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query results by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p>","title":"Region"},"description":"<p>Query results by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsBasicPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/results/today\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/results/today\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/results/today\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/results/today?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/results/today')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/results/today\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/results/today?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/results/today?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/results/today/free":{"get":{"tags":["Results","Free Plan"],"summary":"Results Today Free","description":"<h4>Get today's results (basic data only)</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free</td></tr><tr><td><b>Rate Limit</b></td><td>1 requests per second</td></tr></tbody></table>","operationId":"results_today_free_v1_results_today_free_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query results by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p>","title":"Region"},"description":"<p>Query results by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsFreePage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/results/today/free\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/results/today/free\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/results/today/free\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/results/today/free?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/results/today/free')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/results/today/free\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/results/today/free?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/results/today/free?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/results/{race_id}":{"get":{"tags":["Results","Standard Plan","Pro Plan"],"summary":"Result","description":"<h4>Get a result</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"result_v1_results__race_id__get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"race_id","in":"path","required":true,"schema":{"type":"string","title":"Race Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultStandard"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/results/{race_id}\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/results/{race_id}\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/results/{race_id}\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/results/{race_id}?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/results/{race_id}')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/results/{race_id}\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/results/{race_id}?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/results/{race_id}?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/sires/search":{"get":{"tags":["Sires","Standard Plan","Pro Plan"],"summary":"Sire Search","description":"<h4>Search sires by name</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"sire_search_v1_sires_search_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sires"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/sires/search\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/sires/search\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/sires/search\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/sires/search?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/sires/search')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/sires/search\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/sires/search?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/sires/search?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/sires/{sire_id}/results":{"get":{"tags":["Sires","Pro Plan"],"summary":"Sire Progeny Results","description":"<h4>Get full historical results for a sire's progeny</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table><p>ℹ️ To view a sire's own racing results, use the <a href='#tag/Horses/operation/horse_results_v1_horses__horse_id__results_get'>horse results endpoint</a>, repacing the 'sir_' id prefix with 'hrs_'.</p>","operationId":"sire_progeny_results_v1_sires__sire_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"sire_id","in":"path","required":true,"schema":{"type":"string","title":"Sire Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/sires/{sire_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/sires/{sire_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/sires/{sire_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/sires/{sire_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/sires/{sire_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/sires/{sire_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/sires/{sire_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/sires/{sire_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/sires/{sire_id}/analysis/classes":{"get":{"tags":["Sires","Standard Plan","Pro Plan"],"summary":"Sire Progeny Class Analysis","description":"<h4>Get sire progeny statistics by race class</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"sire_progeny_class_analysis_v1_sires__sire_id__analysis_classes_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"sire_id","in":"path","required":true,"schema":{"type":"string","title":"Sire Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SireClassAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/classes?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/sires/{sire_id}/analysis/distances":{"get":{"tags":["Sires","Standard Plan","Pro Plan"],"summary":"Sire Progeny Distance Analysis","description":"<h4>Get sire progeny statistics by race distance</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"sire_progeny_distance_analysis_v1_sires__sire_id__analysis_distances_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"sire_id","in":"path","required":true,"schema":{"type":"string","title":"Sire Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SireDistanceAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/sires/{sire_id}/analysis/distances?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/trainers/search":{"get":{"tags":["Trainers","Standard Plan","Pro Plan"],"summary":"Trainer Search","description":"<h4>Search trainers by name</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"trainer_search_v1_trainers_search_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trainers"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/trainers/search\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/trainers/search\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/trainers/search\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/trainers/search?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/trainers/search')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/trainers/search\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/trainers/search?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/trainers/search?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/trainers/{trainer_id}/results":{"get":{"tags":["Trainers","Pro Plan"],"summary":"Trainer Results","description":"<h4>Get full historical results for a trainer</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Pro</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"trainer_results_v1_trainers__trainer_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"trainer_id","in":"path","required":true,"schema":{"type":"string","title":"Trainer Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> 365 days ago. Can query back to 2005-01-01.</p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p><p><b>Default:</b> Today's date. Maximum range between start and end date is 365 days.</p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit","default":50}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":20000},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsStandardPage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/trainers/{trainer_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/trainers/{trainer_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/trainers/{trainer_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/trainers/{trainer_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/trainers/{trainer_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/trainers/{trainer_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/trainers/{trainer_id}/analysis/horse-age":{"get":{"tags":["Trainers","Standard Plan","Pro Plan"],"summary":"Trainer Horse Age Analysis","description":"<h4>Get trainer statistics by horse age</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"trainer_horse_age_analysis_v1_trainers__trainer_id__analysis_horse_age_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"trainer_id","in":"path","required":true,"schema":{"type":"string","title":"Trainer Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainerHorseAgeAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/trainers/{trainer_id}/analysis/courses":{"get":{"tags":["Trainers","Standard Plan","Pro Plan"],"summary":"Trainer Course Analysis","description":"<h4>Get trainer statistics by course</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"trainer_course_analysis_v1_trainers__trainer_id__analysis_courses_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"trainer_id","in":"path","required":true,"schema":{"type":"string","title":"Trainer Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainerCourseAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/trainers/{trainer_id}/analysis/distances":{"get":{"tags":["Trainers","Standard Plan","Pro Plan"],"summary":"Trainer Distance Analysis","description":"<h4>Get trainer statistics by race distance</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"trainer_distance_analysis_v1_trainers__trainer_id__analysis_distances_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"trainer_id","in":"path","required":true,"schema":{"type":"string","title":"Trainer Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainerDistanceAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/trainers/{trainer_id}/analysis/jockeys":{"get":{"tags":["Trainers","Standard Plan","Pro Plan"],"summary":"Trainer Jockey Analysis","description":"<h4>Get trainer statistics by jockey</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"trainer_jockey_analysis_v1_trainers__trainer_id__analysis_jockeys_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"trainer_id","in":"path","required":true,"schema":{"type":"string","title":"Trainer Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainerJockeyAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/trainers/{trainer_id}/analysis/owners":{"get":{"tags":["Trainers","Standard Plan","Pro Plan"],"summary":"Trainer Owner Analysis","description":"<h4>Get trainer statistics by owner</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Standard</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr></tbody></table>","operationId":"trainer_owner_analysis_v1_trainers__trainer_id__analysis_owners_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"trainer_id","in":"path","required":true,"schema":{"type":"string","title":"Trainer Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>","title":"Region"},"description":"<p>Query by region codes. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_regions_v1_courses_regions_get'>here</a>.</p><p>Note: If the course query parameter is specified, this will be ignored.</p>"},{"name":"course","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>.","title":"Course"},"description":"Query by course ids. Get the full list <a href='https://api.theracingapi.com/documentation#tag/Courses/operation/list_courses_v1_courses_get'>here</a>."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>","title":"Type"},"description":"<p>Query by race type</p><p>Options: <code>chase</code>, <code>flat</code>, <code>hurdle</code>, <code>nh_flat</code></p>"},{"name":"going","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>","title":"Going"},"description":"<p>Query by going</p><p>Options: <code>fast</code>, <code>firm</code>, <code>good</code>, <code>good_to_firm</code>, <code>good_to_soft</code>, <code>good_to_yielding</code>, <code>hard</code>, <code>heavy</code>, <code>holding</code>, <code>muddy</code>, <code>sloppy</code>, <code>slow</code>, <code>soft</code>, <code>soft_to_heavy</code>, <code>standard</code>, <code>standard_to_fast</code>, <code>standard_to_slow</code>, <code>very_soft</code>, <code>yielding</code>, <code>yielding_to_soft</code></p>"},{"name":"race_class","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>","title":"Race Class"},"description":"<p>Query by class</p><p>Options: <code>class_1</code>, <code>class_2</code>, <code>class_3</code>, <code>class_4</code>, <code>class_5</code>, <code>class_6</code>, <code>class_7</code></p>"},{"name":"min_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by minimum race distance (yards)</p>","title":"Min Distance Y"},"description":"<p>Query by minimum race distance (yards)</p>"},{"name":"max_distance_y","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"<p>Query by maximum race distance (yards)</p>","title":"Max Distance Y"},"description":"<p>Query by maximum race distance (yards)</p>"},{"name":"age_band","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>","title":"Age Band"},"description":"<p>Query by age band</p><p>Options: <code>10yo+</code>, <code>2-3yo</code>, <code>2yo</code>, <code>2yo+</code>, <code>3-4yo</code>, <code>3-5yo</code>, <code>3-6yo</code>, <code>3yo</code>, <code>3yo+</code>, <code>4-5yo</code>, <code>4-6yo</code>, <code>4-7yo</code>, <code>4-8yo</code>, <code>4yo</code>, <code>4yo+</code>, <code>5-6yo</code>, <code>5-7yo</code>, <code>5-8yo</code>, <code>5yo</code>, <code>5yo+</code>, <code>6-7yo</code>, <code>6yo</code>, <code>6yo+</code>, <code>7yo+</code>, <code>8yo+</code>, <code>9yo+</code></p>"},{"name":"sex_restriction","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>","title":"Sex Restriction"},"description":"<p>Query by sex restriction</p><p>Options: <code>c&f</code>, <code>c&g</code>, <code>f</code>, <code>f&m</code>, <code>m</code>, <code>m&g</code></p>"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainerOwnerAnalysis"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/north-america/meets":{"get":{"tags":["North America"],"summary":"Meets","description":"<h4>Get a list of North American race meets</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free + North America regional add-on</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr><tr><td><b>Add-ons</b></td><td><b>[Required] North America regional add-on</b>: users on any plan can subscribe to this add-on for £49.99 per month. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</td></tr></tbody></table>","operationId":"meets_v1_north_america_meets_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"Start Date"},"description":"<p>Query from date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>","title":"End Date"},"description":"<p>Query to date with format YYYY-MM-DD, e.g. <code>2020-01-01</code></p>"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50,"minimum":1},{"type":"null"}],"title":"Limit","default":25}},{"name":"skip","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skip","default":0}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__models__na_meets__Meets"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/north-america/meets\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/north-america/meets\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/north-america/meets\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/north-america/meets?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/north-america/meets')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/north-america/meets\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/north-america/meets?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/north-america/meets?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/north-america/meets/{meet_id}/entries":{"get":{"tags":["North America"],"summary":"Meet Entries","description":"<h4>Get entries for a North American meet</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free + North America regional add-on</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr><tr><td><b>Add-ons</b></td><td><b>[Required] North America regional add-on</b>: users on any plan can subscribe to this add-on for £49.99 per month. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</td></tr></tbody></table>","operationId":"meet_entries_v1_north_america_meets__meet_id__entries_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"meet_id","in":"path","required":true,"schema":{"type":"string","title":"Meet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entries"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/entries?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/north-america/meets/{meet_id}/results":{"get":{"tags":["North America"],"summary":"Meet Results","description":"<h4>Get results for a North American meet</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free + North America regional add-on</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr><tr><td><b>Add-ons</b></td><td><b>[Required] North America regional add-on</b>: users on any plan can subscribe to this add-on for £49.99 per month. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</td></tr></tbody></table>","operationId":"meet_results_v1_north_america_meets__meet_id__results_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"meet_id","in":"path","required":true,"schema":{"type":"string","title":"Meet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Results"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/north-america/meets/{meet_id}/results?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/australia/meets":{"get":{"tags":["Australia"],"summary":"Meets","description":"<h4>Get a list of Australian race meets (up to 12 months in the past and 7 days in the future)</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free + Australia regional add-on</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr><tr><td><b>Add-ons</b></td><td><ul><li><b>[Required] Australia regional add-on</b>: users on any plan can subscribe to this add-on for £49.99 per month. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</li><li><b>[Optional] Australia database historical races add-on</b>: users who subscribe to the Australia regional add-on can pay a one-time fee of £249 to remove the 12 month restriction and access over 20 years of historical meets and races. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</li></ul></td></tr></tbody></table>","operationId":"meets_v1_australia_meets_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","description":"Query meets by date with format YYYY-MM-DD (e.g 2023-04-05)"},"description":"Query meets by date with format YYYY-MM-DD (e.g 2023-04-05)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__models__aus_meets__Meets"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/australia/meets\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/australia/meets\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/australia/meets\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/australia/meets?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/australia/meets')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/australia/meets\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/australia/meets?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/australia/meets?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/australia/meets/{meet_id}/races":{"get":{"tags":["Australia"],"summary":"Races By Meet","description":"<h4>Get races for an Australian meet (up to 12 months in the past and 7 days in the future)</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free + Australia regional add-on</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr><tr><td><b>Add-ons</b></td><td><ul><li><b>[Required] Australia regional add-on</b>: users on the any plan can subscribe to this add-on for £49.99 per month. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</li><li><b>[Optional] Australia database historical races add-on</b>: users who subscribe to the Australia regional add-on can pay a one-time fee of £249 to remove the 12 month restriction and access over 20 years of historical meets and races. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</li></ul></td></tr></tbody></table>","operationId":"races_by_meet_v1_australia_meets__meet_id__races_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"meet_id","in":"path","required":true,"schema":{"type":"string","title":"Meet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Races"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/australia/meets/{meet_id}/races\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/australia/meets/{meet_id}/races?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/australia/meets/{meet_id}/races')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}},"/v1/australia/meets/{meet_id}/races/{race_number}":{"get":{"tags":["Australia"],"summary":"Race","description":"<h4>Get an Australian race by meet and race number</h4><table><tbody><tr><td><b>Min. Required Plan</b></td><td>Free + Australia regional add-on</td></tr><tr><td><b>Rate Limit</b></td><td>5 requests per second</td></tr><tr><td><b>Add-ons</b></td><td><b>[Required] Australia regional add-on</b>: users on any plan can subscribe to this add-on for £49.99 per month. Contact <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a> for information.</td></tr></tbody></table>","operationId":"race_v1_australia_meets__meet_id__races__race_number__get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"meet_id","in":"path","required":true,"schema":{"type":"string","title":"Meet Id"}},{"name":"race_number","in":"path","required":true,"schema":{"type":"string","title":"Race Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__models__aus_races__Race"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Shell","source":"curl -u USERNAME:PASSWORD https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}\n","label":"cURL"},{"lang":"Python","source":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nurl = \"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}\"\nparams = {}\nresponse = requests.request(\"GET\", url, auth=HTTPBasicAuth('USERNAME','PASSWORD'), params=params)\nprint(response.json())","label":"Python3"},{"lang":"PHP","source":"<?php\n$username = 'USERNAME';\n$password = 'PASSWORD';\n$url = \"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}\";\n\n$params = http_build_query([ ]);\n\n$ch = curl_init(\"$url?$params\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\ncurl_setopt($ch, CURLOPT_USERPWD, \"$username:$password\");\n\n$response = curl_exec($ch);\n\nif (curl_errno($ch)) {\n  echo 'Error:' . curl_error($ch);\n} else {\n  echo $response;\n}\n\ncurl_close($ch);\n?>","label":"PHP"},{"lang":"JavaScript","source":"const username = 'USERNAME';\nconst password = 'PASSWORD';\nconst credentials = btoa(`${username}:${password}`);\n\nconst params = new URLSearchParams({});\nconst url = `https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}?${params}`;\n\nfetch(url, {\n  method: 'GET',\n  headers: {\n    'Authorization': `Basic ${credentials}`\n  }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:', error));","label":"Node.js"},{"lang":"Ruby","source":"require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nparams = {}\nuri = URI('https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}')\nuri.query = URI.encode_www_form(params)\n\nhttp = Net::HTTP.new(uri.host, uri.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(uri)\nrequest.basic_auth('USERNAME', 'PASSWORD')\n\nresponse = http.request(request)\nputs JSON.parse(response.body)","label":"Ruby"},{"lang":"Java","source":"import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap<String, String> params = Map.of();\nString credentials = Base64.getEncoder()\n    .encodeToString(\"USERNAME:PASSWORD\".getBytes());\n\nHttpClient client = HttpClient.newHttpClient();\nHttpRequest request = HttpRequest.newBuilder()\n    .uri(URI.create(\"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}\"))\n    .header(\"Authorization\", \"Basic \" + credentials)\n    .build();\n\nHttpResponse<String> response = client.send(\n    request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.body());","label":"Java"},{"lang":"Go","source":"package main\n\nimport (\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"net/url\"\n)\n\nfunc main() {\n    params := url.Values{}\n    url := \"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}?\" + params.Encode()\n\n    client := &http.Client{}\n    req, _ := http.NewRequest(\"GET\", url, nil)\n    req.SetBasicAuth(\"USERNAME\", \"PASSWORD\")\n\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}","label":"Go"},{"lang":"C#","source":"using System.Net.Http.Headers;\nusing System.Text;\nusing System.Web;\n\nvar params_ = HttpUtility.ParseQueryString(string.Empty);\nvar url = $\"https://api.theracingapi.com/v1/australia/meets/{meet_id}/races/{race_number}?{params_}\";\n\nvar client = new HttpClient();\nvar credentials = Convert.ToBase64String(\n    Encoding.ASCII.GetBytes(\"USERNAME:PASSWORD\"));\nclient.DefaultRequestHeaders.Authorization =\n    new AuthenticationHeaderValue(\"Basic\", credentials);\n\nvar response = await client.GetAsync(url);\nvar content = await response.Content.ReadAsStringAsync();\nConsole.WriteLine(content);","label":".NET"}]}}},"components":{"schemas":{"Change":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","title":"Change","example":{"text":"Horse scratched due to injury","type":"Scratch"}},"CoursesPage":{"properties":{"courses":{"items":{"$ref":"#/components/schemas/app__models__courses__Course"},"type":"array","title":"Courses"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["courses","total"],"title":"CoursesPage"},"Dam":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","name"],"title":"Dam","example":{"id":"dam_4087006","name":"Kind (IRE)"}},"DamClassAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"dam":{"type":"string","title":"Dam"},"total_runners":{"type":"integer","title":"Total Runners"},"classes":{"items":{"$ref":"#/components/schemas/app__models__dams__Class"},"type":"array","title":"Classes"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","dam","total_runners","classes","query"],"title":"DamClassAnalysis","example":{"classes":[{"1_pl":-2.0,"1st":5,"2nd":4,"3rd":3,"4th":2,"a/e":0.9,"class":"Class 1","runners":30,"win_%":0.17}],"dam":"Danehill Destiny (IRE)","id":"dam_5741323","query":[["dam_id","dam_5741323"]],"total_runners":45}},"DamDistanceAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"dam":{"type":"string","title":"Dam"},"total_runners":{"type":"integer","title":"Total Runners"},"distances":{"items":{"$ref":"#/components/schemas/app__models__dams__Distance"},"type":"array","title":"Distances"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","dam","total_runners","distances","query"],"title":"DamDistanceAnalysis","example":{"dam":"Danehill Destiny (IRE)","distances":[{"1_pl":-5.5,"1st":8,"2nd":6,"3rd":5,"4th":4,"a/e":0.85,"dist":"1m","dist_f":"8f","dist_m":"1609","dist_y":"1760","runners":50,"win_%":0.16}],"id":"dam_5741323","query":[["dam_id","dam_5741323"]],"total_runners":45}},"Dams":{"properties":{"search_results":{"items":{"$ref":"#/components/schemas/Dam"},"type":"array","title":"Search Results"}},"type":"object","required":["search_results"],"title":"Dams","example":{"search_results":[{"id":"dam_4087006","name":"Kind (IRE)"},{"id":"dam_5297166","name":"Homepage (GB)"}]}},"Damsire":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","name"],"title":"Damsire","example":{"id":"dsi_296611","name":"Danehill"}},"DamsireClassAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"damsire":{"type":"string","title":"Damsire"},"total_runners":{"type":"integer","title":"Total Runners"},"classes":{"items":{"$ref":"#/components/schemas/app__models__damsires__Class"},"type":"array","title":"Classes"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","damsire","total_runners","classes","query"],"title":"DamsireClassAnalysis","example":{"classes":[{"1_pl":-15.0,"1st":30,"2nd":25,"3rd":22,"4th":18,"a/e":0.88,"class":"Class 1","runners":200,"win_%":0.15}],"damsire":"Sadler's Wells","id":"dsi_3247825","query":[["damsire_id","dsi_3247825"]],"total_runners":500}},"DamsireDistanceAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"damsire":{"type":"string","title":"Damsire"},"total_runners":{"type":"integer","title":"Total Runners"},"distances":{"items":{"$ref":"#/components/schemas/app__models__damsires__Distance"},"type":"array","title":"Distances"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","damsire","total_runners","distances","query"],"title":"DamsireDistanceAnalysis","example":{"damsire":"Sadler's Wells","distances":[{"1_pl":-10.5,"1st":25,"2nd":20,"3rd":18,"4th":15,"a/e":0.95,"dist":"1m2f","dist_f":"10f","dist_m":"2012","dist_y":"2200","runners":150,"win_%":0.17}],"id":"dsi_3247825","query":[["damsire_id","dsi_3247825"]],"total_runners":500}},"Damsires":{"properties":{"search_results":{"items":{"$ref":"#/components/schemas/Damsire"},"type":"array","title":"Search Results"}},"type":"object","required":["search_results"],"title":"Damsires","example":{"search_results":[{"id":"dsi_296611","name":"Danehill"},{"id":"dsi_3527125","name":"Dansili (GB)"}]}},"Distances":{"properties":{"dist":{"type":"string","title":"Distance"},"dist_y":{"type":"string","title":"Distance yards"},"dist_m":{"type":"string","title":"Distance metres"},"dist_f":{"type":"string","title":"Distance furlongs"},"times":{"items":{"$ref":"#/components/schemas/TimesGoing"},"type":"array","title":"Times"},"runs":{"type":"integer","title":"Runs"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["dist","dist_y","dist_m","dist_f","times","runs","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Distances","example":{"1_pl":-5.0,"1st":1,"2nd":2,"3rd":0,"4th":0,"a/e":0.5,"dist":"6f","dist_f":"6f","dist_m":"1225","dist_y":"1340","runs":11,"times":[{"course":"Chelmsford (AW)","date":"2022-04-28","going":"Standard","position":"7","region":"GB","time":"1:11.94"}],"win_%":0.09}},"Entries":{"properties":{"meet_id":{"type":"string","title":"Meet Id"},"track_id":{"type":"string","title":"Track Id"},"track_name":{"type":"string","title":"Track Name"},"country":{"type":"string","title":"Country"},"date":{"type":"string","title":"Date"},"races":{"items":{"$ref":"#/components/schemas/app__models__na_entries__Race"},"type":"array","title":"Races"},"weather":{"anyOf":[{"$ref":"#/components/schemas/app__models__na_entries__Weather"},{"type":"null"}]}},"type":"object","required":["meet_id","track_id","track_name","country","date","races"],"title":"Entries","example":{"country":"USA","date":"2026-02-01","meet_id":"AQU_1769922000000","races":[{"age_restriction":"03","age_restriction_description":"3 Year Olds","breed":"Thoroughbred","changes":[],"course_type":"D","course_type_class":"D","distance_description":"6 1/2 Furlongs","distance_unit":"F","distance_value":6,"grade":"","has_finished":false,"has_results":false,"is_cancelled":false,"max_claim_price":0,"min_claim_price":0,"mtp":-315,"post_time":"12:40 PM","post_time_long":"63600000","purse":80000,"race_class":"MAIDEN SPECIAL WEIGHT","race_key":{"day_evening":"D","race_number":"1"},"race_name":"","race_pools":[{"maximum_wager_amount":10000.0,"minimum_box_amount":1.0,"minimum_wager_amount":2.0,"minimum_wheel_amount":1.0,"pool_code":"WN","pool_name":"Win","race_list":"1"}],"race_restriction":"","race_type":"MSW","race_type_description":"MAIDEN SPECIAL WEIGHT","runners":[{"claiming":0,"coupled_type":"","dam_name":"Criminal Mischief","dam_sire_name":"Into Mischief","description":"","equipment":"Blk-O","horse_name":"Felonious","jockey":{"alias":"Santana R Jr","first_name":"Ricardo","first_name_initial":"R","id":"jky_na_408144","last_name":"Santana, Jr.","middle_name":"","type":"JE"},"medication":"L","morning_line_odds":"5/2","post_pos":"1","program_number":"1","program_number_stripped":1,"registration_number":"23009154","scratch_indicator":"N","sire_name":"Charlatan","trainer":{"alias":"Pletcher Todd A","first_name":"Todd","first_name_initial":"T","id":"trn_na_1029078","last_name":"Pletcher","middle_name":"A.","type":"TE"},"weight":"122"}],"sex_restriction":"","sex_restriction_description":"Open","surface_description":"Dirt","time_zone":"E","tote_track_id":"AQU","track_condition":"FT","track_name":"AQUEDUCT"}],"track_id":"AQU","track_name":"Aqueduct","weather":{"current_weather_description":"Clear","forecast_high":"45","forecast_low":"32","forecast_precipitation":"10","forecast_weather_description":"Partly Cloudy"}}},"Fraction":{"properties":{"fraction_1":{"anyOf":[{"$ref":"#/components/schemas/TimeData"},{"type":"null"}]},"fraction_2":{"anyOf":[{"$ref":"#/components/schemas/TimeData"},{"type":"null"}]},"fraction_3":{"anyOf":[{"$ref":"#/components/schemas/TimeData"},{"type":"null"}]},"fraction_4":{"anyOf":[{"$ref":"#/components/schemas/TimeData"},{"type":"null"}]},"fraction_5":{"anyOf":[{"$ref":"#/components/schemas/TimeData"},{"type":"null"}]},"winning_time":{"anyOf":[{"$ref":"#/components/schemas/TimeData"},{"type":"null"}]}},"type":"object","title":"Fraction","example":{"fraction_1":{"hundredths":60,"minutes":0,"seconds":22,"time_in_hundredths":":22.60"},"fraction_2":{"hundredths":18,"minutes":0,"seconds":46,"time_in_hundredths":":46.18"},"fraction_3":{"hundredths":98,"minutes":0,"seconds":57,"time_in_hundredths":":57.98"},"winning_time":{"hundredths":87,"minutes":1,"seconds":10,"time_in_hundredths":"1:10.87"}}},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Horse":{"properties":{"id":{"type":"string","title":"Id"},"dam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam","default":""},"dam_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Id","default":""},"damsire":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damsire","default":""},"damsire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damsire Id","default":""},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","default":""},"sire":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire","default":""},"sire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Id","default":""}},"type":"object","required":["id"],"title":"Horse","example":{"dam":"Kind (IRE)","dam_id":"dam_4087006","damsire":"Danehill","damsire_id":"dsi_296611","id":"hrs_5344171","name":"Frankel (GB)","sire":"Galileo (IRE)","sire_id":"sir_3722383"}},"HorseAges":{"properties":{"horse_age":{"type":"string","title":"Horse Age"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["horse_age","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"HorseAges","example":{"1_pl":-0.68,"1st":156,"2nd":106,"3rd":87,"4th":60,"a/e":0.99,"horse_age":"3","runners":749,"win_%":0.21}},"HorseDistanceTimeAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"horse":{"type":"string","title":"Horse"},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"},"total_runs":{"type":"integer","title":"Total Runs"},"distances":{"items":{"$ref":"#/components/schemas/Distances"},"type":"array","title":"Distances"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","horse","sire","sire_id","dam","dam_id","damsire","damsire_id","total_runs","distances","query"],"title":"HorseDistanceTimeAnalysis","example":{"dam":"Green Vision (IRE)","dam_id":"dam_5639200","damsire":"Green Desert","damsire_id":"dsi_2126159","distances":[{"1_pl":-5.0,"1st":1,"2nd":2,"3rd":0,"4th":0,"a/e":0.5,"dist":"6f","dist_f":"6f","dist_m":"1225","dist_y":"1340","runs":11,"times":[{"course":"Chelmsford (AW)","date":"2022-04-28","going":"Standard","position":"7","region":"GB","time":"1:11.94"}],"win_%":0.09}],"horse":"Princess Shabnam (IRE)","id":"hrs_25481624","query":[["horse_id","hrs_25481624"]],"sire":"Gregorian (IRE)","sire_id":"sir_5494055","total_runs":16}},"HorsePool":{"properties":{"pool_type_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pool Type Name"},"amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount"},"fractional_odds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fractional Odds"},"dollar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dollar"}},"type":"object","title":"HorsePool","example":{"amount":"5000","dollar":"3.50","fractional_odds":"5/2","pool_type_name":"Win"}},"HorsePro":{"properties":{"id":{"type":"string","title":"Id"},"breeder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Breeder","default":""},"colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colour","default":""},"colour_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colour Code","default":""},"dam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam","default":""},"dam_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Id","default":""},"damsire":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damsire","default":""},"damsire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damsire Id","default":""},"dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dob","default":""},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","default":""},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex","default":""},"sex_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Code","default":""},"sire":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire","default":""},"sire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Id","default":""}},"type":"object","required":["id"],"title":"HorsePro","example":{"breeder":"Juddmonte Farms Ltd","colour":"b","colour_code":"B","dam":"Kind (IRE)","dam_id":"dam_4087006","damsire":"Danehill","damsire_id":"dsi_296611","dob":"2008-02-11","id":"hrs_5344171","name":"Frankel (GB)","sex":"horse","sex_code":"H","sire":"Galileo (IRE)","sire_id":"sir_3722383"}},"Horses":{"properties":{"search_results":{"items":{"$ref":"#/components/schemas/Horse"},"type":"array","title":"Search Results"}},"type":"object","required":["search_results"],"title":"Horses","example":{"search_results":[{"dam":"Kind (IRE)","dam_id":"dam_4087006","damsire":"Danehill","damsire_id":"dsi_296611","id":"hrs_5344171","name":"Frankel (GB)","sire":"Galileo (IRE)","sire_id":"sir_3722383"},{"dam":"February Sun (GB)","dam_id":"dam_5505549","damsire":"Monsun (GER)","damsire_id":"dsi_593768","id":"hrs_33375363","name":"Sunny Frankel (GB)","sire":"Frankel (GB)","sire_id":"sir_5344171"}]}},"JockeyCourseAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"jockey":{"type":"string","title":"Jockey"},"total_rides":{"type":"integer","title":"Total Rides"},"courses":{"items":{"$ref":"#/components/schemas/app__models__jockeys__Course"},"type":"array","title":"Courses"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","jockey","total_rides","courses","query"],"title":"JockeyCourseAnalysis","example":{"courses":[{"1_pl":12.47,"1st":144,"2nd":72,"3rd":86,"4th":68,"a/e":1.09,"course":"Newmarket","course_id":"crs_988","region":"GB","rides":716,"win_%":0.2}],"id":"jky_257379","jockey":"William Buick","query":[["jockey_id","jky_257379"]],"total_rides":3742}},"JockeyDistanceAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"jockey":{"type":"string","title":"Jockey"},"total_rides":{"type":"integer","title":"Total Rides"},"distances":{"items":{"$ref":"#/components/schemas/app__models__jockeys__Distance"},"type":"array","title":"Distances"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","jockey","total_rides","distances","query"],"title":"JockeyDistanceAnalysis","example":{"distances":[{"1_pl":-119.96,"1st":117,"2nd":86,"3rd":72,"4th":64,"a/e":0.95,"dist":"1m","dist_f":"8f","dist_m":"1638","dist_y":"1791","rides":681,"win_%":0.17}],"id":"jky_257379","jockey":"William Buick","query":[["jockey_id","jky_257379"]],"total_rides":3742}},"JockeyOwnerAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"jockey":{"type":"string","title":"Jockey"},"total_rides":{"type":"integer","title":"Total Rides"},"owners":{"items":{"$ref":"#/components/schemas/app__models__jockeys__Owner"},"type":"array","title":"Owners"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","jockey","total_rides","owners","query"],"title":"JockeyOwnerAnalysis","example":{"id":"jky_257379","jockey":"William Buick","owners":[{"1_pl":45.0,"1st":200,"2nd":120,"3rd":100,"4th":80,"a/e":1.05,"owner":"Godolphin","owner_id":"own_199380","rides":800,"win_%":0.25}],"query":[["jockey_id","jky_257379"]],"total_rides":3742}},"JockeyTrainerAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"jockey":{"type":"string","title":"Jockey"},"total_rides":{"type":"integer","title":"Total Rides"},"trainers":{"items":{"$ref":"#/components/schemas/app__models__jockeys__Trainer"},"type":"array","title":"Trainers"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","jockey","total_rides","trainers","query"],"title":"JockeyTrainerAnalysis","example":{"id":"jky_257379","jockey":"William Buick","query":[["jockey_id","jky_257379"]],"total_rides":3742,"trainers":[{"1_pl":50.62,"1st":260,"2nd":148,"3rd":143,"4th":88,"a/e":1.01,"rides":1038,"trainer":"Charlie Appleby","trainer_id":"trn_255042","win_%":0.25}]}},"Jockeys":{"properties":{"search_results":{"items":{"$ref":"#/components/schemas/app__models__jockeys__Jockey"},"type":"array","title":"Search Results"}},"type":"object","required":["search_results"],"title":"Jockeys","example":{"search_results":[{"id":"jky_257379","name":"William Buick"},{"id":"jky_265896","name":"Harry Bentley"}]}},"MeetRaces":{"properties":{"distance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance"},"class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class"},"race_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Group"},"race_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Name"},"race_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Number"},"race_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Status"},"off_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Time"}},"type":"object","title":"MeetRaces","example":{"class":"Group 1","distance":"2000m","off_time":"2025-10-11T04:15:00.000Z","race_group":"Group 1","race_name":"Sportsbet Might And Power","race_number":"6","race_status":"Results"}},"OddsHistory":{"properties":{"bookmaker":{"type":"string","title":"Bookmaker"},"fractional":{"type":"string","title":"Fractional"},"decimal":{"type":"string","title":"Decimal"},"ew_places":{"type":"string","title":"Ew Places"},"ew_denom":{"type":"string","title":"Ew Denom"},"updated":{"type":"string","title":"Updated"},"history":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"History","default":[]}},"type":"object","required":["bookmaker","fractional","decimal","ew_places","ew_denom","updated"],"title":"OddsHistory","example":{"bookmaker":"Bet365","decimal":"6.0","ew_denom":"5","ew_places":"3","fractional":"5/1","history":[{"changed_at":"2026-02-06T12:00:00+00:00","decimal":"7.0","fractional":"6/1"}],"updated":"2026-02-06 13:30:00"}},"OddsNoHistory":{"properties":{"bookmaker":{"type":"string","title":"Bookmaker"},"fractional":{"type":"string","title":"Fractional"},"decimal":{"type":"string","title":"Decimal"},"ew_places":{"type":"string","title":"Ew Places"},"ew_denom":{"type":"string","title":"Ew Denom"},"updated":{"type":"string","title":"Updated"}},"type":"object","required":["bookmaker","fractional","decimal","ew_places","ew_denom","updated"],"title":"OddsNoHistory","example":{"bookmaker":"Bet365","decimal":"6.0","ew_denom":"5","ew_places":"3","fractional":"5/1","updated":"2026-02-06 13:30:00"}},"OwnerCourseAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"owner":{"type":"string","title":"Owner"},"total_runners":{"type":"integer","title":"Total Runners"},"courses":{"items":{"$ref":"#/components/schemas/app__models__owners__Course"},"type":"array","title":"Courses"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","owner","total_runners","courses","query"],"title":"OwnerCourseAnalysis","example":{"courses":[{"1_pl":15.0,"1st":100,"2nd":80,"3rd":60,"4th":50,"a/e":1.02,"course":"Newmarket","course_id":"crs_988","region":"GB","runners":500,"win_%":0.2}],"id":"own_199380","owner":"Godolphin","query":[["owner_id","own_199380"]],"total_runners":5938}},"OwnerDistanceAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"owner":{"type":"string","title":"Owner"},"total_runners":{"type":"integer","title":"Total Runners"},"distances":{"items":{"$ref":"#/components/schemas/app__models__owners__Distance"},"type":"array","title":"Distances"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","owner","total_runners","distances","query"],"title":"OwnerDistanceAnalysis","example":{"distances":[{"1_pl":10.27,"1st":239,"2nd":144,"3rd":163,"4th":114,"a/e":0.99,"dist":"1m","dist_f":"8f","dist_m":"1609","dist_y":"1760","runners":1279,"win_%":0.19}],"id":"own_199380","owner":"Godolphin","query":[["owner_id","own_199380"]],"total_runners":5938}},"OwnerJockeyAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"owner":{"type":"string","title":"Owner"},"total_runners":{"type":"integer","title":"Total Runners"},"jockeys":{"items":{"$ref":"#/components/schemas/app__models__owners__Jockey"},"type":"array","title":"Jockeys"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","owner","total_runners","jockeys","query"],"title":"OwnerJockeyAnalysis","example":{"id":"own_199380","jockeys":[{"1_pl":40.0,"1st":150,"2nd":90,"3rd":80,"4th":60,"a/e":1.02,"jockey":"William Buick","jockey_id":"jky_257379","runners":600,"win_%":0.25}],"owner":"Godolphin","query":[["owner_id","own_199380"]],"total_runners":5938}},"OwnerTrainerAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"owner":{"type":"string","title":"Owner"},"total_runners":{"type":"integer","title":"Total Runners"},"trainers":{"items":{"$ref":"#/components/schemas/app__models__owners__Trainer"},"type":"array","title":"Trainers"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","owner","total_runners","trainers","query"],"title":"OwnerTrainerAnalysis","example":{"id":"own_199380","owner":"Godolphin","query":[["owner_id","own_199380"]],"total_runners":5938,"trainers":[{"1_pl":50.0,"1st":200,"2nd":120,"3rd":100,"4th":80,"a/e":1.05,"runners":800,"trainer":"Charlie Appleby","trainer_id":"trn_255042","win_%":0.25}]}},"Owners":{"properties":{"search_results":{"items":{"$ref":"#/components/schemas/app__models__owners__Owner"},"type":"array","title":"Search Results"}},"type":"object","required":["search_results"],"title":"Owners","example":{"search_results":[{"id":"own_199380","name":"Godolphin"},{"id":"own_724272","name":"Miss J Deadman & S Barrow"}]}},"Payoff":{"properties":{"base_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base Amount"},"carryover":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Carryover"},"number_of_rights":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Rights"},"number_of_tickets_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Of Tickets Bet"},"payoff_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payoff Amount"},"total_pool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Pool"},"wager_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wager Name"},"wager_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wager Type"},"winning_numbers":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winning Numbers"}},"type":"object","title":"Payoff","example":{"base_amount":0.0,"carryover":0.0,"number_of_rights":0,"number_of_tickets_bet":100,"payoff_amount":"2.40","total_pool":"75,589.00","wager_name":"Exacta","wager_type":"E","winning_numbers":"1-4"}},"RaceKey":{"properties":{"race_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Number"},"day_evening":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Day Evening"}},"type":"object","title":"RaceKey","example":{"day_evening":"D","race_number":"1"}},"RacePool":{"properties":{"maximum_wager_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum Wager Amount"},"minimum_box_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum Box Amount"},"minimum_wager_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum Wager Amount"},"minimum_wheel_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum Wheel Amount"},"pool_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pool Code"},"pool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pool Name"},"race_list":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race List"}},"type":"object","title":"RacePool","example":{"maximum_wager_amount":10000.0,"minimum_box_amount":1.0,"minimum_wager_amount":2.0,"minimum_wheel_amount":1.0,"pool_code":"WN","pool_name":"Win","race_list":"1"}},"RaceRunnerOdds":{"properties":{"race_id":{"type":"string","title":"Race Id"},"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"odds":{"anyOf":[{"items":{"$ref":"#/components/schemas/RaceRunnerOddsBookmakers"},"type":"array"},{"type":"null"}],"title":"Odds","default":[]}},"type":"object","required":["race_id","horse_id","horse"],"title":"RaceRunnerOdds","example":{"horse":"Spartan Arrow","horse_id":"hrs_30314725","odds":[{"bookmaker":"Bet365","decimal":"6","ew_denom":"5","ew_places":"4","fractional":"5/1","history":[{"changed_at":"2025-04-22T13:34:00+01:00","decimal":"6.5","fractional":"11/2"}],"updated":"2025-04-22 13:30:26"}],"race_id":"rac_11588863"}},"RaceRunnerOddsBookmakers":{"properties":{"bookmaker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bookmaker","default":""},"fractional":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fractional","default":""},"decimal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decimal","default":""},"ew_places":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ew Places","default":""},"ew_denom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ew Denom","default":""},"updated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated","default":""},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/RaceRunnerOddsHistory"},"type":"array"},{"type":"null"}],"title":"History","default":[]}},"type":"object","title":"RaceRunnerOddsBookmakers","example":{"bookmaker":"Bet365","decimal":"6","ew_denom":"5","ew_places":"4","fractional":"5/1","history":[{"changed_at":"2025-04-22T13:34:00+01:00","decimal":"6.5","fractional":"11/2"},{"changed_at":"2025-04-22T13:28:00+01:00","decimal":"5.5","fractional":"9/2"}],"updated":"2025-04-22 13:30:26"}},"RaceRunnerOddsHistory":{"properties":{"changed_at":{"type":"string","title":"Changed At"},"fractional":{"type":"string","title":"Fractional"},"decimal":{"type":"string","title":"Decimal"}},"type":"object","required":["changed_at","fractional","decimal"],"title":"RaceRunnerOddsHistory","example":{"changed_at":"2025-04-22T13:34:00+01:00","decimal":"6.5","fractional":"11/2"}},"Racecard":{"properties":{"race_id":{"type":"string","title":"Race Id"},"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"date":{"type":"string","title":"Date"},"off_time":{"type":"string","title":"Off Time"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"race_name":{"type":"string","title":"Race Name"},"distance_round":{"type":"string","title":"Distance Round"},"distance":{"type":"string","title":"Distance"},"distance_f":{"type":"string","title":"Distance F"},"region":{"type":"string","title":"Region"},"pattern":{"type":"string","title":"Pattern"},"sex_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction","default":""},"race_class":{"type":"string","title":"Race Class"},"type":{"type":"string","title":"Type"},"age_band":{"type":"string","title":"Age Band"},"rating_band":{"type":"string","title":"Rating Band"},"prize":{"type":"string","title":"Prize"},"field_size":{"type":"string","title":"Field Size"},"going_detailed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Going Detailed"},"rail_movements":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rail Movements"},"stalls":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stalls"},"weather":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weather"},"going":{"type":"string","title":"Going"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"},"runners":{"items":{"$ref":"#/components/schemas/app__models__racecards__Runner"},"type":"array","title":"Runners"},"big_race":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Big Race","default":false},"is_abandoned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Abandoned","default":false},"race_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Status","default":""}},"type":"object","required":["race_id","course","course_id","date","off_time","race_name","distance_round","distance","distance_f","region","pattern","race_class","type","age_band","rating_band","prize","field_size","going_detailed","rail_movements","stalls","weather","going","surface","runners"],"title":"Racecard","example":{"age_band":"4yo+","big_race":false,"course":"Brighton","course_id":"crs_182","date":"2023-05-02","distance":"6f210y","distance_f":"7.0","distance_round":"7f","field_size":"9","going":"Good To Firm","going_detailed":"","is_abandoned":false,"off_dt":"2023-05-02T13:50:00+01:00","off_time":"1:50","pattern":"","prize":"£4,606","race_class":"Class 5","race_id":"rac_10880272","race_name":"At The Races App Form Study Apprentice Handicap","race_status":"","rating_band":"0-75","region":"GB","runners":[{"age":"6","breeder":"Tada Nobutaka","colour":"b","comment":"Course-and-distance form; acts on the ground and is a leading player on these terms.","dam":"Lerici","dam_id":"dam_4823441","damsire":"Woodman","damsire_id":"dsi_2126229","dob":"2017-04-22","draw":"8","form":"3-7880","headgear":"","horse":"Pistoletto","horse_id":"hrs_18092480","jockey":"Adam Tracey(7)","jockey_id":"jky_301290","last_run":"25","lbs":"140","number":"1","ofr":"75","owner":"J A Thompson & S Russell","owner_id":"own_1227828","performance_rating":"92","region":"USA","sex":"gelding","sex_code":"G","sire":"War Front","sire_id":"sir_4544750","speed_rating":"97","trainer":"John Ryan","trainer_id":"trn_160758"}],"sex_restriction":"","stalls":"","surface":"Turf","type":"Flat","weather":""}},"RacecardBasic":{"properties":{"race_id":{"type":"string","title":"Race Id"},"course":{"type":"string","title":"Course"},"date":{"type":"string","title":"Date"},"off_time":{"type":"string","title":"Off Time"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"race_name":{"type":"string","title":"Race Name"},"distance_f":{"type":"string","title":"Distance F"},"region":{"type":"string","title":"Region"},"pattern":{"type":"string","title":"Pattern"},"race_class":{"type":"string","title":"Race Class"},"type":{"type":"string","title":"Type"},"age_band":{"type":"string","title":"Age Band"},"rating_band":{"type":"string","title":"Rating Band"},"sex_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction","default":""},"prize":{"type":"string","title":"Prize"},"field_size":{"type":"string","title":"Field Size"},"going":{"type":"string","title":"Going"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"},"runners":{"items":{"$ref":"#/components/schemas/app__models__racecards__RunnerBasic"},"type":"array","title":"Runners"},"race_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Status","default":""}},"type":"object","required":["race_id","course","date","off_time","race_name","distance_f","region","pattern","race_class","type","age_band","rating_band","prize","field_size","going","surface","runners"],"title":"RacecardBasic","example":{"age_band":"4yo+","course":"Brighton","date":"2023-05-02","distance_f":"7.0","field_size":"9","going":"Good To Firm","off_dt":"2023-05-02T13:50:00+01:00","off_time":"1:50","pattern":"","prize":"£4,606","race_class":"Class 5","race_id":"rac_10880272","race_name":"At The Races App Form Study Apprentice Handicap","race_status":"","rating_band":"0-75","region":"GB","runners":[{"age":"6","colour":"b","dam":"Lerici","dam_id":"dam_4823441","damsire":"Woodman","damsire_id":"dsi_2126229","draw":"8","form":"3-7880","headgear":"","horse":"Pistoletto","horse_id":"hrs_18092480","jockey":"Adam Tracey(7)","jockey_id":"jky_301290","last_run":"25","lbs":"140","number":"1","ofr":"75","owner":"J A Thompson & S Russell","owner_id":"own_1227828","region":"USA","sex":"gelding","sex_code":"G","sire":"War Front","sire_id":"sir_4544750","trainer":"John Ryan","trainer_id":"trn_160758"}],"sex_restriction":"","surface":"Turf","type":"Flat"}},"RacecardOdds":{"properties":{"race_id":{"type":"string","title":"Race Id"},"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"date":{"type":"string","title":"Date"},"off_time":{"type":"string","title":"Off Time"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"race_name":{"type":"string","title":"Race Name"},"distance_round":{"type":"string","title":"Distance Round"},"distance":{"type":"string","title":"Distance"},"distance_f":{"type":"string","title":"Distance F"},"region":{"type":"string","title":"Region"},"pattern":{"type":"string","title":"Pattern"},"sex_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction","default":""},"race_class":{"type":"string","title":"Race Class"},"type":{"type":"string","title":"Type"},"age_band":{"type":"string","title":"Age Band"},"rating_band":{"type":"string","title":"Rating Band"},"prize":{"type":"string","title":"Prize"},"field_size":{"type":"string","title":"Field Size"},"going_detailed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Going Detailed"},"rail_movements":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rail Movements"},"stalls":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stalls"},"weather":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weather"},"going":{"type":"string","title":"Going"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"},"jumps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jumps","default":""},"runners":{"items":{"$ref":"#/components/schemas/app__models__racecards__RunnerOdds"},"type":"array","title":"Runners"},"big_race":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Big Race","default":false},"is_abandoned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Abandoned","default":false},"tip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tip","default":""},"verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict","default":""},"betting_forecast":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Betting Forecast","default":""},"race_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Status","default":""}},"type":"object","required":["race_id","course","course_id","date","off_time","race_name","distance_round","distance","distance_f","region","pattern","race_class","type","age_band","rating_band","prize","field_size","going_detailed","rail_movements","stalls","weather","going","surface","runners"],"title":"RacecardOdds","example":{"age_band":"4yo+","big_race":false,"course":"Brighton","course_id":"crs_182","date":"2023-05-02","distance":"6f210y","distance_f":"7.0","distance_round":"7f","field_size":"9","going":"Good To Firm","going_detailed":"","is_abandoned":false,"jumps":"","off_dt":"2023-05-02T13:50:00+01:00","off_time":"1:50","pattern":"","prize":"£4,606","race_class":"Class 5","race_id":"rac_10880272","race_name":"At The Races App Form Study Apprentice Handicap","race_status":"","rating_band":"0-75","region":"GB","runners":[{"age":"6","breeder":"Tada Nobutaka","colour":"b","comment":"Course-and-distance form; acts on the ground and is a leading player on these terms.","dam":"Lerici","dam_id":"dam_4823441","dam_region":"USA","damsire":"Woodman","damsire_id":"dsi_2126229","damsire_region":"USA","dob":"2017-04-22","draw":"8","form":"3-7880","headgear":"","headgear_run":"","horse":"Pistoletto","horse_id":"hrs_18092480","jockey":"Adam Tracey(7)","jockey_id":"jky_301290","last_run":"25","lbs":"140","medical":[],"number":"1","odds":[{"bookmaker":"Bet365","decimal":"9","ew_denom":"5","ew_places":"3","fractional":"8","updated":"2023-05-02 12:36:43"},{"bookmaker":"Paddy Power","decimal":"8.5","ew_denom":"5","ew_places":"3","fractional":"15/2","updated":"2023-05-02 12:36:43"}],"ofr":"75","owner":"J A Thompson & S Russell","owner_id":"own_1227828","past_results_flags":[],"performance_rating":"92","prev_owners":[{"change_date":"2021-08-07","owner":"G McGladery, J A Thompson & S Russell","owner_id":"own_1191676"}],"prev_trainers":[{"change_date":"2020-09-26","trainer":"A P O'Brien","trainer_id":"trn_71802"}],"region":"USA","sex":"gelding","sex_code":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"War Front","sire_id":"sir_4544750","sire_region":"USA","speed_rating":"97","trainer":"John Ryan","trainer_14_days":{"percent":"0","runs":"5","wins":"0"},"trainer_id":"trn_160758","trainer_location":"Newmarket, Suffolk","trainer_rtf":"","wind_surgery":"","wind_surgery_run":""}],"sex_restriction":"","stalls":"","surface":"Turf","tip":"Pistoletto","type":"Flat","verdict":"Pistoletto sets the standard on these terms and is taken to confirm the pick of his form.","weather":""}},"RacecardOddsPro":{"properties":{"race_id":{"type":"string","title":"Race Id"},"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"date":{"type":"string","title":"Date"},"off_time":{"type":"string","title":"Off Time"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"race_name":{"type":"string","title":"Race Name"},"distance_round":{"type":"string","title":"Distance Round"},"distance":{"type":"string","title":"Distance"},"distance_f":{"type":"string","title":"Distance F"},"region":{"type":"string","title":"Region"},"pattern":{"type":"string","title":"Pattern"},"sex_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction","default":""},"race_class":{"type":"string","title":"Race Class"},"type":{"type":"string","title":"Type"},"age_band":{"type":"string","title":"Age Band"},"rating_band":{"type":"string","title":"Rating Band"},"prize":{"type":"string","title":"Prize"},"field_size":{"type":"string","title":"Field Size"},"going_detailed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Going Detailed"},"rail_movements":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rail Movements"},"stalls":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stalls"},"weather":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weather"},"going":{"type":"string","title":"Going"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"},"jumps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jumps","default":""},"runners":{"items":{"$ref":"#/components/schemas/RunnerOddsPro"},"type":"array","title":"Runners"},"big_race":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Big Race","default":false},"is_abandoned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Abandoned","default":false},"tip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tip","default":""},"verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict","default":""},"betting_forecast":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Betting Forecast","default":""},"race_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Status","default":""}},"type":"object","required":["race_id","course","course_id","date","off_time","race_name","distance_round","distance","distance_f","region","pattern","race_class","type","age_band","rating_band","prize","field_size","going_detailed","rail_movements","stalls","weather","going","surface","runners"],"title":"RacecardOddsPro","example":{"age_band":"3yo+","big_race":false,"course":"Sha Tin","course_id":"crs_10816","date":"2026-01-11","distance":"6f","distance_f":"6.0","distance_round":"6f","field_size":"12","going":"Good","going_detailed":"TURF: GOOD TO FIRM","is_abandoned":false,"jumps":"","off_dt":"2026-01-11T05:00:00+00:00","off_time":"5:00","pattern":"","prize":"£62,459","race_class":"","race_id":"rac_11845223","race_name":"Wu Kai Sha Handicap (Div I) (Class 4) (3yo+) (Course C+3) (Turf)","race_status":"","rating_band":"","region":"HK","runners":[{"age":"9","breeder":"Scea Haras De Saint Pair","colour":"b/br","comment":"Below his best of late but the yard is in form; capable of better on a going day.","dam":"Trois Lunes","dam_id":"dam_5583571","dam_region":"FR","damsire":"Manduro","damsire_id":"dsi_4247215","damsire_region":"GER","dob":"2014-02-27","draw":"9","form":"60500-","headgear":"","headgear_run":"","horse":"Trais Fluors","horse_id":"hrs_8192583","jockey":"Rose Dawes(5)","jockey_id":"jky_301152","last_run":"192","lbs":"139","medical":[],"number":"2","odds":[{"bookmaker":"Bet365","decimal":"4.33","ew_denom":"5","ew_places":"3","fractional":"10/3","history":[],"updated":"2023-05-02 12:36:43"},{"bookmaker":"Betfair Exchange","decimal":"4.5","ew_denom":"","ew_places":"","fractional":"7/2","history":[],"updated":"2023-05-02 12:36:43"}],"ofr":"74","owner":"M Channon","owner_id":"own_31504","past_results_flags":[],"performance_rating":"88","prev_owners":[{"change_date":"2021-09-06","owner":"Lee Harris","owner_id":"own_1182044"},{"change_date":"2021-03-22","owner":"Robert Ng","owner_id":"own_466920"}],"prev_trainers":[{"change_date":"2023-03-24","trainer":"Mick Channon","trainer_id":"trn_42084"},{"change_date":"2021-03-22","trainer":"K J Condon","trainer_id":"trn_137160"},{"change_date":"2019-10-23","trainer":"A Fabre","trainer_id":"trn_9837"}],"region":"GB","sex":"gelding","sex_code":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"Dansili","sire_id":"sir_3527125","sire_region":"GB","speed_rating":"95","trainer":"Jack Channon","trainer_14_days":{"percent":"31","runs":"16","wins":"5"},"trainer_id":"trn_361449","trainer_location":"West Ilsley, Berks","trainer_rtf":"71","wind_surgery":"","wind_surgery_run":""}],"sex_restriction":"","stalls":"","surface":"Turf","tip":"Trais Fluors","type":"Flat","verdict":"Trais Fluors looks well treated on these terms and is taken to outpoint the in-form rivals.","weather":""}},"RacecardSummary":{"properties":{"date":{"type":"string","title":"Date"},"region":{"type":"string","title":"Region"},"course_id":{"type":"string","title":"Course Id"},"course":{"type":"string","title":"Course"},"race_id":{"type":"string","title":"Race Id"},"race_name":{"type":"string","title":"Race Name"},"race_class":{"type":"string","title":"Race Class"},"off_time":{"type":"string","title":"Off Time"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"big_race":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Big Race","default":false},"is_abandoned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Abandoned","default":false}},"type":"object","required":["date","region","course_id","course","race_id","race_name","race_class","off_time"],"title":"RacecardSummary","example":{"big_race":false,"course":"Bahrain","course_id":"crs_22594","date":"2026-02-06","is_abandoned":false,"off_dt":"2026-02-06T14:00:00+00:00","off_time":"2:00","race_class":"","race_id":"rac_11868129","race_name":"Race 3 (Conditions Race) (Turf)","region":"BHR"}},"RacecardsBasicPage":{"properties":{"racecards":{"items":{"$ref":"#/components/schemas/RacecardBasic"},"type":"array","title":"Racecards"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["racecards","total","limit","skip","query"],"title":"RacecardsBasicPage"},"RacecardsOddsPage":{"properties":{"racecards":{"items":{"$ref":"#/components/schemas/RacecardOdds"},"type":"array","title":"Racecards"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["racecards","total","limit","skip","query"],"title":"RacecardsOddsPage"},"RacecardsOddsProPage":{"properties":{"racecards":{"items":{"$ref":"#/components/schemas/RacecardOddsPro"},"type":"array","title":"Racecards"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["racecards","total","limit","skip","query"],"title":"RacecardsOddsProPage"},"RacecardsPage":{"properties":{"racecards":{"items":{"$ref":"#/components/schemas/Racecard"},"type":"array","title":"Racecards"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["racecards","total","limit","skip","query"],"title":"RacecardsPage"},"RacecardsSummary":{"properties":{"racecard_summaries":{"items":{"$ref":"#/components/schemas/RacecardSummary"},"type":"array","title":"Racecard Summaries"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["racecard_summaries","query"],"title":"RacecardsSummary","example":{"query":[["date","2026-02-06"]],"racecard_summaries":[{"big_race":false,"course":"Bahrain","course_id":"crs_22594","date":"2026-02-06","is_abandoned":false,"off_dt":"2026-02-06T14:00:00+00:00","off_time":"2:00","race_class":"","race_id":"rac_11868129","race_name":"Race 3 (Conditions Race) (Turf)","region":"BHR"},{"big_race":false,"course":"Bangor-on-Dee","course_id":"crs_104","date":"2026-02-06","is_abandoned":true,"off_dt":"2026-02-06T13:25:00+00:00","off_time":"1:25","race_class":"Class 4","race_id":"rac_62443901","race_name":"Alfa Aggregates Products Mares' Handicap Chase","region":"GB"}]}},"Races":{"properties":{"races":{"items":{"$ref":"#/components/schemas/app__models__aus_races__Race"},"type":"array","title":"Races"}},"type":"object","required":["races"],"title":"Races","example":{"races":[{"class":"2YO Plate","course":"Ascot","course_id":"crs_aus_712388980373","date":"2025-10-11","distance":"1000m","going":"Good","is_jump_out":false,"is_trial":false,"meet_id":"met_aus_604899110256","off_time":"2025-10-11T04:00:00.000Z","prize_total":"80000.00","prizes":[{"Position":1,"Value":"43840.00"},{"Position":2,"Value":"14880.00"}],"race_group":"ungrouped","race_name":"VALE LINDSAY SEVERN PLATE","race_number":"1","race_status":"Results","runners":[{"age":"2","colour":"Chestnut","comment":"Jumped Ok Went Forward to Lead but Two Wide quickened approaching Straight","dam":"Poker Face","dam_id":"dam_aus_5763901272","draw":"8","form":"1","horse":"All On Red","horse_id":"hrs_aus_985106802693","jockey":"L.M.Campbell","jockey_claim":"0","jockey_id":"jky_aus_382285552310","number":"1","odds":[{"bookmaker":"Sportsbet","place_odds":"1.70","win_odds":"5.00"},{"bookmaker":"Ladbrokes","place_odds":"1.70","win_odds":"5.00"}],"owner":"T B Racing Pty Ltd (T Noske), T Shutterworth, S Mcfarlane, G White","position":"1","prize":"43840","scratched":false,"sex":"Colt","silk_url":"https://www.url-for-silk.com/svg/456789.svg","sire":"Doubtland","sire_id":"sir_aus_767094969190","sp":"5.00","stats":{"career_place_percent":"100%","career_prize":"$65,840","career_win_percent":"100%","course_distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"course_stats":{"first":"1","second":"0","third":"0","total":"1"},"distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"ground_firm_stats":{"first":"0","second":"0","third":"0","total":"0"},"ground_good_stats":{"first":"1","second":"0","third":"0","total":"1"},"jockey_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_raced":"2025-10-11","last_ten_races_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_twelve_months_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_won":"2025-10-11","max_winning_distance":"1000m","min_winning_distance":"1000m"},"trainer":"Daniel Morton","trainer_id":"trn_aus_449779200413","weight":"57.0"}],"state":"WA","winning_time":"58.47","winning_time_hundredths":"5847"}]}},"Region":{"properties":{"region":{"type":"string","title":"Region"},"region_code":{"type":"string","title":"Region Code"}},"type":"object","required":["region","region_code"],"title":"Region","example":{"region":"Great Britain","region_code":"gb"}},"ResultBasic":{"properties":{"race_id":{"type":"string","title":"Race Id"},"date":{"type":"string","title":"Date"},"region":{"type":"string","title":"Region"},"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"off":{"type":"string","title":"Off"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"race_name":{"type":"string","title":"Race Name"},"type":{"type":"string","title":"Type"},"class":{"type":"string","title":"Class"},"pattern":{"type":"string","title":"Pattern"},"rating_band":{"type":"string","title":"Rating Band"},"age_band":{"type":"string","title":"Age Band"},"sex_rest":{"type":"string","title":"Sex Rest"},"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"going":{"type":"string","title":"Going"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface","default":""},"jumps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jumps","default":""},"runners":{"items":{"$ref":"#/components/schemas/app__models__result__RunnerBasic"},"type":"array","title":"Runners"},"winning_time_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winning Time Detail","default":""},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments","default":""},"non_runners":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Non Runners","default":""},"tote_win":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Win","default":""},"tote_pl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Pl","default":""},"tote_ex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Ex","default":""},"tote_csf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Csf","default":""},"tote_tricast":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Tricast","default":""},"tote_trifecta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Trifecta","default":""}},"type":"object","required":["race_id","date","region","course","course_id","off","race_name","type","class","pattern","rating_band","age_band","sex_rest","dist","dist_y","dist_m","dist_f","going","runners"],"title":"ResultBasic","example":{"age_band":"4yo+","class":"","comments":"","course":"Ballinrobe (IRE)","course_id":"crs_4550","date":"2025-08-11","dist":"2m7f","dist_f":"23f","dist_m":"4625","dist_y":"5058","going":"Good","jumps":"12 hurdles","non_runners":"Diamonds Diva (reserve), Great Rainbow (reserve), Loughrask Rainbow (reserve)","off":"8:25","off_dt":"2025-08-11T20:25:00+01:00","pattern":"","race_id":"rac_11715730","race_name":"J.J. Burke Peugeot Handicap Hurdle","rating_band":"0-100","region":"IRE","runners":[{"age":"8","btn":"0","dam":"Save Me The Waltz (FR)","dam_id":"dam_4189605","damsire":"Halling","damsire_id":"dsi_675241","draw":"","headgear":"v","horse":"Mephisto (IRE)","horse_id":"hrs_19359270","jockey":"Shane Fitzgerald","jockey_claim_lbs":"0","jockey_id":"jky_302916","number":"2","or":"98","ovr_btn":"0","owner":"Restricted Movement Syndicate","owner_id":"own_1204876","performance_rating":"80","position":"1","prize":"€5900","sex":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"Kendargent (FR)","sire_id":"sir_4514419","sp":"15/2","sp_dec":"8.50","speed_rating":"95","time":"5:44.90","trainer":"Gerard Keane","trainer_id":"trn_86382","weight":"11-12","weight_lbs":"166"}],"sex_rest":"","surface":"Turf","tote_csf":"€300.55","tote_ex":"€253.10","tote_pl":"€2.30 €5.80 €4.20","tote_tricast":"€5228.29","tote_trifecta":"","tote_win":"€8.50","type":"Hurdle","winning_time_detail":"5m 44.90s (slow by 7.90s)"}},"ResultFree":{"properties":{"race_id":{"type":"string","title":"Race Id"},"course":{"type":"string","title":"Course"},"date":{"type":"string","title":"Date"},"off":{"type":"string","title":"Off"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"race_name":{"type":"string","title":"Race Name"},"dist_f":{"type":"string","title":"Dist F"},"region":{"type":"string","title":"Region"},"pattern":{"type":"string","title":"Pattern"},"class":{"type":"string","title":"Class"},"type":{"type":"string","title":"Type"},"age_band":{"type":"string","title":"Age Band"},"rating_band":{"type":"string","title":"Rating Band"},"sex_rest":{"type":"string","title":"Sex Rest"},"going":{"type":"string","title":"Going"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface","default":""},"runners":{"items":{"$ref":"#/components/schemas/RunnerFree"},"type":"array","title":"Runners"}},"type":"object","required":["race_id","course","date","off","race_name","dist_f","region","pattern","class","type","age_band","rating_band","sex_rest","going","runners"],"title":"ResultFree","example":{"age_band":"4yo+","class":"","course":"Ballinrobe (IRE)","date":"2025-08-11","dist_f":"23f","going":"Good","off":"8:25","off_dt":"2025-08-11T20:25:00+01:00","pattern":"","race_id":"rac_11715730","race_name":"J.J. Burke Peugeot Handicap Hurdle","rating_band":"0-100","region":"IRE","runners":[{"age":"8","dam":"Save Me The Waltz (FR)","dam_id":"dam_4189605","damsire":"Halling","damsire_id":"dsi_675241","draw":"","headgear":"v","horse":"Mephisto (IRE)","horse_id":"hrs_19359270","jockey":"Shane Fitzgerald","jockey_id":"jky_302916","number":"2","or":"98","owner":"Restricted Movement Syndicate","owner_id":"own_1204876","position":"1","sex":"G","sire":"Kendargent (FR)","sire_id":"sir_4514419","trainer":"Gerard Keane","trainer_id":"trn_86382","weight":"11-12","weight_lbs":"166"}],"sex_rest":"","surface":"Turf","type":"Hurdle"}},"ResultStandard":{"properties":{"race_id":{"type":"string","title":"Race Id"},"date":{"type":"string","title":"Date"},"region":{"type":"string","title":"Region"},"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"off":{"type":"string","title":"Off"},"off_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Dt","default":""},"race_name":{"type":"string","title":"Race Name"},"type":{"type":"string","title":"Type"},"class":{"type":"string","title":"Class"},"pattern":{"type":"string","title":"Pattern"},"rating_band":{"type":"string","title":"Rating Band"},"age_band":{"type":"string","title":"Age Band"},"sex_rest":{"type":"string","title":"Sex Rest"},"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"going":{"type":"string","title":"Going"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface","default":""},"jumps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jumps","default":""},"runners":{"items":{"$ref":"#/components/schemas/RunnerStandard"},"type":"array","title":"Runners"},"winning_time_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winning Time Detail","default":""},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments","default":""},"non_runners":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Non Runners","default":""},"tote_win":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Win","default":""},"tote_pl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Pl","default":""},"tote_ex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Ex","default":""},"tote_csf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Csf","default":""},"tote_tricast":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Tricast","default":""},"tote_trifecta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Trifecta","default":""}},"type":"object","required":["race_id","date","region","course","course_id","off","race_name","type","class","pattern","rating_band","age_band","sex_rest","dist","dist_y","dist_m","dist_f","going","runners"],"title":"ResultStandard","example":{"age_band":"4yo+","class":"","comments":"","course":"Ballinrobe (IRE)","course_id":"crs_4550","date":"2025-08-11","dist":"2m7f","dist_f":"23f","dist_m":"4625","dist_y":"5058","going":"Good","jumps":"12 hurdles","non_runners":"Diamonds Diva (reserve), Great Rainbow (reserve), Loughrask Rainbow (reserve)","off":"8:25","off_dt":"2025-08-11T20:25:00+01:00","pattern":"","race_id":"rac_11715730","race_name":"J.J. Burke Peugeot Handicap Hurdle","rating_band":"0-100","region":"IRE","runners":[{"age":"8","bsp":"11.26","btn":"0","dam":"Save Me The Waltz (FR)","dam_id":"dam_4189605","damsire":"Halling","damsire_id":"dsi_675241","draw":"","headgear":"v","horse":"Mephisto (IRE)","horse_id":"hrs_19359270","jockey":"Shane Fitzgerald","jockey_claim_lbs":"0","jockey_id":"jky_302916","number":"2","or":"98","ovr_btn":"0","owner":"Restricted Movement Syndicate","owner_id":"own_1204876","performance_rating":"80","position":"1","prize":"€5900","sex":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"Kendargent (FR)","sire_id":"sir_4514419","sp":"15/2","sp_dec":"8.50","speed_rating":"95","time":"5:44.90","trainer":"Gerard Keane","trainer_id":"trn_86382","weight":"11-12","weight_lbs":"166"}],"sex_rest":"","surface":"Turf","tote_csf":"€300.55","tote_ex":"€253.10","tote_pl":"€2.30 €5.80 €4.20","tote_tricast":"€5228.29","tote_trifecta":"","tote_win":"€8.50","type":"Hurdle","winning_time_detail":"5m 44.90s (slow by 7.90s)"}},"Results":{"properties":{"meet_id":{"type":"string","title":"Meet Id"},"track_id":{"type":"string","title":"Track Id"},"track_name":{"type":"string","title":"Track Name"},"country":{"type":"string","title":"Country"},"date":{"type":"string","title":"Date"},"races":{"anyOf":[{"items":{"$ref":"#/components/schemas/app__models__na_results__Race"},"type":"array"},{"type":"null"}],"title":"Races"},"weather":{"anyOf":[{"$ref":"#/components/schemas/app__models__na_results__Weather"},{"type":"null"}]}},"type":"object","required":["meet_id","track_id","track_name","country","date"],"title":"Results","example":{"country":"USA","date":"2026-02-01","meet_id":"FG_1769922000000","races":[{"age_restriction":"3U","age_restriction_description":"3 Year Olds And Up","also_ran":"Catchin Drama, Righteous Freedom and Grand Encore","breed":"Thoroughbred","distance_description":"6 Furlongs","distance_unit":"F","distance_value":6,"fraction":{"fraction_1":{"hundredths":60,"minutes":0,"seconds":22,"time_in_hundredths":":22.60"},"fraction_2":{"hundredths":18,"minutes":0,"seconds":46,"time_in_hundredths":":46.18"},"fraction_3":{"hundredths":98,"minutes":0,"seconds":57,"time_in_hundredths":":57.98"},"winning_time":{"hundredths":87,"minutes":1,"seconds":10,"time_in_hundredths":"1:10.87"}},"grade":"","maximum_claim_price":"5000.0000","minimum_claim_price":"5,000","off_time":1769967900000,"payoffs":[{"base_amount":0.0,"carryover":0.0,"number_of_rights":0,"number_of_tickets_bet":100,"payoff_amount":"2.40","total_pool":"75,589.00","wager_name":"Exacta","wager_type":"E","winning_numbers":"1-4"}],"post_time":"1:45 PM","post_time_long":1769967900000,"race_class":"CLAIMING($5,000)","race_key":{"day_evening":"D","race_number":"1"},"race_name":"","race_restriction":"S","race_restriction_description":"State Bred","race_type":"CLM","race_type_description":"CLAIMING","runners":[{"breeder_name":"Brittlyn Inc","horse_name":"Louisiana Wildlife","jockey_first_name":"Paco","jockey_first_name_initial":"P","jockey_last_name":"Lopez","owner_first_name":"","owner_last_name":"Lovern, Jason and Lovern, Pamela Belk","place_payoff":2.1,"program_number":"1","program_number_stripped":1,"show_payoff":2.1,"sire_name":"Star Guitar","trainer_first_name":"Antonio","trainer_last_name":"Alberto","weight_carried":"122","win_payoff":3.0}],"scratches":["Gypsy Squall","Lacey's Kat"],"sex_restriction":"","sex_restriction_description":"Open","surface":"D","surface_description":"Dirt","time_zone":"C","total_purse":"14,000","track_condition_description":"Fast","track_name":"FAIR GROUNDS","wager_types":[{"base_amount":"1.00","wager_description":"Exacta","wager_type":"E"}]}],"track_id":"FG","track_name":"Fair Grounds","weather":{"current_temperature":"52","current_weather_description":"Partly Cloudy","date":"2026-02-01","forecast_high":"58","forecast_low":"42","forecast_precipitation":"10","forecast_weather_description":"Mostly Sunny"}}},"ResultsBasicPage":{"properties":{"results":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResultBasic"},"type":"array"},{"type":"null"}],"title":"Results"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["results","total","limit","skip","query"],"title":"ResultsBasicPage"},"ResultsFreePage":{"properties":{"results":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResultFree"},"type":"array"},{"type":"null"}],"title":"Results"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["results","total","limit","skip","query"],"title":"ResultsFreePage"},"ResultsStandardPage":{"properties":{"results":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResultStandard"},"type":"array"},{"type":"null"}],"title":"Results"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["results","total","limit","skip","query"],"title":"ResultsStandardPage"},"RunnerFree":{"properties":{"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"age":{"type":"string","title":"Age"},"sex":{"type":"string","title":"Sex"},"number":{"type":"string","title":"Number"},"position":{"type":"string","title":"Position"},"draw":{"type":"string","title":"Draw"},"weight":{"type":"string","title":"Weight"},"weight_lbs":{"type":"string","title":"Weight Lbs"},"headgear":{"type":"string","title":"Headgear"},"or":{"type":"string","title":"Or"},"jockey":{"type":"string","title":"Jockey"},"jockey_id":{"type":"string","title":"Jockey Id"},"trainer":{"type":"string","title":"Trainer"},"trainer_id":{"type":"string","title":"Trainer Id"},"owner":{"type":"string","title":"Owner"},"owner_id":{"type":"string","title":"Owner Id"},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"}},"type":"object","required":["horse_id","horse","age","sex","number","position","draw","weight","weight_lbs","headgear","or","jockey","jockey_id","trainer","trainer_id","owner","owner_id","sire","sire_id","dam","dam_id","damsire","damsire_id"],"title":"RunnerFree","example":{"age":"8","dam":"Save Me The Waltz (FR)","dam_id":"dam_4189605","damsire":"Halling","damsire_id":"dsi_675241","draw":"","headgear":"v","horse":"Mephisto (IRE)","horse_id":"hrs_19359270","jockey":"Shane Fitzgerald","jockey_id":"jky_302916","number":"2","or":"98","owner":"Restricted Movement Syndicate","owner_id":"own_1204876","position":"1","sex":"G","sire":"Kendargent (FR)","sire_id":"sir_4514419","trainer":"Gerard Keane","trainer_id":"trn_86382","weight":"11-12","weight_lbs":"166"}},"RunnerMedical":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","default":""},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","default":""}},"type":"object","title":"RunnerMedical","example":{"date":"2024-06-15","type":"Wind surgery"}},"RunnerOddsPro":{"properties":{"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dob"},"age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"sex_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Code"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colour"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"breeder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Breeder"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"dam_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Region","default":""},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"sire_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Region","default":""},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"},"damsire_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damsire Region","default":""},"trainer":{"type":"string","title":"Trainer"},"trainer_id":{"type":"string","title":"Trainer Id"},"trainer_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Location","default":""},"trainer_14_days":{"anyOf":[{"$ref":"#/components/schemas/RunnerTrainer14Days"},{"type":"null"}],"default":{}},"owner":{"type":"string","title":"Owner"},"owner_id":{"type":"string","title":"Owner Id"},"prev_trainers":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerPrevTrainer"},"type":"array"},{"type":"null"}],"title":"Prev Trainers","default":[]},"prev_owners":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerPrevOwner"},"type":"array"},{"type":"null"}],"title":"Prev Owners","default":[]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","default":""},"spotlight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spotlight","default":""},"quotes":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerQuote"},"type":"array"},{"type":"null"}],"title":"Quotes","default":[]},"stable_tour":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerStableTour"},"type":"array"},{"type":"null"}],"title":"Stable Tour","default":[]},"medical":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerMedical"},"type":"array"},{"type":"null"}],"title":"Medical","default":[]},"number":{"type":"string","title":"Number"},"draw":{"type":"string","title":"Draw"},"headgear":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headgear","default":""},"headgear_run":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headgear Run","default":""},"wind_surgery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wind Surgery","default":""},"wind_surgery_run":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wind Surgery Run","default":""},"past_results_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Past Results Flags","default":[]},"lbs":{"type":"string","title":"Lbs"},"ofr":{"type":"string","title":"Ofr"},"rpr":{"type":"string","title":"Rpr"},"ts":{"type":"string","title":"Ts"},"performance_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performance Rating","default":""},"speed_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed Rating","default":""},"jockey":{"type":"string","title":"Jockey"},"jockey_id":{"type":"string","title":"Jockey Id"},"silk_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Silk Url","default":""},"last_run":{"type":"string","title":"Last Run"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"trainer_rtf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Rtf"},"odds":{"anyOf":[{"items":{"$ref":"#/components/schemas/OddsHistory"},"type":"array"},{"type":"null"}],"title":"Odds","default":[]}},"type":"object","required":["horse_id","horse","dob","age","sex","sex_code","colour","region","breeder","dam","dam_id","sire","sire_id","damsire","damsire_id","trainer","trainer_id","owner","owner_id","number","draw","lbs","ofr","rpr","ts","jockey","jockey_id","last_run","form","trainer_rtf"],"title":"RunnerOddsPro","example":{"age":"9","breeder":"Scea Haras De Saint Pair","colour":"b/br","comment":"Below his best of late but the yard is in form; capable of better on a going day.","dam":"Trois Lunes","dam_id":"dam_5583571","dam_region":"FR","damsire":"Manduro","damsire_id":"dsi_4247215","damsire_region":"GER","dob":"2014-02-27","draw":"9","form":"60500-","headgear":"","headgear_run":"","horse":"Trais Fluors","horse_id":"hrs_8192583","jockey":"Rose Dawes(5)","jockey_id":"jky_301152","last_run":"192","lbs":"139","medical":[],"number":"2","odds":[{"bookmaker":"Bet365","decimal":"4.33","ew_denom":"5","ew_places":"3","fractional":"10/3","history":[],"updated":"2023-05-02 12:36:43"},{"bookmaker":"Betfair Exchange","decimal":"4.5","ew_denom":"","ew_places":"","fractional":"7/2","history":[],"updated":"2023-05-02 12:36:43"}],"ofr":"74","owner":"M Channon","owner_id":"own_31504","past_results_flags":[],"performance_rating":"88","prev_owners":[{"change_date":"2021-09-06","owner":"Lee Harris","owner_id":"own_1182044"},{"change_date":"2021-03-22","owner":"Robert Ng","owner_id":"own_466920"}],"prev_trainers":[{"change_date":"2023-03-24","trainer":"Mick Channon","trainer_id":"trn_42084"},{"change_date":"2021-03-22","trainer":"K J Condon","trainer_id":"trn_137160"},{"change_date":"2019-10-23","trainer":"A Fabre","trainer_id":"trn_9837"}],"region":"GB","sex":"gelding","sex_code":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"Dansili","sire_id":"sir_3527125","sire_region":"GB","speed_rating":"95","trainer":"Jack Channon","trainer_14_days":{"percent":"31","runs":"16","wins":"5"},"trainer_id":"trn_361449","trainer_location":"West Ilsley, Berks","trainer_rtf":"71","wind_surgery":"","wind_surgery_run":""}},"RunnerPrevOwner":{"properties":{"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner","default":""},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id","default":""},"change_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Date","default":""}},"type":"object","title":"RunnerPrevOwner","example":{"change_date":"2024-01-15","owner":"Previous Racing Ltd","owner_id":"own_123456"}},"RunnerPrevTrainer":{"properties":{"trainer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer","default":""},"trainer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Id","default":""},"change_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Date","default":""}},"type":"object","title":"RunnerPrevTrainer","example":{"change_date":"2024-03-01","trainer":"John Smith","trainer_id":"trn_123456"}},"RunnerQuote":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","default":""},"horse":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Horse","default":""},"horse_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Horse Id","default":""},"race":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race","default":""},"race_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Id","default":""},"course":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course","default":""},"course_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course Id","default":""},"distance_f":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance F","default":""},"distance_y":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance Y","default":""},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote","default":""}},"type":"object","title":"RunnerQuote","example":{"course":"Ascot","course_id":"crs_52","date":"2024-06-15","distance_f":"12f","distance_y":"2640","horse":"Frankel","horse_id":"hrs_5344171","quote":"He ran a great race and showed his class.","race":"King George VI","race_id":"rac_12345678"}},"RunnerStableTour":{"properties":{"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote","default":""}},"type":"object","title":"RunnerStableTour","example":{"quote":"He's been working well at home and we're hopeful."}},"RunnerStandard":{"properties":{"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"sp":{"type":"string","title":"Sp"},"sp_dec":{"type":"string","title":"Sp Dec"},"bsp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bsp","default":""},"number":{"type":"string","title":"Number"},"position":{"type":"string","title":"Position"},"draw":{"type":"string","title":"Draw"},"btn":{"type":"string","title":"Btn"},"ovr_btn":{"type":"string","title":"Ovr Btn"},"age":{"type":"string","title":"Age"},"sex":{"type":"string","title":"Sex"},"weight":{"type":"string","title":"Weight"},"weight_lbs":{"type":"string","title":"Weight Lbs"},"headgear":{"type":"string","title":"Headgear"},"time":{"type":"string","title":"Time"},"or":{"type":"string","title":"Or"},"rpr":{"type":"string","title":"Rpr"},"tsr":{"type":"string","title":"Tsr"},"prize":{"type":"string","title":"Prize"},"jockey":{"type":"string","title":"Jockey"},"jockey_claim_lbs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey Claim Lbs","default":"0"},"jockey_id":{"type":"string","title":"Jockey Id"},"trainer":{"type":"string","title":"Trainer"},"trainer_id":{"type":"string","title":"Trainer Id"},"owner":{"type":"string","title":"Owner"},"owner_id":{"type":"string","title":"Owner Id"},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"},"comment":{"type":"string","title":"Comment"},"silk_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Silk Url","default":""},"performance_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performance Rating","default":""},"speed_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed Rating","default":""}},"type":"object","required":["horse_id","horse","sp","sp_dec","number","position","draw","btn","ovr_btn","age","sex","weight","weight_lbs","headgear","time","or","rpr","tsr","prize","jockey","jockey_id","trainer","trainer_id","owner","owner_id","sire","sire_id","dam","dam_id","damsire","damsire_id","comment"],"title":"RunnerStandard","example":{"age":"8","bsp":"11.26","btn":"0","dam":"Save Me The Waltz (FR)","dam_id":"dam_4189605","damsire":"Halling","damsire_id":"dsi_675241","draw":"","headgear":"v","horse":"Mephisto (IRE)","horse_id":"hrs_19359270","jockey":"Shane Fitzgerald","jockey_claim_lbs":"0","jockey_id":"jky_302916","number":"2","or":"98","ovr_btn":"0","owner":"Restricted Movement Syndicate","owner_id":"own_1204876","performance_rating":"80","position":"1","prize":"€5900","sex":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"Kendargent (FR)","sire_id":"sir_4514419","sp":"15/2","sp_dec":"8.50","speed_rating":"95","time":"5:44.90","trainer":"Gerard Keane","trainer_id":"trn_86382","weight":"11-12","weight_lbs":"166"}},"RunnerStats":{"properties":{"career_prize":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Career Prize"},"career_win_percent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Career Win Percent"},"career_place_percent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Career Place Percent"},"course_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"course_distance_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"distance_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"ground_firm_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"ground_good_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"ground_heavy_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"ground_soft_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"ground_aw_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"jockey_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"jumps_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"last_raced":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Raced"},"last_ten_races_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"last_twelve_months_stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStatsBreakdown"},{"type":"null"}]},"last_won":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Won"},"max_winning_distance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Winning Distance"},"min_winning_distance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Winning Distance"}},"type":"object","title":"RunnerStats","example":{"career_place_percent":"100%","career_prize":"$65,840","career_win_percent":"100%","course_distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"course_stats":{"first":"1","second":"0","third":"0","total":"1"},"distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"ground_firm_stats":{"first":"0","second":"0","third":"0","total":"0"},"ground_good_stats":{"first":"1","second":"0","third":"0","total":"1"},"jockey_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_raced":"2025-10-11","last_ten_races_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_twelve_months_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_won":"2025-10-11","max_winning_distance":"1000m","min_winning_distance":"1000m"}},"RunnerStatsBreakdown":{"properties":{"total":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total"},"first":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First"},"second":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Second"},"third":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Third"}},"type":"object","title":"RunnerStatsBreakdown","example":{"first":"2","second":"1","third":"1","total":"5"}},"RunnerTrainer14Days":{"properties":{"runs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runs","default":""},"wins":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wins","default":""},"percent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Percent","default":""}},"type":"object","title":"RunnerTrainer14Days","example":{"percent":"20","runs":"25","wins":"5"}},"Sire":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","name"],"title":"Sire","example":{"id":"sir_5344171","name":"Frankel (GB)"}},"SireClassAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"sire":{"type":"string","title":"Sire"},"total_runners":{"type":"integer","title":"Total Runners"},"classes":{"items":{"$ref":"#/components/schemas/app__models__sires__Class"},"type":"array","title":"Classes"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","sire","total_runners","classes","query"],"title":"SireClassAnalysis","example":{"classes":[{"1_pl":-35.97,"1st":15,"2nd":23,"3rd":24,"4th":27,"a/e":0.53,"class":"Class 2","runners":225,"win_%":0.07},{"1_pl":-5.0,"1st":7,"2nd":10,"3rd":9,"4th":12,"a/e":0.79,"class":"Class 1","runners":78,"win_%":0.09}],"id":"sir_5245191","query":[["race_class","class_1"],["race_class","class_2"],["sire_id","sir_5245191"]],"sire":"Excelebration (IRE)","total_runners":303}},"SireDistanceAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"sire":{"type":"string","title":"Sire"},"total_runners":{"type":"integer","title":"Total Runners"},"distances":{"items":{"$ref":"#/components/schemas/app__models__sires__Distance"},"type":"array","title":"Distances"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","sire","total_runners","distances","query"],"title":"SireDistanceAnalysis","example":{"distances":[{"1_pl":5.83,"1st":4,"2nd":10,"3rd":5,"4th":5,"a/e":0.45,"dist":"7f","dist_f":"7f","dist_m":"1400.0","dist_y":"1540","runners":75,"win_%":0.05}],"id":"sir_5245191","query":[["sire_id","sir_5245191"]],"sire":"Excelebration (IRE)","total_runners":303}},"Sires":{"properties":{"search_results":{"items":{"$ref":"#/components/schemas/Sire"},"type":"array","title":"Search Results"}},"type":"object","required":["search_results"],"title":"Sires","example":{"search_results":[{"id":"sir_5344171","name":"Frankel (GB)"},{"id":"sir_3722383","name":"Galileo (IRE)"}]}},"TimeData":{"properties":{"minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minutes"},"seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds"},"hundredths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hundredths"},"milliseconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Milliseconds"},"fifths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fifths"},"str_fifths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Str Fifths"},"time_in_fifths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time In Fifths"},"time_in_hundredths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time In Hundredths"}},"type":"object","title":"TimeData","example":{"fifths":4,"hundredths":87,"milliseconds":870,"minutes":1,"seconds":10,"str_fifths":"","time_in_fifths":"1:10<sup>4</sup>","time_in_hundredths":"1:10.87"}},"TimesGoing":{"properties":{"date":{"type":"string","title":"Date"},"region":{"type":"string","title":"Region"},"course":{"type":"string","title":"Course"},"time":{"type":"string","title":"Time"},"going":{"type":"string","title":"Going"},"position":{"type":"string","title":"Position"}},"type":"object","required":["date","region","course","time","going","position"],"title":"TimesGoing","example":{"course":"Chelmsford (AW)","date":"2022-04-28","going":"Standard","position":"7","region":"GB","time":"1:11.94"}},"TrainerCourseAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"trainer":{"type":"string","title":"Trainer"},"total_runners":{"type":"integer","title":"Total Runners"},"courses":{"items":{"$ref":"#/components/schemas/app__models__trainers__Course"},"type":"array","title":"Courses"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","trainer","total_runners","courses","query"],"title":"TrainerCourseAnalysis","example":{"courses":[{"1_pl":15.5,"1st":45,"2nd":30,"3rd":25,"4th":20,"a/e":1.05,"course":"Newmarket","course_id":"crs_988","region":"GB","runners":200,"win_%":0.23}],"id":"trn_255042","query":[["trainer_id","trn_255042"]],"total_runners":1862,"trainer":"Charlie Appleby"}},"TrainerDistanceAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"trainer":{"type":"string","title":"Trainer"},"total_runners":{"type":"integer","title":"Total Runners"},"distances":{"items":{"$ref":"#/components/schemas/app__models__trainers__Distance"},"type":"array","title":"Distances"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","trainer","total_runners","distances","query"],"title":"TrainerDistanceAnalysis","example":{"distances":[{"1_pl":-59.87,"1st":77,"2nd":43,"3rd":52,"4th":32,"a/e":0.93,"dist":"1m","dist_f":"8f","dist_m":"1609","dist_y":"1760","runners":373,"win_%":0.21}],"id":"trn_255042","query":[["trainer_id","trn_255042"]],"total_runners":1862,"trainer":"Charlie Appleby"}},"TrainerHorseAgeAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"trainer":{"type":"string","title":"Trainer"},"total_runners":{"type":"integer","title":"Total Runners"},"horse_ages":{"items":{"$ref":"#/components/schemas/HorseAges"},"type":"array","title":"Horse Ages"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","trainer","total_runners","horse_ages","query"],"title":"TrainerHorseAgeAnalysis","example":{"horse_ages":[{"1_pl":-0.68,"1st":156,"2nd":106,"3rd":87,"4th":60,"a/e":0.99,"horse_age":"3","runners":749,"win_%":0.21},{"1_pl":18.12,"1st":124,"2nd":61,"3rd":68,"4th":39,"a/e":1.02,"horse_age":"2","runners":439,"win_%":0.28}],"id":"trn_255042","query":[["trainer_id","trn_255042"]],"total_runners":1862,"trainer":"Charlie Appleby"}},"TrainerJockeyAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"trainer":{"type":"string","title":"Trainer"},"total_runners":{"type":"integer","title":"Total Runners"},"jockeys":{"items":{"$ref":"#/components/schemas/app__models__trainers__Jockey"},"type":"array","title":"Jockeys"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","trainer","total_runners","jockeys","query"],"title":"TrainerJockeyAnalysis","example":{"id":"trn_255042","jockeys":[{"1_pl":50.62,"1st":260,"2nd":148,"3rd":143,"4th":88,"a/e":1.01,"jockey":"William Buick","jockey_id":"jky_257379","runners":1038,"win_%":0.25}],"query":[["trainer_id","trn_255042"]],"total_runners":1862,"trainer":"Charlie Appleby"}},"TrainerOwnerAnalysis":{"properties":{"id":{"type":"string","title":"Id"},"trainer":{"type":"string","title":"Trainer"},"total_runners":{"type":"integer","title":"Total Runners"},"owners":{"items":{"$ref":"#/components/schemas/app__models__trainers__Owner"},"type":"array","title":"Owners"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["id","trainer","total_runners","owners","query"],"title":"TrainerOwnerAnalysis","example":{"id":"trn_255042","owners":[{"1_pl":25.0,"1st":120,"2nd":80,"3rd":60,"4th":40,"a/e":1.02,"owner":"Godolphin","owner_id":"own_199380","runners":500,"win_%":0.24}],"query":[["trainer_id","trn_255042"]],"total_runners":1862,"trainer":"Charlie Appleby"}},"Trainers":{"properties":{"search_results":{"items":{"$ref":"#/components/schemas/app__models__trainers__Trainer"},"type":"array","title":"Search Results"}},"type":"object","required":["search_results"],"title":"Trainers","example":{"search_results":[{"id":"trn_30735","name":"William Haggas"},{"id":"trn_91413","name":"David Pipe"}]}},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WagerType":{"properties":{"wager_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wager Type"},"wager_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wager Description"},"base_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Amount"}},"type":"object","title":"WagerType","example":{"base_amount":"1.00","wager_description":"Exacta","wager_type":"E"}},"app__models__aus_meets__Meet":{"properties":{"meet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meet Id"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"course":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course"},"course_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course Id"},"races":{"items":{"$ref":"#/components/schemas/MeetRaces"},"type":"array","title":"Races"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},"type":"object","required":["races"],"title":"Meet","example":{"course":"Caulfield","course_id":"crs_aus_75219024719","date":"2025-10-11","meet_id":"met_aus_73898021202","races":[{"class":"Group 1","distance":"2000m","off_time":"2025-10-11T04:15:00.000Z","race_group":"Group 1","race_name":"Sportsbet Might And Power","race_number":"6","race_status":"Results"}],"state":"VIC"}},"app__models__aus_meets__Meets":{"properties":{"meets":{"anyOf":[{"items":{"$ref":"#/components/schemas/app__models__aus_meets__Meet"},"type":"array"},{"type":"null"}],"title":"Meets"}},"type":"object","title":"Meets","example":{"meets":[{"course":"Caulfield","course_id":"crs_aus_75219024719","date":"2025-10-11","meet_id":"met_aus_73898021202","races":[{"class":"Group 1","distance":"1600m","off_time":"2025-10-11T05:30:00.000Z","race_group":"Group 1","race_name":"Sportsbet Caulfield Guineas","race_number":"8","race_status":"Results"}],"state":"VIC"},{"course":"Ascot","course_id":"crs_aus_712388980373","date":"2025-10-11","meet_id":"met_aus_604899110256","races":[{"class":"2YO Plate","distance":"1000m","off_time":"2025-10-11T04:00:00.000Z","race_group":"ungrouped","race_name":"VALE LINDSAY SEVERN PLATE","race_number":"1","race_status":"Results"}],"state":"WA"}]}},"app__models__aus_races__Race":{"properties":{"course":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course"},"course_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course Id"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"distance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance"},"going":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Going"},"is_jump_out":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Jump Out","default":false},"is_trial":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Trial","default":false},"meet_id":{"type":"string","title":"Meet Id"},"off_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Off Time"},"prizes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Prizes"},"prize_total":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prize Total"},"class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Class"},"race_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Conditions"},"race_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Group"},"race_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Name"},"race_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Number"},"race_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Status"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"runners":{"items":{"$ref":"#/components/schemas/app__models__aus_races__Runner"},"type":"array","title":"Runners"},"winning_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winning Time"},"winning_time_hundredths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Winning Time Hundredths"}},"type":"object","title":"Race","example":{"class":"2YO Plate","course":"Ascot","course_id":"crs_aus_712388980373","date":"2025-10-11","distance":"1000m","going":"Good","is_jump_out":false,"is_trial":false,"meet_id":"met_aus_604899110256","off_time":"2025-10-11T04:00:00.000Z","prize_total":"80000.00","prizes":[{"Position":1,"Value":"43840.00"},{"Position":2,"Value":"14880.00"}],"race_group":"ungrouped","race_name":"VALE LINDSAY SEVERN PLATE","race_number":"1","race_status":"Results","runners":[{"age":"2","colour":"Chestnut","comment":"Jumped Ok Went Forward to Lead but Two Wide quickened approaching Straight","dam":"Poker Face","dam_id":"dam_aus_5763901272","draw":"8","form":"1","horse":"All On Red","horse_id":"hrs_aus_985106802693","jockey":"L.M.Campbell","jockey_claim":"0","jockey_id":"jky_aus_382285552310","number":"1","odds":[{"bookmaker":"Sportsbet","place_odds":"1.70","win_odds":"5.00"},{"bookmaker":"Ladbrokes","place_odds":"1.70","win_odds":"5.00"}],"owner":"T B Racing Pty Ltd (T Noske), T Shutterworth, S Mcfarlane, G White","position":"1","prize":"43840","scratched":false,"sex":"Colt","silk_url":"https://www.url-for-silk.com/svg/456789.svg","sire":"Doubtland","sire_id":"sir_aus_767094969190","sp":"5.00","stats":{"career_place_percent":"100%","career_prize":"$65,840","career_win_percent":"100%","course_distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"course_stats":{"first":"1","second":"0","third":"0","total":"1"},"distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"ground_firm_stats":{"first":"0","second":"0","third":"0","total":"0"},"ground_good_stats":{"first":"1","second":"0","third":"0","total":"1"},"jockey_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_raced":"2025-10-11","last_ten_races_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_twelve_months_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_won":"2025-10-11","max_winning_distance":"1000m","min_winning_distance":"1000m"},"trainer":"Daniel Morton","trainer_id":"trn_aus_449779200413","weight":"57.0"}],"state":"WA","winning_time":"58.47","winning_time_hundredths":"5847"}},"app__models__aus_races__Runner":{"properties":{"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colour"},"dam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam"},"dam_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Id"},"draw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draw"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"jockey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey"},"jockey_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey Id"},"jockey_claim":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey Claim"},"margin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Margin"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"odds":{"anyOf":[{"items":{"$ref":"#/components/schemas/app__models__aus_races__RunnerOdds"},"type":"array"},{"type":"null"}],"title":"Odds"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"prize":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prize"},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating"},"scratched":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Scratched"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"silk_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Silk Url"},"sire":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire"},"sire_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Id"},"sp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sp"},"stats":{"anyOf":[{"$ref":"#/components/schemas/RunnerStats"},{"type":"null"}]},"trainer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer"},"trainer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Id"},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight"}},"type":"object","required":["horse_id","horse"],"title":"Runner","example":{"age":"2","colour":"Chestnut","comment":"Jumped Ok Went Forward to Lead but Two Wide quickened approaching Straight","dam":"Poker Face","dam_id":"dam_aus_5763901272","draw":"8","form":"1","horse":"All On Red","horse_id":"hrs_aus_985106802693","jockey":"L.M.Campbell","jockey_claim":"0","jockey_id":"jky_aus_382285552310","number":"1","odds":[{"bookmaker":"Sportsbet","place_odds":"1.70","win_odds":"5.00"},{"bookmaker":"Ladbrokes","place_odds":"1.70","win_odds":"5.00"}],"owner":"T B Racing Pty Ltd (T Noske), T Shutterworth, S Mcfarlane, G White","position":"1","prize":"43840","scratched":false,"sex":"Colt","silk_url":"https://www.url-for-silk.com/svg/456789.svg","sire":"Doubtland","sire_id":"sir_aus_767094969190","sp":"5.00","stats":{"career_place_percent":"100%","career_prize":"$65,840","career_win_percent":"100%","course_distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"course_stats":{"first":"1","second":"0","third":"0","total":"1"},"distance_stats":{"first":"1","second":"0","third":"0","total":"1"},"ground_firm_stats":{"first":"0","second":"0","third":"0","total":"0"},"ground_good_stats":{"first":"1","second":"0","third":"0","total":"1"},"jockey_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_raced":"2025-10-11","last_ten_races_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_twelve_months_stats":{"first":"1","second":"0","third":"0","total":"1"},"last_won":"2025-10-11","max_winning_distance":"1000m","min_winning_distance":"1000m"},"trainer":"Daniel Morton","trainer_id":"trn_aus_449779200413","weight":"57.0"}},"app__models__aus_races__RunnerOdds":{"properties":{"bookmaker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bookmaker"},"win_odds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Win Odds"},"place_odds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Odds"}},"type":"object","title":"RunnerOdds","example":{"bookmaker":"Sportsbet","place_odds":"1.70","win_odds":"5.00"}},"app__models__courses__Course":{"properties":{"id":{"type":"string","title":"Id"},"course":{"type":"string","title":"Course"},"region_code":{"type":"string","title":"Region Code"},"region":{"type":"string","title":"Region"}},"type":"object","required":["id","course","region_code","region"],"title":"Course","example":{"course":"Ascot","id":"crs_52","region":"Great Britain","region_code":"gb"}},"app__models__dams__Class":{"properties":{"class":{"type":"string","title":"Class"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["class","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Class","example":{"1_pl":-2.0,"1st":5,"2nd":4,"3rd":3,"4th":2,"a/e":0.9,"class":"Class 1","runners":30,"win_%":0.17}},"app__models__dams__Distance":{"properties":{"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["dist","dist_y","dist_m","dist_f","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Distance","example":{"1_pl":-5.5,"1st":8,"2nd":6,"3rd":5,"4th":4,"a/e":0.85,"dist":"1m","dist_f":"8f","dist_m":"1609","dist_y":"1760","runners":50,"win_%":0.16}},"app__models__damsires__Class":{"properties":{"class":{"type":"string","title":"Class"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["class","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Class","example":{"1_pl":-15.0,"1st":30,"2nd":25,"3rd":22,"4th":18,"a/e":0.88,"class":"Class 1","runners":200,"win_%":0.15}},"app__models__damsires__Distance":{"properties":{"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["dist","dist_y","dist_m","dist_f","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Distance","example":{"1_pl":-10.5,"1st":25,"2nd":20,"3rd":18,"4th":15,"a/e":0.95,"dist":"1m2f","dist_f":"10f","dist_m":"2012","dist_y":"2200","runners":150,"win_%":0.17}},"app__models__jockeys__Course":{"properties":{"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"region":{"type":"string","title":"Region"},"rides":{"type":"integer","title":"Rides"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["course","course_id","region","rides","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Course","example":{"1_pl":12.47,"1st":144,"2nd":72,"3rd":86,"4th":68,"a/e":1.09,"course":"Newmarket","course_id":"crs_988","region":"GB","rides":716,"win_%":0.2}},"app__models__jockeys__Distance":{"properties":{"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"rides":{"type":"integer","title":"Rides"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["dist","dist_y","dist_m","dist_f","rides","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Distance","example":{"1_pl":-119.96,"1st":117,"2nd":86,"3rd":72,"4th":64,"a/e":0.95,"dist":"1m","dist_f":"8f","dist_m":"1638","dist_y":"1791","rides":681,"win_%":0.17}},"app__models__jockeys__Jockey":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","name"],"title":"Jockey","example":{"id":"jky_257379","name":"William Buick"}},"app__models__jockeys__Owner":{"properties":{"owner_id":{"type":"string","title":"Owner Id"},"owner":{"type":"string","title":"Owner"},"rides":{"type":"integer","title":"Rides"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["owner_id","owner","rides","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Owner","example":{"1_pl":45.0,"1st":200,"2nd":120,"3rd":100,"4th":80,"a/e":1.05,"owner":"Godolphin","owner_id":"own_199380","rides":800,"win_%":0.25}},"app__models__jockeys__Trainer":{"properties":{"trainer_id":{"type":"string","title":"Trainer Id"},"trainer":{"type":"string","title":"Trainer"},"rides":{"type":"integer","title":"Rides"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["trainer_id","trainer","rides","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Trainer","example":{"1_pl":50.62,"1st":260,"2nd":148,"3rd":143,"4th":88,"a/e":1.01,"rides":1038,"trainer":"Charlie Appleby","trainer_id":"trn_255042","win_%":0.25}},"app__models__na_entries__Jockey":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"first_name_initial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name Initial"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"Jockey","example":{"alias":"Santana R Jr","first_name":"Ricardo","first_name_initial":"R","id":"jky_na_408144","last_name":"Santana, Jr.","middle_name":"","type":"JE"}},"app__models__na_entries__Race":{"properties":{"age_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age Restriction"},"age_restriction_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age Restriction Description"},"breed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Breed"},"changes":{"anyOf":[{"items":{"$ref":"#/components/schemas/Change"},"type":"array"},{"type":"null"}],"title":"Changes"},"course_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course Type"},"course_type_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course Type Class"},"distance_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance Description"},"distance_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance Unit"},"distance_value":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Distance Value"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"handicapper_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handicapper Name"},"has_finished":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Finished"},"has_results":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Results"},"is_cancelled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cancelled"},"max_claim_price":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Max Claim Price"},"min_claim_price":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Min Claim Price"},"mtp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mtp"},"post_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Time"},"post_time_long":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Time Long"},"purse":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Purse"},"race_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Class"},"race_key":{"$ref":"#/components/schemas/RaceKey"},"race_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Name"},"race_pools":{"anyOf":[{"items":{"$ref":"#/components/schemas/RacePool"},"type":"array"},{"type":"null"}],"title":"Race Pools"},"race_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Restriction"},"race_restriction_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Restriction Description"},"race_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Type"},"race_type_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Type Description"},"runners":{"items":{"$ref":"#/components/schemas/app__models__na_entries__Runner"},"type":"array","title":"Runners"},"sex_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction"},"sex_restriction_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction Description"},"surface_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface Description"},"time_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Zone"},"tote_track_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tote Track Id"},"track_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Track Condition"},"track_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Track Name"}},"type":"object","required":["race_key","runners"],"title":"Race","example":{"age_restriction":"03","age_restriction_description":"3 Year Olds","breed":"Thoroughbred","changes":[],"course_type":"D","course_type_class":"D","distance_description":"6 1/2 Furlongs","distance_unit":"F","distance_value":6,"grade":"","has_finished":false,"has_results":false,"is_cancelled":false,"max_claim_price":0,"min_claim_price":0,"mtp":-315,"post_time":"12:40 PM","post_time_long":"63600000","purse":80000,"race_class":"MAIDEN SPECIAL WEIGHT","race_key":{"day_evening":"D","race_number":"1"},"race_name":"","race_restriction":"","race_type":"MSW","race_type_description":"MAIDEN SPECIAL WEIGHT","runners":[{"claiming":0,"coupled_type":"","dam_name":"Criminal Mischief","dam_sire_name":"Into Mischief","description":"","equipment":"Blk-O","horse_name":"Felonious","jockey":{"alias":"Santana R Jr","first_name":"Ricardo","first_name_initial":"R","id":"jky_na_408144","last_name":"Santana, Jr.","middle_name":"","type":"JE"},"medication":"L","morning_line_odds":"5/2","post_pos":"1","program_number":"1","program_number_stripped":1,"registration_number":"23009154","scratch_indicator":"N","sire_name":"Charlatan","trainer":{"alias":"Pletcher Todd A","first_name":"Todd","first_name_initial":"T","id":"trn_na_1029078","last_name":"Pletcher","middle_name":"A.","type":"TE"},"weight":"122"}],"sex_restriction":"","sex_restriction_description":"Open","surface_description":"Dirt","time_zone":"E","tote_track_id":"AQU","track_condition":"FT","track_name":"AQUEDUCT"}},"app__models__na_entries__Runner":{"properties":{"claiming":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Claiming"},"coupled_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coupled Type"},"dam_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Name"},"dam_sire_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Sire Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"handicapper_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handicapper Name"},"horse_data_pools":{"anyOf":[{"items":{"$ref":"#/components/schemas/HorsePool"},"type":"array"},{"type":"null"}],"title":"Horse Data Pools"},"horse_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Horse Name"},"jockey":{"anyOf":[{"$ref":"#/components/schemas/app__models__na_entries__Jockey"},{"type":"null"}]},"live_odds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live Odds"},"medication":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Medication"},"morning_line_odds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Morning Line Odds"},"post_pos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Pos"},"program_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Program Number"},"program_number_stripped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Program Number Stripped"},"registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Number"},"scratch_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scratch Indicator"},"sire_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Name"},"trainer":{"anyOf":[{"$ref":"#/components/schemas/app__models__na_entries__Trainer"},{"type":"null"}]},"weight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight"}},"type":"object","title":"Runner","example":{"claiming":0,"coupled_type":"","dam_name":"Criminal Mischief","dam_sire_name":"Into Mischief","description":"","equipment":"Blk-O","horse_name":"Felonious","jockey":{"alias":"Santana R Jr","first_name":"Ricardo","first_name_initial":"R","id":"jky_na_408144","last_name":"Santana, Jr.","middle_name":"","type":"JE"},"medication":"L","morning_line_odds":"5/2","post_pos":"1","program_number":"1","program_number_stripped":1,"registration_number":"23009154","scratch_indicator":"N","sire_name":"Charlatan","trainer":{"alias":"Pletcher Todd A","first_name":"Todd","first_name_initial":"T","id":"trn_na_1029078","last_name":"Pletcher","middle_name":"A.","type":"TE"},"weight":"122"}},"app__models__na_entries__Trainer":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"first_name_initial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name Initial"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"Trainer","example":{"alias":"Pletcher Todd A","first_name":"Todd","first_name_initial":"T","id":"trn_na_1029078","last_name":"Pletcher","middle_name":"A.","type":"TE"}},"app__models__na_entries__Weather":{"properties":{"forecast_weather_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Weather Description"},"forecast_high":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Forecast High"},"forecast_low":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Forecast Low"},"forecast_precipitation":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Forecast Precipitation"},"current_weather_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Weather Description"}},"type":"object","title":"Weather","example":{"current_weather_description":"Clear","forecast_high":"45","forecast_low":"32","forecast_precipitation":"10","forecast_weather_description":"Partly Cloudy"}},"app__models__na_meets__Meet":{"properties":{"country":{"type":"string","title":"Country"},"date":{"type":"string","title":"Date"},"meet_id":{"type":"string","title":"Meet Id"},"track_id":{"type":"string","title":"Track Id"},"track_name":{"type":"string","title":"Track Name"}},"type":"object","required":["country","date","meet_id","track_id","track_name"],"title":"Meet","example":{"country":"USA","date":"2026-02-01","meet_id":"AQU_1769922000000","track_id":"AQU","track_name":"Aqueduct"}},"app__models__na_meets__Meets":{"properties":{"meets":{"anyOf":[{"items":{"$ref":"#/components/schemas/app__models__na_meets__Meet"},"type":"array"},{"type":"null"}],"title":"Meets"},"limit":{"type":"integer","title":"Limit"},"skip":{"type":"integer","title":"Skip"},"query":{"items":{"items":{},"type":"array"},"type":"array","title":"Query"}},"type":"object","required":["limit","skip","query"],"title":"Meets","example":{"limit":50,"meets":[{"country":"USA","date":"2026-02-01","meet_id":"AQU_1769922000000","track_id":"AQU","track_name":"Aqueduct"},{"country":"USA","date":"2026-02-01","meet_id":"FG_1769922000000","track_id":"FG","track_name":"Fair Grounds"}],"query":[["date","2026-02-01"]],"skip":0}},"app__models__na_results__Race":{"properties":{"age_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age Restriction"},"age_restriction_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age Restriction Description"},"also_ran":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"null"}],"title":"Also Ran"},"breed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Breed"},"distance_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance Description"},"distance_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distance Unit"},"distance_value":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Distance Value"},"fraction":{"anyOf":[{"$ref":"#/components/schemas/Fraction"},{"type":"null"}]},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"maximum_claim_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maximum Claim Price"},"minimum_claim_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Minimum Claim Price"},"off_time":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Off Time"},"payoffs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Payoff"},"type":"array"},{"type":"null"}],"title":"Payoffs"},"post_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Time"},"post_time_long":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Post Time Long"},"race_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Class"},"race_key":{"anyOf":[{"$ref":"#/components/schemas/RaceKey"},{"type":"null"}]},"race_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Name"},"race_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Restriction"},"race_restriction_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Restriction Description"},"race_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Type"},"race_type_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race Type Description"},"runners":{"anyOf":[{"items":{"$ref":"#/components/schemas/app__models__na_results__Runner"},"type":"array"},{"type":"null"}],"title":"Runners"},"scratches":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Scratches"},"sex_restriction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction"},"sex_restriction_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Restriction Description"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"},"surface_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface Description"},"time_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Zone"},"total_purse":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Total Purse"},"track_condition_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Track Condition Description"},"track_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Track Name"},"wager_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/WagerType"},"type":"array"},{"type":"null"}],"title":"Wager Types"}},"type":"object","title":"Race","example":{"age_restriction":"3U","age_restriction_description":"3 Year Olds And Up","also_ran":"Catchin Drama, Righteous Freedom and Grand Encore","breed":"Thoroughbred","distance_description":"6 Furlongs","distance_unit":"F","distance_value":6,"fraction":{"fraction_1":{"time_in_hundredths":":22.60"},"fraction_2":{"time_in_hundredths":":46.18"},"winning_time":{"time_in_hundredths":"1:10.87"}},"grade":"","maximum_claim_price":"5000.0000","minimum_claim_price":"5,000","off_time":1769967900000,"payoffs":[{"payoff_amount":"2.40","total_pool":"75,589.00","wager_name":"Exacta","wager_type":"E","winning_numbers":"1-4"}],"post_time":"1:45 PM","post_time_long":1769967900000,"race_class":"CLAIMING($5,000)","race_key":{"day_evening":"D","race_number":"1"},"race_name":"","race_restriction":"S","race_restriction_description":"State Bred","race_type":"CLM","race_type_description":"CLAIMING","runners":[{"breeder_name":"Brittlyn Inc","horse_name":"Louisiana Wildlife","jockey_first_name":"Paco","jockey_first_name_initial":"P","jockey_last_name":"Lopez","owner_first_name":"","owner_last_name":"Lovern, Jason and Lovern, Pamela Belk","place_payoff":2.1,"program_number":"1","program_number_stripped":1,"show_payoff":2.1,"sire_name":"Star Guitar","trainer_first_name":"Antonio","trainer_last_name":"Alberto","weight_carried":"122","win_payoff":3.0}],"scratches":["Gypsy Squall","Lacey's Kat"],"sex_restriction":"","sex_restriction_description":"Open","surface":"D","surface_description":"Dirt","time_zone":"C","total_purse":"14,000","track_condition_description":"Fast","track_name":"FAIR GROUNDS","wager_types":[{"base_amount":"1.00","wager_description":"Exacta","wager_type":"E"}]}},"app__models__na_results__Runner":{"properties":{"breeder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Breeder Name"},"horse_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Horse Name"},"jockey_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey First Name"},"jockey_first_name_initial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey First Name Initial"},"jockey_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey Last Name"},"owner_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner First Name"},"owner_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Last Name"},"place_payoff":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Place Payoff"},"program_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Program Number"},"program_number_stripped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Program Number Stripped"},"show_payoff":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Show Payoff"},"sire_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Name"},"trainer_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer First Name"},"trainer_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Last Name"},"weight_carried":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight Carried"},"win_payoff":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Win Payoff"}},"type":"object","title":"Runner","example":{"breeder_name":"Brittlyn Inc","horse_name":"Louisiana Wildlife","jockey_first_name":"Paco","jockey_first_name_initial":"P","jockey_last_name":"Lopez","owner_first_name":"","owner_last_name":"Lovern, Jason and Lovern, Pamela Belk","place_payoff":2.1,"program_number":"1","program_number_stripped":1,"show_payoff":2.1,"sire_name":"Star Guitar","trainer_first_name":"Antonio","trainer_last_name":"Alberto","weight_carried":"122","win_payoff":3.0}},"app__models__na_results__Weather":{"properties":{"current_temperature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Temperature"},"current_weather_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Weather Description"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"forecast_high":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Forecast High"},"forecast_low":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Forecast Low"},"forecast_precipitation":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Forecast Precipitation"},"forecast_weather_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Weather Description"}},"type":"object","title":"Weather","example":{"current_temperature":"52","current_weather_description":"Partly Cloudy","date":"2026-02-01","forecast_high":"58","forecast_low":"42","forecast_precipitation":"10","forecast_weather_description":"Mostly Sunny"}},"app__models__owners__Course":{"properties":{"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"region":{"type":"string","title":"Region"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["course","course_id","region","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Course","example":{"1_pl":15.0,"1st":100,"2nd":80,"3rd":60,"4th":50,"a/e":1.02,"course":"Newmarket","course_id":"crs_988","region":"GB","runners":500,"win_%":0.2}},"app__models__owners__Distance":{"properties":{"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["dist","dist_y","dist_m","dist_f","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Distance","example":{"1_pl":10.27,"1st":239,"2nd":144,"3rd":163,"4th":114,"a/e":0.99,"dist":"1m","dist_f":"8f","dist_m":"1609","dist_y":"1760","runners":1279,"win_%":0.19}},"app__models__owners__Jockey":{"properties":{"jockey_id":{"type":"string","title":"Jockey Id"},"jockey":{"type":"string","title":"Jockey"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["jockey_id","jockey","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Jockey","example":{"1_pl":40.0,"1st":150,"2nd":90,"3rd":80,"4th":60,"a/e":1.02,"jockey":"William Buick","jockey_id":"jky_257379","runners":600,"win_%":0.25}},"app__models__owners__Owner":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","name"],"title":"Owner","example":{"id":"own_199380","name":"Godolphin"}},"app__models__owners__Trainer":{"properties":{"trainer_id":{"type":"string","title":"Trainer Id"},"trainer":{"type":"string","title":"Trainer"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["trainer_id","trainer","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Trainer","example":{"1_pl":50.0,"1st":200,"2nd":120,"3rd":100,"4th":80,"a/e":1.05,"runners":800,"trainer":"Charlie Appleby","trainer_id":"trn_255042","win_%":0.25}},"app__models__racecards__Runner":{"properties":{"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dob"},"age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"sex_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Code"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colour"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"breeder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Breeder"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"dam_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Region","default":""},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"sire_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Region","default":""},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"},"damsire_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damsire Region","default":""},"trainer":{"type":"string","title":"Trainer"},"trainer_id":{"type":"string","title":"Trainer Id"},"trainer_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Location","default":""},"trainer_14_days":{"anyOf":[{"$ref":"#/components/schemas/RunnerTrainer14Days"},{"type":"null"}],"default":{}},"owner":{"type":"string","title":"Owner"},"owner_id":{"type":"string","title":"Owner Id"},"prev_trainers":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerPrevTrainer"},"type":"array"},{"type":"null"}],"title":"Prev Trainers","default":[]},"prev_owners":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerPrevOwner"},"type":"array"},{"type":"null"}],"title":"Prev Owners","default":[]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","default":""},"spotlight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spotlight","default":""},"quotes":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerQuote"},"type":"array"},{"type":"null"}],"title":"Quotes","default":[]},"stable_tour":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerStableTour"},"type":"array"},{"type":"null"}],"title":"Stable Tour","default":[]},"medical":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerMedical"},"type":"array"},{"type":"null"}],"title":"Medical","default":[]},"number":{"type":"string","title":"Number"},"draw":{"type":"string","title":"Draw"},"headgear":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headgear","default":""},"headgear_run":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headgear Run","default":""},"wind_surgery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wind Surgery","default":""},"wind_surgery_run":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wind Surgery Run","default":""},"past_results_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Past Results Flags","default":[]},"lbs":{"type":"string","title":"Lbs"},"ofr":{"type":"string","title":"Ofr"},"rpr":{"type":"string","title":"Rpr"},"ts":{"type":"string","title":"Ts"},"performance_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performance Rating","default":""},"speed_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed Rating","default":""},"jockey":{"type":"string","title":"Jockey"},"jockey_id":{"type":"string","title":"Jockey Id"},"silk_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Silk Url","default":""},"last_run":{"type":"string","title":"Last Run"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"trainer_rtf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Rtf"}},"type":"object","required":["horse_id","horse","dob","age","sex","sex_code","colour","region","breeder","dam","dam_id","sire","sire_id","damsire","damsire_id","trainer","trainer_id","owner","owner_id","number","draw","lbs","ofr","rpr","ts","jockey","jockey_id","last_run","form","trainer_rtf"],"title":"Runner","example":{"age":"6","breeder":"Tada Nobutaka","colour":"b","comment":"Course-and-distance form; acts on the ground and is a leading player on these terms.","dam":"Lerici","dam_id":"dam_4823441","dam_region":"USA","damsire":"Woodman","damsire_id":"dsi_2126229","damsire_region":"USA","dob":"2017-04-22","draw":"8","form":"3-7880","headgear":"","headgear_run":"","horse":"Pistoletto","horse_id":"hrs_18092480","jockey":"Adam Tracey(7)","jockey_id":"jky_301290","last_run":"25","lbs":"140","medical":[],"number":"1","ofr":"75","owner":"J A Thompson & S Russell","owner_id":"own_1227828","past_results_flags":[],"performance_rating":"92","prev_owners":[{"change_date":"2021-08-07","owner":"G McGladery, J A Thompson & S Russell","owner_id":"own_1191676"},{"change_date":"2020-09-26","owner":"Michael Tabor & Derrick Smith & Mrs John Magnier","owner_id":"own_575044"}],"prev_trainers":[{"change_date":"2020-09-26","trainer":"A P O'Brien","trainer_id":"trn_71802"}],"region":"USA","sex":"gelding","sex_code":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"War Front","sire_id":"sir_4544750","sire_region":"USA","speed_rating":"97","trainer":"John Ryan","trainer_14_days":{"percent":"0","runs":"5","wins":"0"},"trainer_id":"trn_160758","trainer_location":"Newmarket, Suffolk","trainer_rtf":"","wind_surgery":"","wind_surgery_run":""}},"app__models__racecards__RunnerBasic":{"properties":{"horse":{"type":"string","title":"Horse"},"horse_id":{"type":"string","title":"Horse Id"},"age":{"type":"string","title":"Age"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"sex_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Code"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colour"},"region":{"type":"string","title":"Region"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"},"trainer":{"type":"string","title":"Trainer"},"trainer_id":{"type":"string","title":"Trainer Id"},"owner":{"type":"string","title":"Owner"},"owner_id":{"type":"string","title":"Owner Id"},"number":{"type":"string","title":"Number"},"draw":{"type":"string","title":"Draw"},"headgear":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headgear"},"lbs":{"type":"string","title":"Lbs"},"ofr":{"type":"string","title":"Ofr"},"jockey":{"type":"string","title":"Jockey"},"jockey_id":{"type":"string","title":"Jockey Id"},"last_run":{"type":"string","title":"Last Run"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"}},"type":"object","required":["horse","horse_id","age","sex","sex_code","colour","region","dam","dam_id","sire","sire_id","damsire","damsire_id","trainer","trainer_id","owner","owner_id","number","draw","headgear","lbs","ofr","jockey","jockey_id","last_run","form"],"title":"RunnerBasic","example":{"age":"6","colour":"b","dam":"Lerici","dam_id":"dam_4823441","damsire":"Woodman","damsire_id":"dsi_2126229","draw":"8","form":"3-7880","headgear":"","horse":"Pistoletto","horse_id":"hrs_18092480","jockey":"Adam Tracey(7)","jockey_id":"jky_301290","last_run":"25","lbs":"140","number":"1","ofr":"75","owner":"J A Thompson & S Russell","owner_id":"own_1227828","region":"USA","sex":"gelding","sex_code":"G","sire":"War Front","sire_id":"sir_4544750","trainer":"John Ryan","trainer_id":"trn_160758"}},"app__models__racecards__RunnerOdds":{"properties":{"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dob"},"age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Age"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"sex_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex Code"},"colour":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colour"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"breeder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Breeder"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"dam_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dam Region","default":""},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"sire_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sire Region","default":""},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"},"damsire_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Damsire Region","default":""},"trainer":{"type":"string","title":"Trainer"},"trainer_id":{"type":"string","title":"Trainer Id"},"trainer_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Location","default":""},"trainer_14_days":{"anyOf":[{"$ref":"#/components/schemas/RunnerTrainer14Days"},{"type":"null"}],"default":{}},"owner":{"type":"string","title":"Owner"},"owner_id":{"type":"string","title":"Owner Id"},"prev_trainers":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerPrevTrainer"},"type":"array"},{"type":"null"}],"title":"Prev Trainers","default":[]},"prev_owners":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerPrevOwner"},"type":"array"},{"type":"null"}],"title":"Prev Owners","default":[]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","default":""},"spotlight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spotlight","default":""},"quotes":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerQuote"},"type":"array"},{"type":"null"}],"title":"Quotes","default":[]},"stable_tour":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerStableTour"},"type":"array"},{"type":"null"}],"title":"Stable Tour","default":[]},"medical":{"anyOf":[{"items":{"$ref":"#/components/schemas/RunnerMedical"},"type":"array"},{"type":"null"}],"title":"Medical","default":[]},"number":{"type":"string","title":"Number"},"draw":{"type":"string","title":"Draw"},"headgear":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headgear","default":""},"headgear_run":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headgear Run","default":""},"wind_surgery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wind Surgery","default":""},"wind_surgery_run":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wind Surgery Run","default":""},"past_results_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Past Results Flags","default":[]},"lbs":{"type":"string","title":"Lbs"},"ofr":{"type":"string","title":"Ofr"},"rpr":{"type":"string","title":"Rpr"},"ts":{"type":"string","title":"Ts"},"performance_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performance Rating","default":""},"speed_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed Rating","default":""},"jockey":{"type":"string","title":"Jockey"},"jockey_id":{"type":"string","title":"Jockey Id"},"silk_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Silk Url","default":""},"last_run":{"type":"string","title":"Last Run"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"trainer_rtf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trainer Rtf"},"odds":{"anyOf":[{"items":{"$ref":"#/components/schemas/OddsNoHistory"},"type":"array"},{"type":"null"}],"title":"Odds","default":[]}},"type":"object","required":["horse_id","horse","dob","age","sex","sex_code","colour","region","breeder","dam","dam_id","sire","sire_id","damsire","damsire_id","trainer","trainer_id","owner","owner_id","number","draw","lbs","ofr","rpr","ts","jockey","jockey_id","last_run","form","trainer_rtf"],"title":"RunnerOdds","example":{"age":"6","breeder":"Tada Nobutaka","colour":"b","comment":"Course-and-distance form; acts on the ground and is a leading player on these terms.","dam":"Lerici","dam_id":"dam_4823441","dam_region":"USA","damsire":"Woodman","damsire_id":"dsi_2126229","damsire_region":"USA","dob":"2017-04-22","draw":"8","form":"3-7880","headgear":"","headgear_run":"","horse":"Pistoletto","horse_id":"hrs_18092480","jockey":"Adam Tracey(7)","jockey_id":"jky_301290","last_run":"25","lbs":"140","medical":[],"number":"1","odds":[{"bookmaker":"Bet365","decimal":"9","ew_denom":"5","ew_places":"3","fractional":"8","updated":"2023-05-02 12:36:43"},{"bookmaker":"Paddy Power","decimal":"8.5","ew_denom":"5","ew_places":"3","fractional":"15/2","updated":"2023-05-02 12:36:43"}],"ofr":"75","owner":"J A Thompson & S Russell","owner_id":"own_1227828","past_results_flags":[],"performance_rating":"92","prev_owners":[{"change_date":"2021-08-07","owner":"G McGladery, J A Thompson & S Russell","owner_id":"own_1191676"}],"prev_trainers":[{"change_date":"2020-09-26","trainer":"A P O'Brien","trainer_id":"trn_71802"}],"region":"USA","sex":"gelding","sex_code":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"War Front","sire_id":"sir_4544750","sire_region":"USA","speed_rating":"97","trainer":"John Ryan","trainer_14_days":{"percent":"0","runs":"5","wins":"0"},"trainer_id":"trn_160758","trainer_location":"Newmarket, Suffolk","trainer_rtf":"","wind_surgery":"","wind_surgery_run":""}},"app__models__result__RunnerBasic":{"properties":{"horse_id":{"type":"string","title":"Horse Id"},"horse":{"type":"string","title":"Horse"},"sp":{"type":"string","title":"Sp"},"sp_dec":{"type":"string","title":"Sp Dec"},"number":{"type":"string","title":"Number"},"position":{"type":"string","title":"Position"},"draw":{"type":"string","title":"Draw"},"btn":{"type":"string","title":"Btn"},"ovr_btn":{"type":"string","title":"Ovr Btn"},"age":{"type":"string","title":"Age"},"sex":{"type":"string","title":"Sex"},"weight":{"type":"string","title":"Weight"},"weight_lbs":{"type":"string","title":"Weight Lbs"},"headgear":{"type":"string","title":"Headgear"},"time":{"type":"string","title":"Time"},"or":{"type":"string","title":"Or"},"rpr":{"type":"string","title":"Rpr"},"tsr":{"type":"string","title":"Tsr"},"prize":{"type":"string","title":"Prize"},"jockey":{"type":"string","title":"Jockey"},"jockey_claim_lbs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jockey Claim Lbs","default":"0"},"jockey_id":{"type":"string","title":"Jockey Id"},"trainer":{"type":"string","title":"Trainer"},"trainer_id":{"type":"string","title":"Trainer Id"},"owner":{"type":"string","title":"Owner"},"owner_id":{"type":"string","title":"Owner Id"},"sire":{"type":"string","title":"Sire"},"sire_id":{"type":"string","title":"Sire Id"},"dam":{"type":"string","title":"Dam"},"dam_id":{"type":"string","title":"Dam Id"},"damsire":{"type":"string","title":"Damsire"},"damsire_id":{"type":"string","title":"Damsire Id"},"comment":{"type":"string","title":"Comment"},"silk_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Silk Url","default":""},"performance_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performance Rating","default":""},"speed_rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speed Rating","default":""}},"type":"object","required":["horse_id","horse","sp","sp_dec","number","position","draw","btn","ovr_btn","age","sex","weight","weight_lbs","headgear","time","or","rpr","tsr","prize","jockey","jockey_id","trainer","trainer_id","owner","owner_id","sire","sire_id","dam","dam_id","damsire","damsire_id","comment"],"title":"RunnerBasic","example":{"age":"8","btn":"0","dam":"Save Me The Waltz (FR)","dam_id":"dam_4189605","damsire":"Halling","damsire_id":"dsi_675241","draw":"","headgear":"v","horse":"Mephisto (IRE)","horse_id":"hrs_19359270","jockey":"Shane Fitzgerald","jockey_claim_lbs":"0","jockey_id":"jky_302916","number":"2","or":"98","ovr_btn":"0","owner":"Restricted Movement Syndicate","owner_id":"own_1204876","performance_rating":"80","position":"1","prize":"€5900","sex":"G","silk_url":"https://silks.theracingapi.com/silk?body=solid:ce1126&sleeves=solid:ffffff&cap=solid:ce1126","sire":"Kendargent (FR)","sire_id":"sir_4514419","sp":"15/2","sp_dec":"8.50","speed_rating":"95","time":"5:44.90","trainer":"Gerard Keane","trainer_id":"trn_86382","weight":"11-12","weight_lbs":"166"}},"app__models__sires__Class":{"properties":{"class":{"type":"string","title":"Class"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["class","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Class","example":{"1_pl":-35.97,"1st":15,"2nd":23,"3rd":24,"4th":27,"a/e":0.53,"class":"Class 2","runners":225,"win_%":0.07}},"app__models__sires__Distance":{"properties":{"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["dist","dist_y","dist_m","dist_f","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Distance","example":{"1_pl":5.83,"1st":4,"2nd":10,"3rd":5,"4th":5,"a/e":0.45,"dist":"7f","dist_f":"7f","dist_m":"1400.0","dist_y":"1540","runners":75,"win_%":0.05}},"app__models__trainers__Course":{"properties":{"course":{"type":"string","title":"Course"},"course_id":{"type":"string","title":"Course Id"},"region":{"type":"string","title":"Region"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["course","course_id","region","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Course","example":{"1_pl":15.5,"1st":45,"2nd":30,"3rd":25,"4th":20,"a/e":1.05,"course":"Newmarket","course_id":"crs_988","region":"GB","runners":200,"win_%":0.23}},"app__models__trainers__Distance":{"properties":{"dist":{"type":"string","title":"Dist"},"dist_y":{"type":"string","title":"Dist Y"},"dist_m":{"type":"string","title":"Dist M"},"dist_f":{"type":"string","title":"Dist F"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["dist","dist_y","dist_m","dist_f","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Distance","example":{"1_pl":-59.87,"1st":77,"2nd":43,"3rd":52,"4th":32,"a/e":0.93,"dist":"1m","dist_f":"8f","dist_m":"1609","dist_y":"1760","runners":373,"win_%":0.21}},"app__models__trainers__Jockey":{"properties":{"jockey_id":{"type":"string","title":"Jockey Id"},"jockey":{"type":"string","title":"Jockey"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["jockey_id","jockey","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Jockey","example":{"1_pl":50.62,"1st":260,"2nd":148,"3rd":143,"4th":88,"a/e":1.01,"jockey":"William Buick","jockey_id":"jky_257379","runners":1038,"win_%":0.25}},"app__models__trainers__Owner":{"properties":{"owner_id":{"type":"string","title":"Owner Id"},"owner":{"type":"string","title":"Owner"},"runners":{"type":"integer","title":"Runners"},"1st":{"type":"integer","title":"1st place finishes"},"2nd":{"type":"integer","title":"2nd place finishes"},"3rd":{"type":"integer","title":"3rd place finishes"},"4th":{"type":"integer","title":"4th place finishes"},"a/e":{"type":"number","title":"Actual/expected"},"win_%":{"type":"number","title":"Win percentage (decimal)"},"1_pl":{"type":"number","title":"One unit p/l at SP"}},"type":"object","required":["owner_id","owner","runners","1st","2nd","3rd","4th","a/e","win_%","1_pl"],"title":"Owner","example":{"1_pl":25.0,"1st":120,"2nd":80,"3rd":60,"4th":40,"a/e":1.02,"owner":"Godolphin","owner_id":"own_199380","runners":500,"win_%":0.24}},"app__models__trainers__Trainer":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","name"],"title":"Trainer","example":{"id":"trn_255042","name":"Charlie Appleby"}}},"securitySchemes":{"HTTPBasic":{"type":"http","scheme":"basic"}}},"meta":{"title":"The Racing API - Documentation"},"tags":[{"name":"Introduction","description":"<section id=\"info_introduction\">\n    <p><b>Welcome to <a href='https://www.theracingapi.com' target='_blank'>The Racing API</a></b></p>\n    <p>The Racing API provides a set of RESTful JSON endpoints, returning horse racing data from our database of over 500,000 results and pre-race racecards. The API is designed to meet the needs of application developers, data scientists, businesses and websites requiring punctual and accurate horse racing data.</p>\n    <p>This API reference contains the technical documentation users will require to connect their integrations and third-party applications.</p>\n    <p><b><a href='https://www.theracingapi.com/faq' target='_blank'>FAQ</a> | <a href='https://www.theracingapi.com/data-coverage' target='_blank'>Data Coverage</a> | <a href='https://www.theracingapi.com/terms-of-service' target='_blank'>Terms of Service</a></b></p>\n    <p><b>For support or feature requests, please email <a href='mailto:support@theracingapi.com'>support@theracingapi.com</a>.</b></p>\n</section>"},{"name":"Authentication","description":"<section id=\"info_authentication\">\n    <p>Once you <a href='https://www.theracingapi.com/#subscribe' target='_blank'><b>subscribe to The Racing API</b></a>, you will be able to login to your dashboard and view your API username and password.</p>\n    <p>In order to authenticate your requests, you should use <b>HTTP Basic Authentication</b>, passing your username and password (Base64 encoded) in the <b>Authorization header</b> of your request.</p>\n    <p>If your account becomes inactive, your invoice payment is overdue or you attempt to access endpoints not available to your subscription level, requests will return a <b>401 Unauthorized</b> response.</p>\n</section>"},{"name":"Rate Limits","description":"<section id=\"info_rate_limits\">\n    <p>Default limits for the API are <b>5 requests per second</b> for paid plans. Free plan users are limited to <b>1 request per second</b>.\n    <p>Some endpoints may have higher or lower rate limits than the default - these are specified in the documentation for each endpoint.</p>\n    <p>Exceeding the rate limit for a given endpoint will return a <b>429 Too Many Requests</b> response.\n    <p>Per-user rate limits are also enforced at the network edge: sustained request rates above <b>50 requests per 10 seconds</b> for an account are rejected before they reach the API, returning a <b>429 Too Many Requests</b> response with a <b>Retry-After</b> header. Well-behaved clients that respect the per-second limits above will never encounter this.</p>\n    <p>Additional IP based rate limits are applied via Cloudflare as a protective measure for the services endpoints - exceeding these will trigger cooling off periods before requests from that IP address are accepted again:</p>\n    <ul>\n        <li><b>>100 requests received in a 10 second period</b> - 5 minutes cooling off</li>\n        <li><b>>500 requests received in a 10 second period</b> - 30 minutes cooling off</li>\n    </ul>\n    <p>We constantly monitor traffic and may temporarily manually block any user's API keys and IP/IP ranges where we detect problematic activity - we will notify the user via email if this happens, and reinstate access once the problematic activity/excessive requests have ceased.</p>\n</section>"},{"name":"Endpoint Overview","description":"<section id=\"info_endpoint_overview\">\n    <h2>Core API</h2>\n    <p>The Racing API's Core API provides access to our primary horse racing data set, containing over three decades of horse racing results and updating with the latest data every 5 minutes.</p>\n    <p>This API provides full pre and post race data coverage of UK and Irish horse racing, as well as global coverage of group level races and selected handicaps. You can view a breakdown of coverage by year and region <a href='https://www.theracingapi.com/data-coverage' target='_blank'>here</a></p>\n    <p>Every user who subscribes to The Racing API gains access to some or all of the Core API endpoints, subject to their specific plan level.</p>\n    <p>The Core API is divided in to 11 top-level categories:</p>\n    <table>\n        <thead>\n            <th>Endpoint Category</th>\n            <th>Description</th>\n        </thead>\n        <tbody>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Courses'>/courses/</a></td>\n                <td>Course and region data, such as course names, course ids and region codes.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Dams'>/dams/</a></td>\n                <td>Dam data and analysis. Dams can be searched for by name and results/analysis of their progeny's race performances can be queried by dam id.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Damsires'>/damsires/</a></td>\n                <td>Damsire data and analysis. Damsires can be searched for by name and results/analysis of their grand offspring's race performances  can be queried by damsire id.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Horses'>/horses/</a></td>\n                <td>Horse data and analysis. Horses can be searched for by name and results/analysis of their race performances can be queried by horse id.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Jockeys'>/jockeys/</a></td>\n                <td>Jockey data and analysis. Jockeys can be searched for by name and results/analysis of their race performances can be queried by jockey id.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Odds'>/odds/</a></td>\n                <td>Detailed odds data for a given runner, including price movements.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Owners'>/owners/</a></td>\n                <td>Owner data and analysis. Owners can be searched for by name and results/analysis of their horse's race performances can be queried by owner id.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Racecards'>/racecards/</a></td>\n                <td>Detailed racecard (pre-race) data.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Results'>/results/</a></td>\n                <td>Detailed results (post-race) data.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Sires'>/sires/</a></td>\n                <td>Sire data and analysis. Sires can be searched for by name and results/analysis of their progeny's race performances can be queried by sire id.</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Trainers'>/trainers/</a></td>\n                <td>Trainer data and analysis. Trainers can be searched for by name and results/analysis of their horses's race performances can be queried by trainer id.</td>\n            </tr>\n        </tbody>\n    </table>\n    <h3>Core API Endpoints By Plan Level</h3>\n    <p>We have also grouped the core API endpoints by plan level to make it easier to find the endpoints relevant to your API key permissions:</p>\n    <ul>\n        <li><a href='#tag/Free-Plan'>Free Plan endpoints</a></li>\n        <li><a href='#tag/Basic-Plan'>Basic Plan endpoints</a></li>\n        <li><a href='#tag/Standard-Plan'>Standard Plan endpoints</a></li>\n        <li><a href='#tag/Pro-Plan'>Pro Plan endpoints</a></li>\n    </ul>\n    <h3>Analysis Endpoints</h3>\n    <p>The Core API's analysis endpoints perform data aggregation to return helpful betting & probability insights.</p>\n    <p>The statistics returned by these endpoints include:</p>\n    <ul>\n    <li><b>Win Percentage (win_%):</b> The number of wins divided by total runs/rides for a given query. For example, a win_% figure of 0.18 represents an 18% win percentage.</li>\n    <li><b>1 Unit Profit/Loss (1_pl):</b> Profit/loss for total rides/runs for a given query, if a 1 unit stake was placed at SP.</li>\n    <li><b>Actual/Expected (a/e):</b> Actual number of wins, divided by expected number of wins for a given query. Expected number of wins is calculated from SP. For a detailed explanation of this statistic, see <a href='https://ratingtheraces.com/blog/information/what-is-the-ae-statistic/#:~:text=A%2FE%20stands%20for%20Actual%20over%20Expected.&text=In%20this%20process%20we%20take,of%201%2F3.0%20%3D%200.33.' target='_blank'>here</a>.</li>\n    </ul>\n    <p><b>IMPORTANT NOTE:</b> Anaysis endpoints only perform data aggregation on results for which SP odds are available.</p>\n    <h2>Regional API's</h2>\n    <p>The Regional APIs provide access to additional data sets that provide complete coverage for a given region. The data and fields returned are also much more specific to that region than they may be in the Core API.</p>\n    <p>Accessing the endpoints for these data sets requires purchasing the relevant regional data add-on for your plan, which can be requested by emailing <b><a href='mailto:support@theracingapi.com'>support@theracingapi.com</a></b>.</p>\n    <p>The following top-level regional endpoints are available:\n     <table>\n        <thead>\n            <th>Region</th>\n            <th>Description</th>\n        </thead>\n        <tbody>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/Australia'>/australia/</a></td>\n                <td>Meets and races for Australia</td>\n            </tr>\n            <tr>\n                <td><a href='https://api.theracingapi.com/documentation#tag/North-America'>/north-america/</a></td>\n                <td>Meets, entries and results for the USA and Canada</td>\n            </tr>\n        </tbody>\n    </table>\n</section>"},{"name":"Changelog","description":"<section id=\"info_changelog\">\n    <h3>v1.4.3 (Current - February 2026)</h3>\n    <ul>\n        <li><b>OpenAPI Response Examples</b> - Added rich response examples to Pydantic models for all regions</li>\n        <li><b>Pydantic v2 Migration</b> - Upgraded to Pydantic 2 with model updates</li>\n        <li><b>Analytics Backend Optimization</b> - New synchronised columnar database for results data, utilised by analysis endpoints for substantially improved performance</li>\n        <li><b>Default Date Parameters</b> - Results endpoints now include default date parameters</li>\n    </ul>\n    <h3>v1.4.2 (January 2026)</h3>\n    <ul>\n        <li><b>Async Database Operations</b> - Full async migration for database operations</li>\n        <li><b>Enhanced Documentation</b> - Code examples and endpoints organized by plan level</li>\n        <li><b>Improved Error Tracking</b> - Optimized error tracing</li>\n    </ul>\n    <h3>v1.4.1 (December 2025)</h3>\n    <ul>\n        <li><b>Autoscaling</b> - Added dynamic worker scaling</li>\n        <li><b>Enhanced Error Monitoring</b> - Improved error tracking and monitoring</li>\n        <li><b>Database Compression</b> - Added compression for database connections</li>\n        <li><b>Australia Date Validation</b> - Improved date handling for Australia endpoints</li>\n    </ul>\n    <h3>v1.4.0 (August-October 2025)</h3>\n    <ul>\n        <li><b>Australia Regional API</b> - Full Australia racing data support (meets, races, runners)</li>\n        <li><b>Australia Historical Results Add-on</b> - Historical data access as add-on feature</li>\n        <li><b>Odds History</b> - Optional bookmaker odds history</li>\n    </ul>\n    <h3>v1.3.1 (June-July 2025)</h3>\n    <ul>\n        <li><b>Response Compression</b> - GZip compression middleware</li>\n        <li><b>Faster Serialization</b> - Optimized JSON serialization for responses</li>\n        <li><b>Racecard Sorting</b> - Improved racecard ordering</li>\n        <li><b>Health Check Endpoint</b> - Added /health endpoint</li>\n    </ul>\n    <h3>v1.3.0 (July-August 2023)</h3>\n    <ul>\n        <li><b>North America Regional API</b> - Full North America racing data support (meets, entries, results)</li>\n        <li><b>Meets Endpoint</b> - Track meet information</li>\n        <li><b>Racecard Summaries</b> - Lightweight racecard summary endpoint</li>\n        <li><b>Jumps Racing Filter</b> - Filter racecards by jumps/flat racing</li>\n    </ul>\n    <h3>v1.2.0 (April-June 2023)</h3>\n    <ul>\n        <li><b>Odds Data</b> - Live odds data for racecards</li>\n        <li><b>Pro Tier</b> - New Pro subscription tier with advanced features</li>\n        <li><b>Pro Add-on Support</b> - Add-on purchases for additional features</li>\n        <li><b>Big Races Endpoints</b> - Featured/notable race identification</li>\n        <li><b>Endpoint Deprecation System</b> - Managed deprecation for API versioning</li>\n    </ul>\n    <h3>v1.1.0 (February-March 2023)</h3>\n    <ul>\n        <li><b>Region Support</b> - GB/IE region filtering for results</li>\n        <li><b>Today's Results</b> - Dedicated today's results endpoint</li>\n        <li><b>Historic Results</b> - Date range queries for historical data</li>\n        <li><b>Big Races Feature</b> - Big race entries identification</li>\n        <li><b>Silk URLs</b> - Jockey silk image URLs in responses</li>\n    </ul>\n    <h3>v1.0.0 (January 2023 - Initial Release)</h3>\n    <ul>\n        <li><b>Core API</b> - FastAPI-based REST API</li>\n        <li><b>API Authentication</b> - Secure authentication system</li>\n        <li><b>Racecards Endpoints</b> - Basic and advanced racecards</li>\n        <li><b>Courses Endpoint</b> - List courses with region filtering</li>\n        <li><b>Results Endpoints</b> - Horse racing results</li>\n        <li><b>Error Tracking</b> - Integrated error tracking</li>\n    </ul>\n</section>"}],"x-tagGroups":[{"name":"Get Started","tags":["Introduction","Authentication","Endpoint Overview","Rate Limits","Changelog"]},{"name":"Core API","tags":["Courses","Dams","Damsires","Horses","Jockeys","Odds","Owners","Racecards","Results","Sires","Trainers"]},{"name":"Core API (by plan level)","tags":["Free Plan","Basic Plan","Standard Plan","Pro Plan"]},{"name":"Regional APIs","tags":["Australia","North America"]}]}