Skip to content
Timings API

Timings API

The Timings API estimates travel times for a route based on distance and elevation. It returns separate estimates for walking, cycling, off-road cycling, and racing cycling.

Base URL

https://enhance.maptoolkit.net

Authentication

Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.

Get Travel Time Estimates

Endpoint:

GET  https://enhance.maptoolkit.net/route
POST https://enhance.maptoolkit.net/route

Use a POST request when the geometry is large.

Parameters:

ParameterTypeRequiredDescription
timings1YesSet to 1 to include timings in the response.
geometryGeoJSON stringYes (or gpx/kml)A GeoJSON LineString or MultiLineString.
gpxURLYes (or geometry/kml)URL to a GPX file.
kmlURLYes (or geometry/gpx)URL to a KML file.
cache0 or 1NoUse cached results if available. Default: 1.
callbackstringNoWrap the response in a JSONP callback.

Example

GET https://enhance.maptoolkit.net/route?geometry={"type":"LineString","coordinates":[[10,50],[10.1,50.1]]}&timings=1&api_key=YOUR_API_KEY

Response:

{
  "geometry": {
    "type": "MultiLineString",
    "coordinates": [[...]]
  },
  "timings": [{
    "walking": 300,
    "cycling": 100,
    "cycling_offroad": 110,
    "cycling_racing": 50
  }]
}

Times are in seconds. The timings array contains one entry per segment of the MultiLineString.

FieldDescription
walkingEstimated walking time in seconds.
cyclingEstimated road cycling time in seconds.
cycling_offroadEstimated off-road cycling time in seconds.
cycling_racingEstimated racing cycling time in seconds.