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
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+uidLook up the full train with
/v1/services/{service_id}: calling points, carriages, and live progress.toc_codeTrain company code. Resolves to full operator details through
/v1/operators.estimatedvsscheduled_publicScheduled 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.
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.
Live station boards
Departures, arrivals, combined boards, and next departures to multiple destinations.
Train details
Calling points, carriage layouts, and live progress along the route.
Platform train order
Which train pulls into each platform first—so your screen matches reality on the track.
Disruptions & alerts
Station notices and delay alerts, unified into one consistent format.
Train operators & delay reasons
Look up train companies and official reasons for delays or cancellations.
Junctions & sidings
Look up non-passenger railway points—junctions, freight sidings, and depots.
Feed health
Monitor upstream feeds in real time with heartbeat status and active alarms.
Board filters
Filter departures and arrivals by operator, platform, destination, or calling point.
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.
- ●100 requests/day
- ●2 req/s burst
- ●2 API keys
- ●Boards, services, train order, disruptions, reference
- ●10,000 requests/day
- ●10 req/s burst
- ●5 API keys
- ●Everything in Free, plus feed health monitoring
- ●100,000 requests/day
- ●50 req/s burst
- ●25 API keys
- ●13-month history, plus Performance & Footfall add-ons
- ●Dedicated throughput above 50 req/s
- ●Contractual SLA
- ●Custom keys & volume
- ●Dedicated support & custom data
What each plan unlocks
| Capability | Scope | Free | Starter | Pro | Ent. |
|---|---|---|---|---|---|
| Live station boards | boards:read | ✓ | ✓ | ✓ | ✓ |
| Reference data (stations, operators, reason codes, locations) | reference:read | ✓ | ✓ | ✓ | ✓ |
| Service lookup | services:read | ✓ | ✓ | ✓ | ✓ |
| Train order | train-order:read | ✓ | ✓ | ✓ | ✓ |
| Disruptions | disruptions:read | ✓ | ✓ | ✓ | ✓ |
| Feed health (heartbeat, alarms) | operations:read | — | ✓ | ✓ | ✓ |
| Historical data (13-month lookback) | history:read | — | — | ✓ | ✓ |
| Performance analytics | performance:read | — | — | Add-on | ✓ |
| Footfall | footfall:read | — | — | Add-on | ✓ |
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.