Skip to content

Route

POST /route (or GET) returns the driving route between an origin and a destination.

Terminal window
curl https://api.argamin.ai/v1/route \
-H "Authorization: Bearer am_test_..." \
-H "Content-Type: application/json" \
-d '{
"waypoints": [
{
"lat": 51.5072,
"lng": -0.1276
},
{
"lat": 51.5155,
"lng": -0.0922
}
],
"geometry": "polyline6"
}'
{
"distance": 4900,
"duration": 880,
"geometry": "<encoded polyline6 string>",
"legs": [
{
"distance": 4900,
"duration": 880
}
],
"request_id": "req_2b9d6f1e0c8a4e7f9a3b5c7d1e2f4a6b"
}
  • 2 to 25 waypoints, visited in the given order.
  • geometry is polyline6 by default; you can also ask for geojson or none. Set steps: true for turn-by-turn steps per leg.
  • Billed per request, only on success.
  • Durations do not include live traffic.
Service Unit Free / month 0 - 100K100K - 500K500K - 1M1M - 5M5M+
Route request 10,000 $1.60$1.30$1.00$0.50$0.13