> For the complete documentation index, see [llms.txt](https://docs.distance.tools/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.distance.tools/features/routing.md).

# Routing

## Car routing <a href="#car-routing" id="car-routing"></a>

Precise car routing based on high quality data delivered in ms. Distance API currently uses OSRM routing engine with OpenStreetMap data to calculate route distance and duration. Soon you will be able to choose also other providers like Google Maps and Mapbox for car routing as well as other routing profiles like Truck, Walk or Bike.

{% content-ref url="/pages/tbn8QASvAmEVnaDr1McG" %}
[routing/car](/tools/api/api-reference/routing-car.md)
{% endcontent-ref %}

### **Example result**

```json
{
  "route": {
  "car": {
    "distance": 466.1034, // car routing distance in Kilometer 
    "duration": 18095.3   // car routing duration in Seconds 
}
```

### **Under the hood**

{% embed url="<https://project-osrm.org/>" %}
[OSRM](/legal/credits.md#open-source-routing-machine-osrm) routing engine for [OSM](/legal/credits.md#openstreetmap-osm) based car routing
{% endembed %}

* Soon: More profiles like bike, walk and truck

***

## Maritime routing <a href="#maritime-routing" id="maritime-routing"></a>

Maritime Route feature employs advanced geospatial algorithms to facilitate efficient routing and distance computation between sea ports. The maritime route distance API can also snap arbitrary locations to the nearest sea route vertex.

{% content-ref url="/pages/NPQIcztl3mXnilGRpmZj" %}
[routing/maritime](/tools/api/api-reference/routing-maritime.md)
{% endcontent-ref %}

Maritime sea routing based on Eurostat data combined with modern geospatial algorithms empowering the Maritime routing API.

### **Example data**

```json
  "route": {
    "sea": {
      "distanceNM": 268.131303044648, // maritime route distance in Nautical miles
      "distance": 496.5789924839348,  // maritime route distance in Kilometer
      "duration": 13.4065651522324    // maritime travel time in Hours
     }
   }
}
```

Flatbush, the really fast **static spatial index** helps to snap any input location to the nearest sea routes vertex. This helps you to calculate maritime routes even if your input data does not reflect ports or maritime locations.

### **Under the hood**

{% embed url="<https://github.com/StephanGeorg/searoutes-api>" %}

* Eurostat maritime data
* Dijkstra's algorithm
* Flatbush spatial index
