A bay horse grazes alone on open downland beneath a heavy, grey sky, with distant hedgerows and bare trees.

A horse racing data pipeline starts with a plain question: what arrives each night, and can you trust it?

Take one recent day. The UK and Ireland card ran to 38 races and 415 runners across five courses: Bath, Ffos-Las, Punchestown, Southwell and Stratford. The feature race was the Irish Stallion Farms EBF Fillies Maiden at Punchestown, 13:05, over 1m on yielding to soft-yielding in places. Hong Kong had no racing that day.

That is one ordinary day. Once racing finishes, it becomes rows in your database. This article looks at four things teams build on that daily flow: ingestion pipelines, model features, trainer dashboards and backtests.

None of them is a tipping product. All of them depend on the same thing: data that stays consistent from one night to the next.

What the data is, in brief

HRDB holds 2.2M result records across 226K races and 173K horses, covering 85+ racecourses. Hong Kong history runs from 1979. UK and Ireland history runs from 2011.

Sectional times are available for Hong Kong from 2008 and for the UK from 2017.

Racecards and results are updated daily, after racing. This is not a live or real-time feed, and there are no webhooks. Every build below is designed around that rhythm.

The public API documentation lists 26 UK and 30 Hong Kong data endpoints:

  • races
  • racecards
  • records (results)
  • horses
  • jockeys
  • trainers
  • courses
  • Hong Kong veterinary records

UK and Hong Kong data live in separate, isolated schemas.

Build 1: a nightly ingestion pipeline

This is the most common starting point, and the simplest to reason about. Your job runs once a day, after racing, and pulls what changed.

A typical shape:

  1. Exchange your API key for a token with POST /auth/token. The token is valid for 24 hours, so one exchange per run is enough.
  2. Check your quota with GET /user/usage. It reports quota used and remaining, and it does not consume a call.
  3. Pull results and racecards for the day.
  4. Upsert into your own tables, keyed on the stable identifiers.
  5. Log the row counts and compare them with what you expected.

Step 5 is where a day like that helps. If a card shows 38 races and 415 runners, you can check your load against those figures. A mismatch is a signal to investigate before anything downstream runs.

Because UK and Hong Kong data sit in separate schemas, many teams run two independent jobs. A quiet Hong Kong day, like that one, then needs no special handling. The job simply finds nothing to load.

Keep the pipeline idempotent. Re-running a night should never double your rows. Stable IDs make that straightforward.

Build 2: model features from history and sectionals

Model builders care about three things: depth, identifiers and sectionals.

Depth matters because features such as recent form, course history and distance preferences need long runs of comparable records. Hong Kong offers history from 1979. UK and Ireland offers it from 2011.

Identifiers matter because a feature is only as good as the join behind it. If a horse, jockey or trainer cannot be linked reliably across years, rolling features quietly go wrong.

Sectionals are the part few providers offer. Hong Kong has them from 2008 and the UK from 2017. Teams use them to describe how a race was run, not only where a horse finished.

Some feature ideas, all derived from your own method:

  • A horse’s closing sectional relative to the rest of the field in the same race
  • Pace shape of a race, built from early and late sections
  • Course- and going-specific history from results
  • Days since last run, from the results record

We do not suggest which features matter. You know your models better than we do. What we can say is that the inputs are consistent, and that sectional coverage differs by region. Plan your training windows around those start dates.

Do not mix UK sectional-era data with earlier UK data without handling the gap. Before 2017, UK sectionals are absent. Treat that as missing by design, not as zero.

Build 3: trainer and jockey dashboards

B2B analytics teams often build something less glamorous and more durable: an internal dashboard.

Typical views:

  • A trainer’s runners by course and race type over a season
  • A jockey’s rides by course and distance band
  • Course profiles: race types, typical field sizes, going descriptions
  • Veterinary records for Hong Kong, alongside runner history

That day’s mix of Flat Turf, Hurdle, Chase and Flat AW races shows why race type needs to be a first-class field. A trainer who runs over jumps at Stratford and on the all-weather at Southwell should not be averaged into a single line.

The trainers, jockeys and courses endpoints give you the reference tables. Results provide the facts. A dashboard is then a set of joins and aggregations.

The reliability question here is schema stability. A dashboard that breaks when a field is renamed costs more than the data itself. That is why teams in this group ask about support and change handling before they ask about coverage.

Build 4: backtesting with a clean timeline

Backtesting means replaying history through a method to see how it would have behaved. It is a test of your process, not a forecast of anything.

Three habits keep a backtest honest:

  1. Separate training from testing by date. Never let later races leak into earlier features.
  2. Rebuild features as of the race date. A trainer’s record should reflect only what had happened by then.
  3. Check the data, not only the model. If a horse appears in two races on the same day, your results are suspect before you start.

The third habit is where data integrity stops being abstract. A duplicate runner row or a missing jockey ID does not announce itself. It simply shifts an average, and you may never notice.

Historical depth also helps you test across different conditions: different courses, going, race types and, for Hong Kong, a much longer span. We do not make claims about what a method will do. We only describe the history it can be tested against.

Why the same four checks keep appearing

Every build above depends on one assumption: that the data is internally consistent. So every nightly update passes automated integrity gates before it is published:

  • No horse assigned to two races on the same day
  • No duplicate runner rows
  • No missing horse, jockey or trainer IDs
  • Separation of different horses that share a name

The last gate matters more than it sounds. Racing reuses names. Two different horses with the same name must remain two different records, or your features will blend their histories.

These gates run before publication. Your pipeline still deserves its own checks, and we would encourage them. But you start from data that has already been tested for the most damaging faults.

Dataset or API for each build

The builds above map to two ways of getting data.

Historical datasets in CSV, SQL and JSON suit work that starts with a large load: training a model, building a backtest, populating a warehouse.

The REST API suits the daily flow: nightly ingestion, dashboards that refresh each morning, and products that need the latest cards and results.

Many teams use both. They load history once from a dataset, then keep it current through the API. Bespoke exports and enterprise support exist for cases that fit neither pattern.

API access is provisioned automatically after purchase. Each plan has a usage quota, and add-on packs provide extra calls if you need them. For current plans, see the plans page rather than relying on anything written here.

Planning around the limits

A few points are worth settling at design time:

  • Daily, not live. Data is updated after racing. If your product needs in-race updates, this is not the source.
  • Quota. Check GET /user/usage at the start of each run. It costs nothing, and it tells you whether the day’s job fits.
  • Token lifetime. Tokens last 24 hours. Refresh at the start of each job instead of caching across days.
  • Regional differences. Sectionals begin in 2008 for Hong Kong and 2017 for the UK. History begins in 1979 and 2011 respectively.
  • Coverage. We currently cover the United Kingdom, Ireland and Hong Kong. Other regions are not available.

A short evaluation checklist

If you are deciding whether this fits your build, test these five things in a trial run:

  1. Load one night and compare race and runner counts with the card.
  2. Join results to horse, jockey and trainer tables and count the unmatched rows.
  3. Look for any horse listed twice on one day.
  4. Pull sectionals for a period you care about and check the start dates against your training window.
  5. Run GET /user/usage before and after a job and confirm the quota behaves as you expect.

If those pass, the rest is engineering. The data is built so that the engineering stays boring, and that is the point.

Whatever you build, whether a pipeline, a feature store, a dashboard or a backtest, the thread is the same: a source you can trust, every night.

Next step: Explore the datasets

Categories:

Tags:

Comments are closed

0
    0
    Your Cart
    Your cart is emptyReturn to Shop