Tools/maps/directions

maps/directions

Driving, walking, or cycling directions between points, with distance and time.

0.1 credits / call ($0.0001)
charged on success

What it does

Computes a route between an ordered set of waypoints for a chosen travel mode, returning total distance and time, the route geometry, and optional turn-by-turn legs.

Primary use cases

  • Estimating travel time and distance between locations.
  • Generating a route between points.
  • Comparing routes across driving, walking, and cycling.

Good to know

waypoints is a pipe-separated list of "lat,lon" pairs (2 or more), e.g. "48.85,2.29|48.86,2.34". Choose mode (drive, walk, bicycle, truck). Set units to metric or imperial. The geometry comes back as GeoJSON.

Parameters

langstringoptional

2-letter language code for turn instructions (e.g. "en").

modestringoptionaldefault: "drive"

Travel mode.

unitsstringoptionaldefault: "metric"

Distance units.

detailsstringoptional

Optional extra detail, e.g. "instruction_details".

waypointsstringrequired

Pipe-separated "lat,lon" waypoints (2 or more), e.g. "48.85,2.29|48.86,2.34".

maps/directions — Faro