Skip to main content

OptimizedRouteResponse

distance_mnumber<double>

Total route distance in metres.

Example: 18450
duration_snumber<double>

Estimated travel time in seconds (no traffic adjustment).

Example: 1380
eta_snumber<double>

Traffic-adjusted ETA in seconds.

Example: 1620
traffic_notestring

Human-readable traffic condition label, e.g. morning rush.

Example: morning rush
has_tollboolean
has_ferryboolean
has_highwayboolean
stops object[]

Stops in optimized visit order. Each entry's original_index maps back to the corresponding entry in the request stops array.

  • Array [
  • original_indexinteger

    Index of this stop in the input stops array. Use this to map the optimized ordering back to your own stop data.

    Example: 2
  • ]
  • coordinatesnumber<double>[][]

    Full route geometry as [lng, lat] pairs.

    Possible values: >= 2, <= 2

    steps object[]

    Turn-by-turn steps (only present when narration is set in the request).

  • 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
  • ]
  • OptimizedRouteResponse
    {
    "distance_m": 18450,
    "duration_s": 1380,
    "eta_s": 1620,
    "traffic_note": "morning rush",
    "has_toll": true,
    "has_ferry": true,
    "has_highway": true,
    "stops": [
    {
    "original_index": 2
    }
    ],
    "coordinates": [
    0
    ],
    "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
    }
    ]
    }