Skip to content

50,000 free calls a month, card-free. Get an API key →

Documentation menu
docs / api / get-route-v1-profile-coordinates
routing

GET/route/v1/{profile}/{coordinates}

API key required, sent as Authorization: Bearer snk_… or ?api_key=snk_….

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/route/v1/{profile}/{coordinates}" \
  -H "Authorization: Bearer $MAPMAP_KEY"

Parameters

NameInRequiredDescription
profilepathyesRouting profile: driving (aliases car/auto), truck, bus, bicycle (bike/cycling), walking (foot/pedestrian), scooter or motorcycle (motorbike)
coordinatespathyeslon,lat pairs separated by ;, e.g. -0.1,51.5;-1.9,52.5
alternativesquerynotrue, false or a number of alternates (max 3)
stepsquerynoInclude turn-by-turn steps (default false)
geometriesquerynopolyline (default), polyline6 or geojson
overviewquerynosimplified (default), full or false
avoid_tollsquerynoAvoid toll roads (Valhalla use_tolls=0; motorised profiles only). Hosted gateway only: the public demo router ignores it
avoid_motorwaysquerynoAvoid motorways/highways (Valhalla use_highways=0; motorised profiles only). Hosted gateway only
avoid_ferriesquerynoAvoid ferries (Valhalla use_ferry=0; all profiles). Hosted gateway only
avoidquerynoComma-separated road features to PREFER against: tolls, highways, ferries (the same vocabulary as POST /route's avoid array). Renders as the profile's use_* factor set to 0, which the routing engine's own reference states is not guaranteed to avoid them entirely. tolls/highways are motorised-profile only; a value the engine has no field for on the requested profile is an InvalidValue rather than a silently ignored option
excludequerynoComma-separated road features to HARD-exclude: tolls, highways, ferries, bridges, tunnels. Renders as the profile's exclude_* boolean: allowed only at the very start or end of the path, so it can answer NoRoute rather than a detour, and it depends on the routing engine's own service_limits.allow_hard_exclusions setting
shortestquerynoPrefer the shortest path over the fastest (Valhalla shortest=true; all profiles). Hosted gateway only
voice_instructionsquerynoWith steps=true: add Mapbox-shaped voiceInstructions (plain + SSML, distance-triggered) to each step
banner_instructionsquerynoWith steps=true: add Mapbox-shaped bannerInstructions (and lane sub-banners where OSM has turn:lanes) to each step
landmarksquerynoWith steps=true: add a landmark_instruction to each step that passes a recognisable place ("Turn right just after the Shell garage") beside the step's own fields, which are never replaced. Nothing is named unless it is recognisable from the road, within 40 m of the junction and not tagged as closed, so many steps carry none. Needs the first-party place index (SN_GEOCODE_DIR); a deployment without one returns no landmarks
languagequerynoBCP 47 narration language, e.g. en-GB, es-ES (also sets the route voiceLocale)
heightquerynoVendor: vehicle height in metres (truck profile)
widthquerynoVendor: vehicle width in metres (truck profile)
lengthquerynoVendor: vehicle length in metres (truck profile)
weightquerynoVendor: gross weight in tonnes (truck profile)
hazmatquerynoVendor: carrying dangerous goods (truck profile)
tunnel_codequerynoVendor: ADR 8.6.4 tunnel restriction code, e.g. B/D (truck profile; implies hazmat)
use_litquerynoVendor: preference for lit streets, 0–1 (walking profile; 1 = prefer lit as strongly as possible)
pedestrian_typequerynoVendor: wheelchair (avoids steps/kerbs/steep grades where mapped) or blind (richer guidance); Valhalla pedestrian type (walking profile)
max_hiking_difficultyquerynoVendor: maximum hiking-trail difficulty, OSM sac_scale 1–6 (walking profile; default 1)
bicycle_typequerynoVendor: road, hybrid (default), city, cross or mountain (bicycle profile)
use_roadsquerynoVendor: willingness to ride roads alongside traffic, 0–1 (bicycle profile; 0 = prefer cycleways)
use_living_streetsquerynoVendor: preference for living/shared streets, 0–1 (bicycle profile)
avoid_bad_surfacesquerynoVendor: avoidance of surfaces unsuited to the bicycle type, 0–1 (bicycle profile; 1 = strictly avoid)
use_hillsquerynoVendor: willingness to take hills, 0–1 (bicycle profile; 0 = avoid climbs)
depart_atquerynoTime-dependent routing: specified departure time, ISO 8601 YYYY-MM-DDThh:mm local (Valhalla date_time.type=1). Mutually exclusive with arrive_by
arrive_byquerynoTime-dependent routing: specified arrival time, ISO 8601 YYYY-MM-DDThh:mm local (Valhalla date_time.type=2). Mutually exclusive with depart_at
speed_typesquerynoComma-separated speed sources to use: freeflow, constrained, predicted, current (Valhalla costing_options.<costing>.speed_types)
approachesquerynoCurbside preference per coordinate, ;-separated: curb (Valhalla preferred_side=same) or unrestricted (either); empty entry = no preference. Must have one entry per coordinate
street_side_tolerancequerynoCurbside: street_side_tolerance in metres, applied to every location (Valhalla default 5)
street_side_max_distancequerynoCurbside: street_side_max_distance in metres, applied to every location (Valhalla default 1000)
street_side_cutoffquerynoCurbside: street_side_cutoff road class (motorway…service_other), applied to every location
exclude_polygonsquerynoAvoid-areas: JSON array of [lon, lat] rings, e.g. [[[-0.1,51.5],[-0.11,51.5],[-0.11,51.52]]] (Valhalla exclude_polygons)
exclude_locationsquerynoAvoid-locations: lon,lat pairs separated by ; (Valhalla exclude_locations)
safety_alertsquerynoOpt-in route safety alerts: true adds a top-level safety_alerts[] array (speed cameras, average-speed zones, French danger zones, railway level crossings along the primary route, ordered by distance along it) behind the per-country legality gate. Only effective on gateways where the operator configured SN_SAFETY_DIR; the field never appears otherwise
safety_alerts_enforcementquerynooptin asserts the END USER explicitly enabled enforcement alerts, unlocking countries whose law requires them off by default (e.g. DE: StVO §23(1c) is a driver-use ban). Without it those countries' cameras/zones are suppressed; forbidden and zones-only regimes are unaffected (never unlockable)

Responses

200OSRM route response (code: Ok)
400OSRM error envelope, e.g. InvalidQuery, InvalidValue, NoSegment, NoRoute
401Missing or invalid API key
429Quota or rate limit exceeded

Error bodies follow the shared problem model documented on API conventions.

Also under routing

Generated from https://api.mapmap.ai/openapi.json on 2026-09-17 · operationId get_route