Skip to content

TutorialsLesson 4 of 15Racing data9 min read

Results and dividends: finishers, starting prices and wagers

List published UK and Irish results with /v1/results, fetch one race with /v1/results/{raceId}, and render finishers, starting prices and source dividend records.

  • List a day's published results
  • Fetch one result by race ID
  • Render finishers and wager records without guessing

Listing a day's results

GET/v1/resultsAll live plans

Paginated races that have published finishers in the selected feed.

The list only contains races with a non-empty finishers array. On a race day it normally grows as results arrive. An empty list means this request returned no published finishers: there may be no meetings, results may not yet be available, or historical coverage may be incomplete. It is not proof of abandonment. Results use raceId rather than id; use that field when joining them to racecards.

Use the same day selectors as racecards: nothing for today, date=YYYY-MM-DD for an earlier day. UK archive dates have been sampled successfully back to 2016, which is not a promise that every intervening day is complete. Pagination is identical too: request until page * limit >= meta.total.

const url = new URL("/v1/results", "https://racingapi.net");
url.searchParams.set("region", "uk");
if (process.env.RACE_DATE) url.searchParams.set("date", process.env.RACE_DATE);
url.searchParams.set("limit", "100");

const res = await fetch(url, { headers: { "X-API-Key": process.env.RACINGAPI_KEY } });
const body = await res.json();
if (!res.ok) throw new Error(body.code + " " + body.requestId);

for (const result of body.data) {
  const winner = result.finishers.find(f => f.position === "1");
  console.log(result.raceId, result.course.name, result.name, winner ? winner.name : "no winner listed");
}

One race result

GET/v1/results/{raceId}All live plans

Finishers and wagers for one race in the selected feed.

The examples above fetch one page for today unless you set RACE_DATE to YYYY-MM-DD. For yesterday, calculate yesterday's calendar date in Europe/London, then supply it. To retrieve a complete day, follow meta.total using the pagination loop from Racecards. Replace {raceId} with a discovered ID and carry the same date. A 404 can mean a result is not yet published, but also a wrong ID, wrong date or unavailable archive. Only treat it as pending when you have verified that race in the matching racecards, and use bounded polling.

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

Rendering finishers and dividends

FieldHow to display it
positionFinishing position or a non-numeric outcome code. Do not cast to a number blindly.
name, horseIdHorse name; horseId joins back to racecard runners.
startingPriceThe source SP string, without conversion.
distanceBeaten distance or margin text as supplied.
jockey, trainerDisplay names. Trainer can be empty when not supplied; it is never guessed.
silkUrlAuthenticated relative image path; fetch through your server.
Finisher fields (all strings)

wagers[] holds source dividend and pool records with type, numbers, payoff and pool. Display them as published. The currency and stake basis of payoff are not inferred, so label the table 'Dividends as supplied' and avoid computing returns from them.

DiagramFrom racecard to result
From racecard to result: step 1, Racecard race.id; step 2, Poll results list; step 3, Match on raceId; step 4, Stop polling that race.1 YOUR SERVERRacecard race.id2 RACINGAPI.NETPoll results list3 CACHEMatch on raceId4 STOPStop polling that race
  1. 1Racecard race.id. Store the ID and the day you discovered it on.
  2. 2Poll results list. After the off, check the day's list on a slow interval.
  3. 3Match on raceId. When the race appears, read finishers and wagers.
  4. 4Stop polling that race. Published results change rarely; cache them for minutes, not seconds.
Race IDs carry across; the result object names it raceId.

Reference material

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