Skip to main content

NBAI Map API (0.1.0)

Download OpenAPI specification:Download

Auth

pass apikey as url query string parameter key

Directions Json Handler

query Parameters
altcount
integer <int32>

number of alternative routes to return.

Default: 1 if alternatives is disabled, 3 otherwise

alternatives
boolean

enable to return alternative routes.

Note: altcount will default to 3 if this is disabled.

Default: false

annotations
boolean

deprecated

approaches
string
avoid
string

Indicates that the calculated route(s) should avoid the indicated features.

Format: value1|value2|.... Default:""

context
string

deprecated

debug
boolean

enable to show debug information.

Default: false

departure_time
integer <int64>

departure time.

Format: unix timestamp.

Unit: seconds.

Default: 0

destination
required
string

location of destination.

Format: lat,lng.

Regex: ^[\d.-]+,[\d.-]+$

geometry
string
Enum: "polyline" "polyline6" "geojson"

output format of geometry.

Default: polyline6

key
string

apikey for authentication.

Default: ""

mode
string

mode of service.

Values:car|auto|bike|escooter|4w|2w....

Default: ""

origin
required
string

{{location_of_origin}}

Format: lat,lng.

Regex: ^[\d.-]+,[\d.-]+$

overview
string
Enum: "full" "simplified" "false"

output verbosity of overview (whole trip) geometry.

Default: full

session
string

unique session id for trip identification.

Note: Help to reuse cached trip characteritics when set.

Default: ""

special_object_types
string

special geospatial objects to include in response.

Format: type1,type2,....

Default:""

steps
boolean

enable to include steps in response.

Default: false

truck_size
string

Indicates the truck size in CM, only valid when mode=6w.

Format: height,width,length.

truck_weight
integer <int32>

Indicates the truck weight including trailers and shipped goods in KG, only valid when mode=6w.

waypoints
string

location(s) of waypoint(s) along the trip.

Format: lat0,lng0|lat1,lng1|....

Regex: (^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$)

Responses

Response samples

Content type
application/json
{
  • "errorMessage": "string",
  • "global_special_objects": { },
  • "mode": "string",
  • "routes": [
    ],
  • "status": "string"
}

DistanceMatrix JSON Handler

query Parameters
approaches
string
avoid
string
context
string

deprecated

debug
boolean

enable to show debug information.

Default: false

departure_time
integer <int64>

departure time.

Format: unix timestamp.

Unit: seconds.

Default: 0

destinations
required
string

locations of destinations

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

key
string

apikey for authentication.

Default: ""

mode
string

mode of service.

Values:car|auto|bike|escooter|4w|2w....

Default: ""

origins
required
string

locations of origins

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

Responses

Response samples

Content type
application/json
{
  • "rows": [
    ],
  • "status": "string"
}

DistanceMatrix JSON POST Handler

query Parameters
key
string
Request Body schema: application/json
approaches
string
avoid
string
context
string

deprecated

debug
boolean

enable to show debug information.

Default: false

departure_time
integer <int64>

departure time.

Format: unix timestamp.

Unit: seconds.

Default: 0

destinations
required
string

locations of destinations

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

key
string

apikey for authentication.

Default: ""

mode
string

mode of service.

Values:car|auto|bike|escooter|4w|2w....

Default: ""

origins
required
string

locations of origins

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

Responses

Request samples

Content type
application/json
{
  • "approaches": "string",
  • "avoid": "string",
  • "context": "string",
  • "debug": true,
  • "departure_time": 0,
  • "destinations": "string",
  • "key": "string",
  • "mode": "string",
  • "origins": "string"
}

Response samples

Content type
application/json
{
  • "rows": [
    ],
  • "status": "string"
}

DistanceMatrix JSON Handler

query Parameters
approaches
string
avoid
string
context
string

deprecated

debug
boolean

enable to show debug information.

Default: false

departure_time
integer <int64>

departure time.

Format: unix timestamp.

Unit: seconds.

Default: 0

destinations
required
string

locations of destinations

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

key
string

apikey for authentication.

Default: ""

mode
string

mode of service.

Values:car|auto|bike|escooter|4w|2w....

Default: ""

origins
required
string

locations of origins

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

Responses

Response samples

Content type
application/json
{
  • "rows": [
    ],
  • "status": "string"
}

DistanceMatrixConcise JSON POST Handler

query Parameters
key
string
Request Body schema: application/json
approaches
string
avoid
string
context
string

deprecated

debug
boolean

enable to show debug information.

Default: false

departure_time
integer <int64>

departure time.

Format: unix timestamp.

Unit: seconds.

Default: 0

destinations
required
string

locations of destinations

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

key
string

apikey for authentication.

Default: ""

mode
string

mode of service.

Values:car|auto|bike|escooter|4w|2w....

Default: ""

origins
required
string

locations of origins

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

Responses

Request samples

Content type
application/json
{
  • "approaches": "string",
  • "avoid": "string",
  • "context": "string",
  • "debug": true,
  • "departure_time": 0,
  • "destinations": "string",
  • "key": "string",
  • "mode": "string",
  • "origins": "string"
}

Response samples

Content type
application/json
{
  • "rows": [
    ],
  • "status": "string"
}

Isochrone JSON Handler

query Parameters
center
required
string
departure_time
integer <int64>
distances
string
key
string
mode
string
opacities
string
resolution
integer <int32>
strokes
string
times
string

Responses

Response samples

Content type
application/json
{
  • "distances": [
    ],
  • "opacities": [
    ],
  • "polylines": [
    ],
  • "status": "string",
  • "strokes": [
    ],
  • "times": [
    ]
}

Navigating Json Handler

query Parameters
altcount
integer <int32>

number of alternative routes to return.

Default: 1 if alternatives is disabled, 3 otherwise

