Distance matrix
POST /matrix returns durations and distances between all origins and all destinations.
curl https://api.argamin.ai/v1/matrix \ -H "Authorization: Bearer am_test_..." \ -H "Content-Type: application/json" \ -d '{ "origins": [ { "lat": 51.5072, "lng": -0.1276 }, { "lat": 51.5155, "lng": -0.0922 } ], "destinations": [ { "lat": 51.5033, "lng": -0.1196 } ], "annotations": [ "duration", "distance" ]}'{ "durations": [ [ 420 ], [ 610 ] ], "distances": [ [ 2900 ], [ 4300 ] ], "request_id": "req_2b9d6f1e0c8a4e7f9a3b5c7d1e2f4a6b"}Limits
Section titled “Limits”- Synchronous: up to 10,000 elements. Elements are origins times destinations, so 100 by 100 is the maximum.
- Billed per element, only on success.
- Durations come from the road network and typical speeds. They do not include live traffic.
- A point outside coverage returns
OUT_OF_COVERAGEwith the indexes of the points. Nothing is billed.
| Service | Unit | Free / month | 0 - 100K | 100K - 500K | 500K - 1M | 1M - 5M | 5M+ |
|---|---|---|---|---|---|---|---|
| Distance matrix | element | 10,000 | $1.60 | $1.30 | $1.00 | $0.50 | $0.13 |