Introduction
Headcode is a commercial API for normalised, enriched UK rail data.
Raw rail data is freely available, but it is fragmented across many sources with inconsistent formats and overlapping identifier systems. Headcode reconciles, normalises and enriches those feeds so application teams can integrate once.
Design principles
Section titled “Design principles”- Every response should contain something you cannot get from a single raw feed.
- Station and service identifiers should be forgiving: accept any common code system and return all known identifiers.
- Real-time and historic data should blend seamlessly.
- Free tier should be genuinely useful.
- British English throughout documentation, schemas and error messages.
API style
Section titled “API style”Headcode exposes RESTful JSON endpoints documented with OpenAPI. The API reference pages include downloadable OpenAPI definitions for each supported product area.
The guide pages explain the concepts behind those schemas: how Headcode combines source data, how identifiers map between systems, and how core structures such as stations, station boards and services fit together.