Compute a optimized route

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
locations
array of objects
required

Ordered list of two or more locations. Each location is used to build the route.

locations*
string
enum
required

The costing model to use. Valid values include: auto, bicycle, bus, bikeshare, truck, hov, taxi, motor_scooter, motorcycle, multimodal, pedestrian.

Allowed:
costing_options
object

Options specific to the chosen costing model. Each costing type has its own set of parameters.

string
enum

Output distance units. Acceptable values include miles (or mi) and kilometers (or km). Defaults to kilometers.

Allowed:
string
enum
Defaults to instructions

The type of directions to return.

Allowed:
string
enum
Defaults to polyline6

One of polyline6 (default), polyline5, geojson or no_shape.

Allowed:
integer

Number of alternate routes to attempt. Note that alternates are not supported on multipoint or time‑dependent requests.

exclude_locations
array of objects

Array of locations to exclude from the route. Each follows the same format as locations.

exclude_locations
exclude_polygons
array of arrays of numbers

One or multiple polygons defined as nested arrays of [lon, lat] coordinates. Roads intersecting these polygons will be avoided.

exclude_polygons
date_time
object

Date and time information. The "type" indicates whether the provided time is for departure, arrival, invariant, or current.

string

Optional identifier for the route request.

boolean
Defaults to true

If true, include roundabout exit instructions.

boolean

If true, include administrative region crossings in the response.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json