openapi: 3.1.0 info: title: The Racing Australia Trainers API version: 1.4.3 x-logo: url: https://www.theracingapi.com/static/images/logo_padded.png description: High performance API for horse racing statistical modelling, application development and web content. Complete coverage of UK, Irish and Hong Kong horse racing. contact: url: https://www.theracingapi.com/ x-generated-from: official-openapi-spec servers: - url: https://api.theracingapi.com description: Production server tags: - name: Trainers paths: /v1/trainers/search: get: tags: - Trainers summary: The Racing API Trainer Search description:

Search trainers by name

Min. Required PlanStandard
Rate Limit5 requests per second
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 ' label: cURL - lang: Python source: 'import requests from requests.auth import HTTPBasicAuth url = "https://api.theracingapi.com/v1/trainers/search" params = {} response = requests.request("GET", url, auth=HTTPBasicAuth(''USERNAME'',''PASSWORD''), params=params) print(response.json())' label: Python3 - lang: PHP source: "" 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'' require ''uri'' require ''json'' params = {} uri = URI(''https://api.theracingapi.com/v1/trainers/search'') uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(''USERNAME'', ''PASSWORD'') response = http.request(request) puts JSON.parse(response.body)' label: Ruby - lang: Java source: "import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap 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 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 x-microcks-operation: delay: 0 dispatcher: FALLBACK /v1/trainers/{trainer_id}/results: get: tags: - Trainers summary: The Racing API Trainer Results description:

Get full historical results for a trainer

Min. Required PlanPro
Rate Limit5 requests per second
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:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

Default: 365 days ago. Can query back to 1988-01-01.

title: Start Date description:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

Default: 365 days ago. Can query back to 1988-01-01.

- name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

Default: Today's date. Maximum range between start and end date is 365 days.

title: End Date description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

Default: Today's date. Maximum range between start and end date is 365 days.

- name: region in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' title: Region description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' - name: course in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Query by course ids. Get the full list here. title: Course description: Query by course ids. Get the full list here. - name: type in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' title: Type description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' - name: going in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' title: Going description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' - name: race_class in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' title: Race Class description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' - name: min_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by minimum race distance (yards)

title: Min Distance Y description:

Query by minimum race distance (yards)

- name: max_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by maximum race distance (yards)

title: Max Distance Y description:

Query by maximum race distance (yards)

- name: age_band in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' title: Age Band description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' - name: sex_restriction in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' title: Sex Restriction description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' - 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 ' label: cURL - lang: Python source: 'import requests from requests.auth import HTTPBasicAuth url = "https://api.theracingapi.com/v1/trainers/{trainer_id}/results" params = {} response = requests.request("GET", url, auth=HTTPBasicAuth(''USERNAME'',''PASSWORD''), params=params) print(response.json())' label: Python3 - lang: PHP source: "" 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'' require ''uri'' require ''json'' params = {} uri = URI(''https://api.theracingapi.com/v1/trainers/{trainer_id}/results'') uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(''USERNAME'', ''PASSWORD'') response = http.request(request) puts JSON.parse(response.body)' label: Ruby - lang: Java source: "import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap 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 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 x-microcks-operation: delay: 0 dispatcher: FALLBACK /v1/trainers/{trainer_id}/analysis/horse-age: get: tags: - Trainers summary: The Racing API Trainer Horse Age Analysis description:

Get trainer statistics by horse age

Min. Required PlanStandard
Rate Limit5 requests per second
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:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

title: Start Date description:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

- name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

title: End Date description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

- name: region in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' title: Region description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' - name: course in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Query by course ids. Get the full list here. title: Course description: Query by course ids. Get the full list here. - name: type in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' title: Type description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' - name: going in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' title: Going description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' - name: race_class in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' title: Race Class description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' - name: min_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by minimum race distance (yards)

title: Min Distance Y description:

Query by minimum race distance (yards)

- name: max_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by maximum race distance (yards)

title: Max Distance Y description:

Query by maximum race distance (yards)

- name: age_band in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' title: Age Band description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' - name: sex_restriction in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' title: Sex Restriction description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' 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 ' label: cURL - lang: Python source: 'import requests from requests.auth import HTTPBasicAuth url = "https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age" params = {} response = requests.request("GET", url, auth=HTTPBasicAuth(''USERNAME'',''PASSWORD''), params=params) print(response.json())' label: Python3 - lang: PHP source: "" 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'' require ''uri'' require ''json'' params = {} uri = URI(''https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/horse-age'') uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(''USERNAME'', ''PASSWORD'') response = http.request(request) puts JSON.parse(response.body)' label: Ruby - lang: Java source: "import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap 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 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 x-microcks-operation: delay: 0 dispatcher: FALLBACK /v1/trainers/{trainer_id}/analysis/courses: get: tags: - Trainers summary: The Racing API Trainer Course Analysis description:

