Skip to content
Navo24Navo24
GETAPI key

Rail route

GETrail.navo24.com/v1/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

fromstringrequired

City, UN/LOCODE or lat,lng.

tostringrequired

Same formats as from.

qstring

Instead of from/to: "Chongqing to Duisburg".

Response schema

44 fields

Derived from the example response, nested as the JSON is.

dataobject

The payload. Everything an endpoint returns sits under this key.

fromobject
namestring

Human-readable name.

ccstring
countrystring

Country name.

latnumber

Latitude.

lngnumber

Longitude.

locodestring

UN/LOCODE of the place.

kindstring

carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.

tzstring
qstring
toobject
namestring

Human-readable name.

ccstring
countrystring

Country name.

latnumber

Latitude.

lngnumber

Longitude.

locodestring

UN/LOCODE of the place.

kindstring

carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.

tzstring
qstring
kmnumber
hoursnumber
daysnumber
moving_hoursnumber
handling_hoursnumber
speed_kmhnumber
sectionsobject[]
sections[]object
modestring
kmnumber
hoursnumber
driving_hoursnumber | null
fromobject
latnumber

Latitude.

lngnumber

Longitude.

kindstring

carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.

toobject
latnumber

Latitude.

lngnumber

Longitude.

kindstring

carrier_event when a carrier filed it, trackingmcp_inference when we derived the step from surrounding events.

coordsnumber[][]
transfersobject[]
estimatedboolean

True when any card in the total used an estimated capacity.

routing_modestring

Errors

A failure carries { "ok": false, "error": { "code", "message", "severity" } }. Branch on the code, and log the message.

missing_key401

No key in Authorization or x-api-key.

invalid_key401

The key is unknown or revoked.

invalid_route400

Neither from/to nor a q with "to".

place_not_found404

A place could not be found.

no_route404

No rail route on the graph.

rate_limited429

More than 40 requests in one minute from one client.

upstream_error502

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"
Response
{
  "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"
  }
}