Rail route
Route on the Navo multimodal rail graph (Distance & Time): rail sections, truck first and last mile to the rail terminal, transfers with handling time, distance and transit. coords trimmed in the example.
Query parameters
City, UN/LOCODE or lat,lng.
Same formats as from.
Instead of from/to: "Chongqing to Duisburg".
Response schema
44 fields
Derived from the example response, nested as the JSON is.
data
The payload. Everything an endpoint returns sits under this key.
from
Human-readable name.
Country name.
Latitude.
Longitude.
UN/LOCODE of the place.
carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.
to
Human-readable name.
Country name.
Latitude.
Longitude.
UN/LOCODE of the place.
carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.
sections[]
from
Latitude.
Longitude.
carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.
to
Latitude.
Longitude.
carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.
True when any card in the total used an estimated capacity.
Errors
A failure carries { "ok": false, "error": { "code", "message", "severity" } }. Branch on the code, and log the message.
No key in Authorization or x-api-key.
The key is unknown or revoked.
Neither from/to nor a q with "to".
A place could not be found.
No rail route on the graph.
More than 40 requests in one minute from one client.
A source did not answer. Retry in a minute.
Planning figure
Transit is an estimate from the rail graph, not an operator schedule. Waiting at borders and gauge changes is not included.
curl 'https://rail.navo24.com/v1/rail/route?from=Chongqing&to=Duisburg&q=Chongqing%20to%20Duisburg' \
-H "Authorization: Bearer tmcp_YOUR_API_KEY"const res = await fetch("https://rail.navo24.com/v1/rail/route?from=Chongqing&to=Duisburg&q=Chongqing%20to%20Duisburg", {
headers: {
"Authorization": "Bearer tmcp_YOUR_API_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://rail.navo24.com/v1/rail/route?from=Chongqing&to=Duisburg&q=Chongqing%20to%20Duisburg",
headers={"Authorization": "Bearer tmcp_YOUR_API_KEY"},
)
data = res.json() {
"data": {
"from": {
"name": "Chongqing",
"cc": "CN",
"country": "China",
"lat": 29.56026,
"lng": 106.55771,
"locode": "CNCQI",
"kind": "city",
"tz": "Asia/Shanghai",
"q": "29.56026,106.55771"
},
"to": {
"name": "Duisburg",
"cc": "DE",
"country": "Germany",
"lat": 51.43247,
"lng": 6.76516,
"locode": "DEDUI",
"kind": "city",
"tz": "Europe/Berlin",
"q": "51.43247,6.76516"
},
"km": 10232.0,
"hours": 341.1,
"days": 14.21,
"moving_hours": 341.1,
"handling_hours": 0,
"speed_kmh": 30.0,
"sections": [
{
"mode": "RAIL",
"km": 10232.0,
"hours": 341.1,
"driving_hours": null,
"from": {
"lat": 29.56371,
"lng": 106.55993,
"kind": "rail_terminal"
},
"to": {
"lat": 51.42889,
"lng": 6.77389,
"kind": "rail_terminal"
},
"coords": [
[
106.55993,
29.56371
],
[
106.53,
29.55722
]
]
}
],
"transfers": [],
"estimated": false,
"routing_mode": "safe"
}
}