Get trainer statistics by course

Min. Required PlanStandard
Rate Limit5 requests per second
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:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

title: Start Date description:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

- name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

title: End Date description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

- name: region in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' title: Region description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' - name: course in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Query by course ids. Get the full list here. title: Course description: Query by course ids. Get the full list here. - name: type in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' title: Type description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' - name: going in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' title: Going description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' - name: race_class in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' title: Race Class description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' - name: min_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by minimum race distance (yards)

title: Min Distance Y description:

Query by minimum race distance (yards)

- name: max_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by maximum race distance (yards)

title: Max Distance Y description:

Query by maximum race distance (yards)

- name: age_band in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' title: Age Band description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' - name: sex_restriction in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' title: Sex Restriction description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' 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 ' label: cURL - lang: Python source: 'import requests from requests.auth import HTTPBasicAuth url = "https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses" params = {} response = requests.request("GET", url, auth=HTTPBasicAuth(''USERNAME'',''PASSWORD''), params=params) print(response.json())' label: Python3 - lang: PHP source: "" 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'' require ''uri'' require ''json'' params = {} uri = URI(''https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/courses'') uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(''USERNAME'', ''PASSWORD'') response = http.request(request) puts JSON.parse(response.body)' label: Ruby - lang: Java source: "import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap 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 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 x-microcks-operation: delay: 0 dispatcher: FALLBACK /v1/trainers/{trainer_id}/analysis/distances: get: tags: - Trainers summary: The Racing API Trainer Distance Analysis description:

Get trainer statistics by race distance

Min. Required PlanStandard
Rate Limit5 requests per second
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:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

title: Start Date description:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

- name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

title: End Date description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

- name: region in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' title: Region description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' - name: course in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Query by course ids. Get the full list here. title: Course description: Query by course ids. Get the full list here. - name: type in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' title: Type description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' - name: going in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' title: Going description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' - name: race_class in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' title: Race Class description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' - name: min_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by minimum race distance (yards)

title: Min Distance Y description:

Query by minimum race distance (yards)

- name: max_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by maximum race distance (yards)

title: Max Distance Y description:

Query by maximum race distance (yards)

- name: age_band in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' title: Age Band description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' - name: sex_restriction in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' title: Sex Restriction description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' 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 ' label: cURL - lang: Python source: 'import requests from requests.auth import HTTPBasicAuth url = "https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances" params = {} response = requests.request("GET", url, auth=HTTPBasicAuth(''USERNAME'',''PASSWORD''), params=params) print(response.json())' label: Python3 - lang: PHP source: "" 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'' require ''uri'' require ''json'' params = {} uri = URI(''https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/distances'') uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(''USERNAME'', ''PASSWORD'') response = http.request(request) puts JSON.parse(response.body)' label: Ruby - lang: Java source: "import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap 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 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 x-microcks-operation: delay: 0 dispatcher: FALLBACK /v1/trainers/{trainer_id}/analysis/jockeys: get: tags: - Trainers summary: The Racing API Trainer Jockey Analysis description:

Get trainer statistics by jockey

Min. Required PlanStandard
Rate Limit5 requests per second
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:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

title: Start Date description:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

- name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

title: End Date description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

- name: region in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' title: Region description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' - name: course in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Query by course ids. Get the full list here. title: Course description: Query by course ids. Get the full list here. - name: type in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' title: Type description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' - name: going in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' title: Going description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' - name: race_class in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' title: Race Class description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' - name: min_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by minimum race distance (yards)

title: Min Distance Y description:

Query by minimum race distance (yards)

- name: max_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by maximum race distance (yards)

title: Max Distance Y description:

Query by maximum race distance (yards)

