Internal API
This API is designed for internal use within Network Rail. It uses a simple authentication mechanism that does not link to a specific "user" within the system. It was created in response to a request to report into Power BI.
Base URL
https://nrsdb.uk/api/v1
Authentication
Registered users of the API will be issued with a key - all requests (other than this help URL) must pass this key as a Bearer token
Sample Code
Sample GET request
const params = new URLSearchParams();
params.append('property', value);
const response = await fetch(`${url}?${params}`, {
'credentials': 'same-origin',
'headers': {
'Authorization': `Bearer ${token}`
'Accept': 'application/json',
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest'
},
'method': 'GET'
});
Sample POST from a form element
const response = await fetch(url, {
'body': formData,
'credentials': 'same-origin',
'headers': {
'Authorization': `Bearer ${token}`
},
'method': 'POST'
});
NOTE: in my experience it is best not to set the 'Content-Type' header here
Endpoints
Routes
E.g. Anglia, North-West, Wales
Delivery Units
{
"data": {
"id": 1,
"name": "Ipswich",
"routeId": 2,
"active": true
}
}
ELRs
Locations
Autumn Inspections
{
"id": 33,
"inspectionDate": "2025-06-09T23:55:39+01:00",
"locationId": 236,
"location": {
"id": 236,
"location": "Falconwood",
"locationClass": "Platform",
"routeId": 8,
"ownerId": 33,
"elrId": 81,
"trackId": 1100,
"track": "",
"start": 827,
"end": 827,
"frequency": 1,
"active": true,
"inspections": []
},
"inspectorId": 3,
"inspector": null,
"weather": {
"precipitation": 3,
"wind": 2,
"overhead": 2,
"ground": 2
},
"rail_condition": "dry",
"evaluation": 0,
"action_taken": "",
"comments": "",
"images": []
}
ESRs
{
"id": 5,
"refnum": "AICC 001.26",
"speed": {
"value": "40",
"unit": "mph",
"linespeed": "120"
},
"route": {
"id": 2,
"routecode": "EA",
"routename": "Anglia",
"shortname": "AICC",
"active": true
},
"du": {
"id": 1,
"name": "Ipswich",
"routeId": 2,
"active": true
},
"elr": {
"elrId": 668,
"elrcode": "LTN1",
"elrdescription": "LIVERPOOL STREET - TROWSE LOWER JN",
"active": true
},
"lor": {
"id": 2,
"lorcode": "EA1011",
"lordescription": "SEVEN KINGS TO IPSWICH",
"active": true
},
"location": "At Colchester South Jn",
"reason": {
"id": 18,
"reason": "Structural - Station",
"active": true
},
"lines": [
{
"elr": {
"elrId": 668,
"elrcode": "LTN1",
"elrdescription": "LIVERPOOL STREET - TROWSE LOWER JN",
"active": true
},
"trackId": 1100,
"routeheader": "Primary Line",
"direction": "Up Direction",
"linedescription": "Up Main",
"newStyleBoards": true,
"boards": [
{
"type": "commencement",
"description": "Speed Indicator (Commencement)",
"elrId": 668,
"trackId": 1100,
"miles": 50,
"chains": 75,
"serialNumber": null,
"marker": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.876876605,
51.90208042
]
},
"properties": {
"type": "commencement",
"description": "Speed Indicator (Commencement)",
"elrId": 668,
"trackId": 1100,
"miles": 50,
"chains": 75,
"serialNumber": null
}
}
},
{
"type": "termination",
"description": "Termination Indicator",
"elrId": 668,
"trackId": 1100,
"miles": 49,
"chains": 75,
"serialNumber": null,
"marker": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0.85427535,
51.89894058
]
},
"properties": {
"type": "termination",
"description": "Termination Indicator",
"elrId": 668,
"trackId": 1100,
"miles": 49,
"chains": 75,
"serialNumber": null
}
}
}
]
}
],
"whenimposed": "2026-03-18 11:42:06",
"etr": null,
"withdrawn": false,
"whenwithdrawn": null,
"references": {
"fmsnumber": "123",
"ccilnumber": "23645657",
"tsrreference": "",
"tdanumber": "",
"wo": "",
"rdms": "",
"trustcode": "",
"owner": ""
},
"updated_at": "2026-03-18 11:42:06"
}
GIS
/gis/nearest/{lng}/{lat} -- returns the nearest mileage marker (ELR, track, miles, chains)
/gis/w3w/{elr}?trackId=1100&miles=1&chains=0 -- returns the W3W code for the marker at the given location, trackId is optional, chains defaults to 0 if not given