Mapbox Nav Directions Get Directions

1.6 credits/call
ae_mapbox_nav_directions_get_directions

Get turn-by-turn directions and optimal routes for driving, walking, cycling, or electric vehicles.

MapsTravel
1.6 credits/call

Pricing

1.6 credits/call
ConditionCharge
Each call1.6 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
stepsbooleanNoWhether to return steps and turn-by-turn instructions.—
layersstringNoInfluences the layer of road from which a route starts from a waypoint.—
excludestringNoExclude certain road types and custom locations from routing.—
includestringNoInclude certain additional road types for routing.—
profileenum (mapbox/driving-traffic | mapbox/driving | mapbox/walking | mapbox/cycling)YesThe routing profile to use for calculating directions.—
bearingsstringNoInfluences the direction in which a route starts from a waypoint. Format: {angle,degrees} per waypoint.—
languagestringNoThe language of returned turn-by-turn text instructions.—
overviewenum (full | simplified | false)NoDisplays the requested type of overview geometry.—
radiusesstringNoThe maximum distance a coordinate can be moved to snap to the road network, in meters.—
arrive_bystringNoThe desired arrival time in ISO 8601 format (mapbox/driving profile only).—
depart_atstringNoThe departure time in ISO 8601 format (mapbox/driving and mapbox/driving-traffic profiles).—
max_widthnumberNoThe max vehicle width in meters.—
waypointsstringNoA semicolon-separated list indicating which input coordinates should be treated as waypoints.—
alley_biasnumberNoA scale from -1 to 1 biasing route toward or against alleys (mapbox/driving profile only).—
approachesstringNoA semicolon-separated list indicating the side of the road from which to approach waypoints.—
geometriesenum (geojson | polyline | polyline6)NoThe format of the returned geometry.—
max_heightnumberNoThe max vehicle height in meters.—
max_weightnumberNoThe max vehicle weight in metric tons.—
annotationsstringNoReturn additional metadata along the route. Must be used in conjunction with overview=full.—
coordinatesstringYesA semicolon-separated list of between two and 25 {longitude},{latitude} coordinate pairs to visit in order.—
voice_unitsenum (imperial | british_imperial | metric)NoSpecify which type of units to return in voice instructions.—
alternativesbooleanNoWhether to try to return alternative routes (true) or not (false, default). Up to two alternatives may be returned.—
walkway_biasnumberNoA scale from -1 to 1 biasing route toward or against walkways (mapbox/walking profile only).—
notificationsenum (all | none)NoReturns notification metadata associated with the route leg.—
walking_speednumberNoThe walking speed in meters per second (mapbox/walking profile only).—
waypoint_namesstringNoA semicolon-separated list of custom names for entries in the coordinates list.—
roundabout_exitsbooleanNoWhether to emit instructions at roundabout exits. Must be used with steps=true.—
waypoint_targetsstringNoA semicolon-separated list of coordinate pairs used to specify drop-off locations.—
continue_straightbooleanNoSets the allowed direction of travel when departing intermediate waypoints.—
voice_instructionsbooleanNoWhether to return SSML marked-up text for voice guidance. Must be used with steps=true.—
banner_instructionsbooleanNoWhether to return banner objects associated with the route steps. Must be used with steps=true.—
waypoints_per_routebooleanNoIf true, the waypoints array is returned within the route object.—
avoid_maneuver_radiusintegerNoAdd a radius around the starting point in which the API will avoid returning any significant maneuvers. Range: 1-1000 meters.—
snapping_include_closuresstringNoA semicolon-separated list of boolean values affecting snapping to road segments with live-traffic closures (mapbox/driving-traffic only).—
snapping_include_static_closuresstringNoA semicolon-separated list of boolean values affecting snapping to statically closed road segments (mapbox/driving-traffic only).—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_mapbox_nav_directions_get_directions' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "coordinates": "121.602945,31.088044;121.617523,31.186512",
    "depart_at": "2026-11-11T08:00:00Z",
    "profile": "mapbox/driving"
  }
}'
Response exampleresponse.json
JSON
{
  "code": "InvalidInput",
  "message": "Invalid query param"
}