- name: age_band in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' title: Age Band description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' - name: sex_restriction in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' title: Sex Restriction description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' 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 ' label: cURL - lang: Python source: 'import requests from requests.auth import HTTPBasicAuth url = "https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys" params = {} response = requests.request("GET", url, auth=HTTPBasicAuth(''USERNAME'',''PASSWORD''), params=params) print(response.json())' label: Python3 - lang: PHP source: "" 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'' require ''uri'' require ''json'' params = {} uri = URI(''https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/jockeys'') uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(''USERNAME'', ''PASSWORD'') response = http.request(request) puts JSON.parse(response.body)' label: Ruby - lang: Java source: "import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap 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 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 x-microcks-operation: delay: 0 dispatcher: FALLBACK /v1/trainers/{trainer_id}/analysis/owners: get: tags: - Trainers summary: The Racing API Trainer Owner Analysis description:

Get trainer statistics by owner

Min. Required PlanStandard
Rate Limit5 requests per second
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:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

title: Start Date description:

Query from date with format YYYY-MM-DD, e.g. 2020-01-01

- name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

title: End Date description:

Query to date with format YYYY-MM-DD, e.g. 2020-01-01

- name: region in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' title: Region description: '

Query by region codes. Get the full list here.

Note: If the course query parameter is specified, this will be ignored.

' - name: course in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Query by course ids. Get the full list here. title: Course description: Query by course ids. Get the full list here. - name: type in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' title: Type description: '

Query by race type

Options: chase, flat, hurdle, nh_flat

' - name: going in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' title: Going description: '

Query by going

Options: fast, firm, good, good_to_firm, good_to_soft, good_to_yielding, hard, heavy, holding, muddy, sloppy, slow, soft, soft_to_heavy, standard, standard_to_fast, standard_to_slow, very_soft, yielding, yielding_to_soft

' - name: race_class in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' title: Race Class description: '

Query by class

Options: class_1, class_2, class_3, class_4, class_5, class_6, class_7

' - name: min_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by minimum race distance (yards)

title: Min Distance Y description:

Query by minimum race distance (yards)

- name: max_distance_y in: query required: false schema: anyOf: - type: integer - type: 'null' description:

Query by maximum race distance (yards)

title: Max Distance Y description:

Query by maximum race distance (yards)

- name: age_band in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' title: Age Band description: '

Query by age band

Options: 10yo+, 2-3yo, 2yo, 2yo+, 3-4yo, 3-5yo, 3-6yo, 3yo, 3yo+, 4-5yo, 4-6yo, 4-7yo, 4-8yo, 4yo, 4yo+, 5-6yo, 5-7yo, 5-8yo, 5yo, 5yo+, 6-7yo, 6yo, 6yo+, 7yo+, 8yo+, 9yo+

' - name: sex_restriction in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' title: Sex Restriction description: '

Query by sex restriction

Options: c&f, c&g, f, f&m, m, m&g

' 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 ' label: cURL - lang: Python source: 'import requests from requests.auth import HTTPBasicAuth url = "https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners" params = {} response = requests.request("GET", url, auth=HTTPBasicAuth(''USERNAME'',''PASSWORD''), params=params) print(response.json())' label: Python3 - lang: PHP source: "" 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'' require ''uri'' require ''json'' params = {} uri = URI(''https://api.theracingapi.com/v1/trainers/{trainer_id}/analysis/owners'') uri.query = URI.encode_www_form(params) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request.basic_auth(''USERNAME'', ''PASSWORD'') response = http.request(request) puts JSON.parse(response.body)' label: Ruby - lang: Java source: "import java.net.http.*;\nimport java.util.Base64;\nimport java.util.Map;\n\nMap 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 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 x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: 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 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 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 HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError 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 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 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: '' 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' comment: Held up in rear - headway 3 out - went third after 2 out - challenging when not fluent last - led home turn - ridden clear final furlong(op 13/2) 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 position: '1' prize: €5900 rpr: '105' sex: G silk_url: https://www.url-for-silk.com/svg/456789.svg sire: Kendargent (FR) sire_id: sir_4514419 sp: 15/2 sp_dec: '8.50' time: '5:44.90' trainer: Gerard Keane trainer_id: trn_86382 tsr: '64' weight: 11-12 weight_lbs: '166' 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 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 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 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 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__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 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 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 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' comment: Held up in rear - headway 3 out - went third after 2 out - challenging when not fluent last - led home turn - ridden clear final furlong(op 13/2) 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 position: '1' prize: €5900 rpr: '105' sex: G silk_url: https://www.url-for-silk.com/svg/456789.svg sire: Kendargent (FR) sire_id: sir_4514419 sp: 15/2 sp_dec: '8.50' time: '5:44.90' trainer: Gerard Keane trainer_id: trn_86382 tsr: '64' 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) securitySchemes: HTTPBasic: type: http scheme: basic 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