alternatives
boolean

enable to return alternative routes.

Note: altcount will default to 3 if this is disabled.

Default: false

approaches
string
avoid
string

Indicates that the calculated route(s) should avoid the indicated features.

Format: value1|value2|.... Default:""

departure_time
integer <int64>

departure time.

Format: unix timestamp.

Unit: seconds.

Default: 0

destination
string

location of destination.

Format: lat,lng.

Regex: ^[\d.-]+,[\d.-]+$

geometry
string

geometry.

geometry_type
string

format of geometry.

Value: polyline.

Default: polyline

key
string

apikey for authentication.

Default: ""

lang
string

language of the text instruction

mode
string

mode of service.

Values:car|auto|bike|escooter|4w|2w....

Default: ""

origin
string

{{location_of_origin}}

Format: lat,lng.

Regex: ^[\d.-]+,[\d.-]+$

overview
string
Enum: "full" "simplified" "false"

output verbosity of overview (whole trip) geometry.

Default: full

session
string

unique session id for trip identification.

Note: Help to reuse cached trip characteritics when set.

Default: ""

waypoints
string

location(s) of waypoint(s) along the trip.

Format: lat0,lng0|lat1,lng1|....

Regex: (^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$)

Responses

Response samples

Content type
application/json
{
  • "error_msg": "string",
  • "routes": [
    ],
  • "status": "string"
}

Optimization Json Handler

query Parameters
approaches
string
coordinates
required
string

A semicolon-separated list of {lat},{lng}.

Format: lat0,lng0|lat1,lng1|....

Regex: (^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$)

destination
string

Specify the destination coordinate of the returned route.

Values: any|last.

Default: any

geometries
string

output format of geometry.

Value: geojson|polyline|polyline6.

Default: polyline6

key
string

apikey for authentication.

Default: ""

mode
string

mode of service.

Values:car.

Default: "car"

roundtrip
boolean

Indicates whether the returned route is roundtrip.

Default: true

source
string

The coordinate at which to start the returned route.

Values: any|first.

Default: first

with_geometry
boolean

Indicates whether the return geometry.

Default: false

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "trips": [
    ],
  • "waypoints": [
    ]
}

Post Trip Route Json Handler

Request Body schema: application/json
context
string

deprecated

debug
boolean

enable to show debug information.

Default: false

key
string

apikey for authentication.

Default: ""

mode
string

mode of service.

Values:car|auto|bike|escooter|4w|2w....

Default: ""

special_object_types
Array of strings

special geospatial objects to include in response.

Default: ["traffic_signals"]

timestamps
string

unix timestamp of each waypoints.

Unit: seconds

Format: ts0|ts1|...

Regex: ^[\d]+(|[\d]+)*$

tolerate_outlier
boolean

enable to ignore location not found in service boundary.

Note: enable this to ignore outliers, otherwise an error will be thrown.

Default: false

waypoints
required
string

location(s) of waypoint(s) along the trip.

Format:lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

Responses

Request samples

Content type
application/json
{
  • "context": "string",
  • "debug": true,
  • "key": "string",
  • "mode": "string",
  • "special_object_types": [
    ],
  • "timestamps": "string",
  • "tolerate_outlier": true,
  • "waypoints": "string"
}

Response samples

Content type
application/json
{
  • "errorMessage": "string",
  • "mode": "string",
  • "route": {
    },
  • "status": "string"
}

SnapToRoads Json Handler

query Parameters
approaches
string
avoid
string
context
string

deprecated

interpolate
boolean

enable to interpolate the path.

Note: might return more points

Default: false

key
string

apikey for authentication.

Default: ""

mode
string
path
required
string

locations to perform snap2roads

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

radiuses
string

radiuses of each location for performing snap2road

Unit: meters

Format: radius0|radius1|...

Regex: ^[\d]+(|[\d]+)*$

timestamps
string

(unix timestamps for each location.

Unit: seconds

Format: ts0|ts1|...

Regex: ^[\d]+(|[\d]+)*$

tolerate_outlier
boolean

enable to ignore location not found in service boundary.

Note: enable this to ignore outliers, otherwise an error will be thrown.

Default: false

Responses

Response samples

Content type
application/json
{
  • "distance": 0,
  • "geometry": [
    ],
  • "snappedPoints": [
    ],
  • "status": "string"
}

SnapToRoads JSON POST Handler

query Parameters
key
string
Request Body schema: application/json
approaches
string
avoid
string
context
string

deprecated

interpolate
boolean

enable to interpolate the path.

Note: might return more points

Default: false

key
string

apikey for authentication.

Default: ""

mode
string
path
required
string

locations to perform snap2roads

Format: lat0,lng0|lat1,lng1|...

Regex: ^[\d.-]+,[\d.-]+(|[\d.-]+,[\d.-]+)*$

radiuses
string

radiuses of each location for performing snap2road

Unit: meters

Format: radius0|radius1|...

Regex: ^[\d]+(|[\d]+)*$

timestamps
string

(unix timestamps for each location.

Unit: seconds

Format: ts0|ts1|...

Regex: ^[\d]+(|[\d]+)*$

tolerate_outlier
boolean

enable to ignore location not found in service boundary.

Note: enable this to ignore outliers, otherwise an error will be thrown.

Default: false

Responses

Request samples

Content type
application/json
{
  • "approaches": "string",
  • "avoid": "string",
  • "context": "string",
  • "interpolate": true,
  • "key": "string",
  • "mode": "string",
  • "path": "string",
  • "radiuses": "string",
  • "timestamps": "string",
  • "tolerate_outlier": true
}

Response samples

Content type
application/json
{
  • "distance": 0,
  • "geometry": [
    ],
  • "snappedPoints": [
    ],
  • "status": "string"
}