Skip to content
TarekyDocs
Console

Routing

Four services in OSRM’s format, the format Mapbox’s Directions API derives from. If you have code that works with OSRM or Mapbox, change the host.

GET /v1/{directions|matrix|match|optimize}/{driving|walking}/{lng,lat;lng,lat;…}
Service For Max points Units
directions A route between two or more points 25 1
matrix Times and distances between all points 25 3
match Snap a GPS trace to roads 100 2
optimize The best order to visit stops 12 3
  • geometries=geojson returns shapes ready to draw; polyline (the default) is smaller.
  • alternatives=true asks for other routes; steps=true for turn-by-turn instructions.
  • optimize keeps the trip open when you send roundtrip=false: add source=first to fix the first stop, destination=last to fix the last one (a trip with a fixed start and end needs both).
  • A point more than 5 km from any road is refused with no_segment.
  • Times don’t account for traffic yet.