Skip to content

TutorialsLesson 5 of 15Racing data8 min read

Horse search and declared horse profiles

Search declared horses by name with /v1/horses/search and fetch a runner profile with /v1/horses/{id}, including weight, connections, form rows and prices.

  • Build a server-side horse name search
  • Fetch one declared runner by ID
  • Understand what a daily profile is and is not

Fetching a declared horse profile

GET/v1/horses/{id}All live plans

The horse as declared in the selected feed, with weight, connections, form rows and prices.

Replace {id} with a horse ID from a racecard runner or a search hit. The profile contains name, age, gender, weight, weightLbs, rating, stall, distance, jockey and trainer objects, supplied form rows and odds rows. These come from that day's declarations. It is a runner profile, not a career archive.

curl --fail-with-body \
  "https://racingapi.net/v1/horses/$HORSE_ID?region=uk&date=$RACE_DATE" \
  -H "X-API-Key: $RACINGAPI_KEY"

Set RACE_DATE to the same YYYY-MM-DD used for discovery; the PHP example defaults to today if it is unset. Run its printf output in a terminal, or HTML-escape it before displaying it on a page. weight preserves source text: do not assume a unit or convert an unexplained code. weightLbs is the supplied pounds field, not a calculation. A blank rating or stall means not supplied. A horse absent from the selected feed returns 404.

Where the profile leads

DiagramFrom a horse to its connections
From a horse to its connections: step 1, Horse id; step 2, Form statistics; step 3, Jockey and trainer ids; step 4, Silk image.1 YOUR SERVERHorse id2 RACINGAPI.NETForm statistics3 RACINGAPI.NETJockey and trainer ids4 CACHESilk image
  1. 1Horse id. From search or a racecard runner.
  2. 2Form statistics. /v1/horses/{id}/form with raceId for the summary rows.
  3. 3Jockey and trainer ids. Open /v1/jockeys/{id} or /v1/trainers/{id} for that day's bookings.
  4. 4Silk image. /v1/silks/{id} with raceId, proxied by your server.
Each ID in a profile opens another daily-feed lookup with the same date.

Continue with Horse form statistics and Jockeys and trainers. Schemas are in the API reference.

Reference material

Exact schemas: API reference. First call: Quickstart. Copy-ready helpers: Code examples. Plans: Pricing.