Catalog/maps-distance-matrix

Maps

Driving distance/time matrix (OSRM) API

Given up to 25 coordinates, the pairwise DRIVING distances and durations over the real road network (OSRM). For routing/logistics planning across multiple stops. The road graph is the moat (not straight-line). Answers 'drive times between these stops', 'distance matrix for these locations', 'how far apart by car'.

Price$0.01per request
MethodPOST
Route/v1/maps/distance-matrix
StatusLive
MIME typeapplication/json
Rate limit40/minute
Cache86400s public
mapsdistance-matrixroutingdrivinglogisticsosrmtravel-timemulti-stop
API URLhttps://x402.hexl.dev/v1/maps/distance-matrix
Integration docs
Example request
{
  "points": [
    {
      "latitude": 40.7128,
      "longitude": -74.006
    },
    {
      "latitude": 42.3601,
      "longitude": -71.0589
    }
  ]
}
Example response
{
  "count": 2,
  "durationsMinutes": [
    [
      0,
      222.5
    ],
    [
      223.1,
      0
    ]
  ],
  "distancesKm": [
    [
      0,
      348.2
    ],
    [
      349,
      0
    ]
  ],
  "points": [
    {
      "latitude": 40.7128,
      "longitude": -74.006
    },
    {
      "latitude": 42.3601,
      "longitude": -71.0589
    }
  ]
}
Input schema
{
  "type": "object",
  "required": [
    "points"
  ],
  "properties": {
    "points": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        }
      }
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}