Catalog/maps-route

Maps

Driving route distance & time (OSRM) API

Compute the real driving distance and travel time between two lat/lng points over the actual road network (OSRM). This is something an agent genuinely cannot compute itself — it needs the road graph, not a straight-line haversine. Answers 'driving distance from A to B', 'how long to drive between these coordinates', 'road distance', 'travel time by car'.

Price$0.01per request
MethodPOST
Route/v1/maps/route
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache86400s public
mapsroutingdrivingdistancedirectionsosrmlogisticstravel-time
API URLhttps://x402.hexl.dev/v1/maps/route
Integration docs
Example request
{
  "fromLat": 40.7128,
  "fromLon": -74.006,
  "toLat": 42.3601,
  "toLon": -71.0589
}
Example response
{
  "profile": "driving",
  "distanceKm": 348.2,
  "distanceMeters": 348200,
  "durationMinutes": 222.5,
  "durationSeconds": 13350,
  "from": {
    "latitude": 40.7128,
    "longitude": -74.006
  },
  "to": {
    "latitude": 42.3601,
    "longitude": -71.0589
  }
}
Input schema
{
  "type": "object",
  "required": [
    "fromLat",
    "fromLon",
    "toLat",
    "toLon"
  ],
  "properties": {
    "fromLat": {
      "type": "number",
      "examples": [
        40.7128
      ]
    },
    "fromLon": {
      "type": "number",
      "examples": [
        -74.006
      ]
    },
    "toLat": {
      "type": "number",
      "examples": [
        42.3601
      ]
    },
    "toLon": {
      "type": "number",
      "examples": [
        -71.0589
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}