---
title: "Navigation Fast"
method: GET
path: "/navigation/json"
tags: ["Routing"]
---

# Navigation Fast

`GET /navigation/json`

Nextbillion.ai’s Navigation API is a service that computes a route between 2 places, and also returns detailed turn by turn instructions for the route.

The Navigation API can be used as an input into your Navigation app. Alternatively, you can directly use Nextbillion.ai’s Navigation SDK for a complete turn by turn navigation experience.

## Query parameters

- `key` string, 32 character alphanumeric string, required
- `origin` string, latitude,longitude
- `destination` string, latitude,longitude
- `mode` 'car' | 'truck'
- `waypoints` string, latitude_1,longitude_1|latitude_2,longitude_2|...
- `approaches` 'unrestricted' | 'curb', approaches_1;approaches_2;...
- `geometry` 'polyline' | 'polyline6' | 'geojson'
- `lang` string
- `alternatives` boolean
- `altcount` integer
- `avoid` 'toll' | 'ferry' | 'highway' | 'none', value_1|value_2|...
- `overview` 'full' | 'simplified' | 'false'
- `bearings` string, degree0,range0;degree1,range1;...
- `original_shape` string
- `original_shape_type` 'polyline' | 'polyline6'

## Response `200`

- object
  - `status` string — A string indicating the state of the response. On normal responses, the value will be Ok. Indicative HTTP error codes are returned for different errors. See the [API Errors Codes](#api-error-codes) section below for more information.
  - `msg` string — Displays the error message in case of a failed request or operation. Please note that this parameter is not returned in the response in case of a successful request.
  - `warning` string[] — warning when facing unexpected behaviour
  - `routes` object[] — An array of objects describing different possible routes from the starting location to the destination. Each object represents one route.
    - `geometry` string — Encoded geometry of the returned route as per the selected format in geometry and specified overview verbosity. Please note the overview will always be full when original_shape parameter is used in the input request.
    - `distance` number — The distance, in meters, of the complete trip.
    - `distance_full` number — The total distance of the route, including additional details such as extra maneuvers or loops, in meters.
    - `duration` integer — The duration, in seconds, of the complete trip.
    - `start_location` object — Location coordinates of the point where the route starts.
      - `latitude` number — Latitude of thestart_location.
      - `longitude` number — Longitude of the start_location.
    - `end_location` object — Location coordinates of the point where the route ends.
      - `latitude` number — Latitude of the end_location.
      - `longitude` number — Longitude of the end_location.
    - `geojson` object — The GeoJSON representation of the route.
      - `geometry` string
      - `properties` string
      - `type` 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon' | 'GeometryCollection' | 'Feature' | 'FeatureCollection' | 'Link'
    - `legs` object[] — An array of objects returning the details about each leg of the route. waypoints split the route into legs.
      - `distance` object — An object containing leg distance value, in meters.
        - `value` integer
      - `duration` object — An object containing leg duration value, in seconds.
        - `value` integer
      - `start_location` object — Location coordinates of the point where the leg starts.
        - `latitude` number — Latitude of start_location of the leg.
        - `longitude` number — Longitude of start_location of the leg.
      - `end_location` object — Location coordinates of the point where the leg ends.
        - `latitude` number — Latitude of end_location of the leg.
        - `longitude` number — Longitude of end_location of the leg.
      - `raw_duration` object — The raw estimated duration of the leg in seconds.
      - `steps` object[] — An array of step objects containing turn-by-turn guidance for easy navigation.
        - `geometry` string — Encoded geometry of the step in the selected format.
        - `start_location` object — Location coordinates of the point where the step starts.
          - `latitude` number — Latitude of start_location of the step.
          - `longitude` number — Longitude of start_location of the step.
        - `end_location` object — Location coordinates of the point where the step ends.
          - `latitude` number — Latitude of the end_location of the step.
          - `longitude` number — Longitude of the end_location of the step.
        - `distance` object — An object containing step distance value, in meters.
          - `value` integer
        - `duration` object — An object containing step duration value, in seconds.
          - `value` integer
        - `geojson` object — The GeoJSON representation of the step.
          - `geometry` string
          - `type` string
        - `maneuver` object — An object with maneuver details for the step.
          - `instruction` string — A text instruction describing the maneuver to be performed. It provides guidance on the action to take at the maneuver location, such as "Turn left," "Go straight," "Exit the roundabout," etc.
          - `voice_instruction` object[] — An array of voice instruction objects associated with the maneuver. Each object provides additional details about the voice instruction, including the distance along the geometry where the instruction applies, the instruction text, and the unit of measurement.
            - `distance_along_geometry` integer
            - `instruction` string — The guidance instructions for the upcoming maneuver
            - `unit` string — Unit of the distance_along_geometry metric
          - `bearing_before` number — The clockwise angle from true north to the direction of travel immediately before the maneuver. Range of values is between 0-359.
          - `bearing_after` number — The clockwise angle from true north to the direction of travel immediately after the maneuver. Range of values is between 0-359.
          - `coordinate` object — A coordinate pair describing the location of the maneuver.
            - `latitude` number — The latitude coordinate of the maneuver.
            - `longitude` number — The longitude coordinate of the maneuver.
            - `name` string — The name or description of the maneuver location.
          - `maneuver_type` string — A string indicating the type of maneuver.
          - `muted` boolean — A boolean value indicating whether the voice instruction for the maneuver should be muted or not.
          - `roundabout_count` integer — The number of roundabouts encountered so far during the route. This parameter is specific to roundabout maneuvers and indicates the count of roundabouts before the current one.
        - `name` string — The name of the step.
        - `intersections` object[] — An array of objects representing intersections (or cross-way) that the route passes by along the step. For every step, the very first intersection corresponds to the location of the maneuver. All intersections until the next maneuver are listed in this object.
          - `location` object — A [longitude, latitude] pair describing the location of the intersection.
            - `latitude` number — The latitude coordinate of the intersection.
            - `longitude` number — The longitude coordinate of the intersection.
            - `name` string — The name or description of the intersection.
          - `bearings` integer[] — A list of bearing values (e.g. [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection.
          - `classes` string[] — An array of strings representing the classes or types of roads or paths at the intersection. The classes can indicate the road hierarchy, such as a motorway, primary road, secondary road, etc.
          - `entry` boolean[] — A value of true indicates that the respective road could be entered on a valid route. false indicates that the turn onto the respective road would violate a restriction. Each entry value corresponds to the bearing angle at the same index.
          - `intersection_in` integer — The number of incoming roads or paths at the intersection.
          - `intersection_out` integer — The number of outgoing roads or paths from the intersection.
          - `lanes` object[] — An array of lane objects representing the lanes available at the intersection. If no lane information is available for an intersection, the lanes property will not be present.
            - `indications` string[] — It represents actions associated with the lane. These indications describe the permitted maneuvers or directions that can be taken from the lane. Common indications include "turn left," "turn right," "go straight," "merge," "exit," etc.
            - `valid` boolean — This indicates the validity of the lane. It specifies whether the lane is considered valid for making the indicated maneuver or if there are any restrictions or limitations associated with it.
        - `reference` string — A reference for the step.
        - `road_shield_type` object — An object containing road shield information.
          - `label` string — A label identifying the inscription on the road shield, such as containing the road number.
          - `image_url` string — The URL to fetch the road shield image.
        - `driving_side` string — Indicates the driving side of the road in case bidirectional traffic is allowed on the given segment. It can have two values: "left" & "right".
    - `predicted_duration` number — The predicted duration of the route based on real-time traffic conditions.
    - `raw_duration` number — The raw estimated duration of the route in seconds.
    - `special_objects` object — Special geospatial objects or landmarks crossed along the route.
    - `weight` number — A weight value associated with the route or leg.

---

[API](https://skmtc.net/nextbillion-ai/apis/one-spec-service.md) · [All operations](https://skmtc.net/nextbillion-ai/apis/one-spec-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nextbillion-ai/one-spec-service/versions/b647f1808dda/schema)
