Locations
Service calling patterns sometimes include TIPLOCs that are not passenger stations — junctions, sidings, depots, signal boxes and timing points. The Locations API identifies what these places are.
Stations vs locations
Section titled “Stations vs locations”If a TIPLOC belongs to a passenger station, use the Stations API (GET /v1/stations/{id}). If it is an operational location — infrastructure that trains pass through but passengers do not use — use the Locations API. A station lookup will not return operational locations, and a location lookup will return 404 for passenger stations.
Look up by TIPLOC
Section titled “Look up by TIPLOC”GET /v1/locations/{tiploc}Returns a single location:
{ "tiploc": "ABWLCHJ", "name": "Abbey Wood Jn", "location_type": "junction", "latitude": 51.5308, "longitude": -0.1238}The location_type field is one of: junction, siding, depot, signal_box, timing_point or unknown.
Returns 404 with error code HEADCODE.LOCATIONS.NOT_FOUND if the TIPLOC is unknown or belongs to a passenger station.
Search and filtering
Section titled “Search and filtering”GET /v1/locationsSearch and filter locations using query parameters:
| Parameter | Description |
|---|---|
query | Free-text search against location names (supports partial and misspelled input) |
type | Filter by location type (junction, siding, depot, signal_box, timing_point, unknown) |
lat, lng | Centre point for a spatial search (WGS84 coordinates, both required together) |
radius | Maximum distance in metres from the centre point (default 1000) |
limit | Maximum results to return (default 20, max 100) |
offset | Number of results to skip for pagination |
The response includes pagination metadata:
{ "locations": [ ... ], "total": 142, "limit": 20, "offset": 0}Examples
Section titled “Examples”Find all junctions near London:
GET /v1/locations?type=junction&lat=51.5074&lng=-0.1278&radius=5000Search by name:
GET /v1/locations?query=abbeyPractical example
Section titled “Practical example”You fetch a service and its calling points include the TIPLOC ABWLCHJ, which is not in the Stations API:
GET /v1/locations/ABWLCHJThe response tells you this is “Abbey Wood Jn”, a junction. You can now label it appropriately in your UI or filter it out of a passenger-facing display while keeping it in an operational view.