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
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/damsires/{damsire_id}/results:
get:
tags:
- Damsires
summary: The Racing API Damsire Grandoffspring Results
description: Get full historical results for a damsire's grandoffspring
| Min. Required Plan | Pro |
| Rate Limit | 5 requests per second |
ℹ️ To view a damsire's own racing results, use the horse results endpoint, repacing the 'dsi_' id prefix with 'hrs_'.
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: 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/damsires/{damsire_id}/results
'
label: cURL
- lang: Python
source: 'import requests
from requests.auth import HTTPBasicAuth
url = "https://api.theracingapi.com/v1/damsires/{damsire_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/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''
require ''uri''
require ''json''
params = {}
uri = URI(''https://api.theracingapi.com/v1/damsires/{damsire_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/damsires/{damsire_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/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
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/damsires/{damsire_id}/analysis/classes:
get:
tags:
- Damsires
summary: The Racing API Damsire Grandoffspring Class Analysis
description: Get damsire grandoffspring statistics by race class
| Min. Required Plan | Standard |
| Rate Limit | 5 requests per second |
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: 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/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
'
label: cURL
- lang: Python
source: 'import requests
from requests.auth import HTTPBasicAuth
url = "https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes"
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/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''
require ''uri''
require ''json''
params = {}
uri = URI(''https://api.theracingapi.com/v1/damsires/{damsire_id}/analysis/classes'')
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/damsires/{damsire_id}/analysis/classes\"))\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/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
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v1/damsires/{damsire_id}/analysis/distances:
get:
tags:
- Damsires
summary: The Racing API Damsire Grandoffspring Distance Analysis
description: Get damsire grandoffspring statistics by race distance
| Min. Required Plan | Standard |
| Rate Limit | 5 requests per second |
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: 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/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
'
label: cURL
- lang: Python
source: 'import requests
from requests.auth import HTTPBasicAuth
url = "https://api.theracingapi.com/v1/damsires/{damsire_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/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''
require ''uri''
require ''json''
params = {}
uri = URI(''https://api.theracingapi.com/v1/damsires/{damsire_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/damsires/{damsire_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/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
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
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)
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
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
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'
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
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
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
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
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