Skip to main content

RouteResponse

warningsstring[]

Advisory notes about the computed route. Currently emitted when avoid_flood_zones is set but an endpoint lies inside a flood-prone zone — that zone cannot be excluded (the route must enter it), so it is skipped and named here instead.

Example: ["a route endpoint is inside the flood-prone zone \"Kaneshie First Light / Graphic Road\" — that zone cannot be avoided"]
distance_mnumber<double>

Total route distance in metres.

Example: 4250
duration_snumber<double>

Raw Valhalla duration in seconds (no traffic adjustment).

Example: 780
eta_snumber<double>

Traffic-adjusted ETA in seconds using Ghana time-of-day multipliers.

Example: 936
traffic_notestring

Human-readable label for the traffic condition applied.

Example: morning rush
has_tollboolean

True if the route passes through any toll roads.

Example: false
has_ferryboolean

True if the route includes a ferry crossing (e.g. Volta Lake).

Example: false
has_highwayboolean

True if the route uses any motorway/highway segments.

Example: true
coordinatesnumber[][]

Route polyline as [lng, lat] pairs.

Possible values: >= 2, <= 2

Example: [[-0.1867,5.604],[-0.185,5.605]]
steps object[]
  • Array [
  • instructionstring

    Standard turn instruction.

    Example: Turn right onto Ring Road Central.
    verbal_instructionstring

    Pre-built voice prompt suitable for TTS, delivered before the maneuver.

    Example: In 300 metres, turn right onto Ring Road Central.
    instruction_landmarkstring

    Landmark-enriched instruction (present when narration=landmark or both).

    Example: Turn right at Accra Mall onto Ring Road Central.
    namestring

    Street or road name for this step.

    Example: Ring Road Central
    near_landmarkstring

    Name of the nearest landmark to the maneuver point (within 150m).

    Example: Accra Mall
    distance_mnumber<double>

    Distance of this step in metres.

    Example: 320.5
    duration_snumber<double>

    Estimated duration of this step in seconds.

    Example: 45.2
  • ]
  • landmarks_passed object[]

    Significant landmarks along the route (present when narration=landmark or both).

  • Array [
  • slugstring
    Example: accra-mall
    namestring
    Example: Accra Mall
    sidestring

    Possible values: [left, right]

    Example: right
    at_stepinteger

    Step index where this landmark is passed.

    Example: 2
  • ]
  • alternatives object[]

    Up to 2 alternative routes (no step details).

  • Array [
  • distance_mnumber<double>
    Example: 4800
    duration_snumber<double>
    Example: 900
    eta_snumber<double>
    Example: 1080
    coordinatesnumber[][]

    Possible values: >= 2, <= 2

  • ]
  • RouteResponse
    {
    "warnings": [
    "a route endpoint is inside the flood-prone zone \"Kaneshie First Light / Graphic Road\" — that zone cannot be avoided"
    ],
    "distance_m": 4250,
    "duration_s": 780,
    "eta_s": 936,
    "traffic_note": "morning rush",
    "has_toll": false,
    "has_ferry": false,
    "has_highway": true,
    "coordinates": [
    [
    -0.1867,
    5.604
    ],
    [
    -0.185,
    5.605
    ]
    ],
    "steps": [
    {
    "instruction": "Turn right onto Ring Road Central.",
    "verbal_instruction": "In 300 metres, turn right onto Ring Road Central.",
    "instruction_landmark": "Turn right at Accra Mall onto Ring Road Central.",
    "name": "Ring Road Central",
    "near_landmark": "Accra Mall",
    "distance_m": 320.5,
    "duration_s": 45.2
    }
    ],
    "landmarks_passed": [
    {
    "slug": "accra-mall",
    "name": "Accra Mall",
    "side": "right",
    "at_step": 2
    }
    ],
    "alternatives": [
    {
    "distance_m": 4800,
    "duration_s": 900,
    "eta_s": 1080,
    "coordinates": [
    0
    ]
    }
    ]
    }