Alpha — Headcode is currently in alpha. APIs and data formats may change as we build.

Twelve messy feeds.
One station identity.
One clean API.

UK rail data is scattered across a dozen separate feeds that don't talk to each other. Headcode pulls them together into one simple JSON API. Pass in whatever station code you have, get back every identifier, and see live trains right alongside the timetable.

The problem

UK rail data is free. Making sense of it isn't.

Every rail feed uses different codes for the exact same station: CRS for tickets, TIPLOC for timetables, STANOX for track tracking. Big stations like London Bridge even have multiple codes across different platforms. Worse, every feed turns up in a different format on a different schedule. Before you can show a single departure board, you're stuck building translation tables and data pipelines just to connect the dots. Headcode does that dirty work for you, serving clean JSON with standard names and metric units.

Without Headcode

Rail Data MarketplaceDarwin push portNetwork Rail Open DataNaPTANORRCIF schedulesTIPLOC / STANOX maps
KGXKNGX543116121009100KNGX

With Headcode

GET /v1/stations/KGX

One station lookup gives you all its codes, timetable data, and live running times joined together.

  • No translation tables to maintain
  • No mismatched feeds or formats
  • No home-brewed scrapers breaking at 7:00 AM

One request

Timetable and live delays in one response

Want the next departures from King's Cross to York and Edinburgh? Send one request with the 3-letter station code you already know. Headcode matches the station, pulls the timetable, and checks live running times. You get scheduled departures and live delays side by side—no second lookup needed.

curl https://api.headcode.dev/v1/stations/KGX/next?destinations=YRK,EDB \
  -H "Authorization: Bearer hc_…"
{
  "destinations": {
    "YRK": [
      {
        "rid": "202605141A45",
        "uid": "C12345",
        "toc_code": "GR",
        "scheduled_public": "10:03",
        "estimated": "10:05"
      }
    ],
    "EDB": [  ]
  }
}

GET /v1/stations/{id}/next — included on every plan, including Free.

  • rid + uid

    Look up the full train with /v1/services/{service_id}: calling points, carriages, and live progress.

  • toc_code

    Train company code. Resolves to full operator details through /v1/operators.

  • estimated vs scheduled_public

    Scheduled timetable time stays fixed; estimated updates live from Darwin. Both arrive in one object.

Station codes

Use whatever station code you have

Don't worry about which code format you start with. Pass a 3-letter CRS code, a timetable TIPLOC, a STANOX tracking code, an NLC ticket code, or an ATCO stop ID. Any of them finds the station, and the response gives you every known identifier back. Railway junctions, sidings, and depots are included too.

Send any one of these:

GET /v1/stations/KGX the same station, every time.

London King's Cross
CRSKGX
TIPLOCKNGX
STANOX54311
NLC612100
ATCO9100KNGX
UIC61210
sluglondon-kings-cross

Look up any station with GET /v1/stations/{id}. Search by name or GPS coordinates with GET /v1/stations.

Capabilities

Everything you need to build rail features

Raw rail feeds only give you fragments. Headcode gives you complete answers—cleaned, joined, and ready to use. Built for live travel apps, departure screens, logistics tools, and analytics. Every endpoint is documented with clear OpenAPI schemas.

Pricing

Simple plans with clear limits

Try it free, upgrade when you launch. Every plan gives you full access to live boards and station lookups. Rate limits apply across your entire account, so you can create multiple API keys without dividing your quota.

Free
Free
  • 100 requests/day
  • 2 req/s burst
  • 2 API keys
  • Boards, services, train order, disruptions, reference
Request access
Most production apps
Starter
£29/month
  • 10,000 requests/day
  • 10 req/s burst
  • 5 API keys
  • Everything in Free, plus feed health monitoring
Buy Starter
History + analytics
Pro
£149/month
  • 100,000 requests/day
  • 50 req/s burst
  • 25 API keys
  • 13-month history, plus Performance & Footfall add-ons
Buy Pro
Enterprise
Custom
  • Dedicated throughput above 50 req/s
  • Contractual SLA
  • Custom keys & volume
  • Dedicated support & custom data
Talk to us
What each plan unlocks
CapabilityScopeFreeStarterProEnt.
Live station boardsboards:read
Reference data (stations, operators, reason codes, locations)reference:read
Service lookupservices:read
Train ordertrain-order:read
Disruptionsdisruptions:read
Feed health (heartbeat, alarms)operations:read
Historical data (13-month lookback)history:read
Performance analyticsperformance:readAdd-on
Footfallfootfall:readAdd-on
Throughput M
Raise burst to 25 req/s
+£15/month
Throughput L
Raise burst to 50 req/s
+£35/month
Volume M
+25,000 requests/day
+£10/month
Volume L
+50,000 requests/day
+£18/month
Performance analytics
Aggregate punctuality metrics
+£49/month
Footfall
Station passenger-flow estimates
+£69/month

Starter, Pro, and all add-ons are available to buy online right now on the checkout page, or add them later from your billing dashboard. Add-on prices may change before general launch.

Get started

Start building in minutes

Starter and Pro are ready right now: choose your plan, pay by card, and log in to create your API key immediately. Want to test things out first? Email us with what you're working on and we'll send you a free key to build against.

Pay by card Free test tier Clean OpenAPI spec