Routing API

Get detailed routing information for car, bike, walk and transit.

Key Features

  • Run many routings (A-X) in a single request, getting comparable options
  • Detailed transit routes including transfers and connections

Use Scenarios

Get detailed route as compact json or compatible GeoJSON

"pathSerializer":"compact" for lightweight, "pathSerializer":"geosjson" for lines you can use anywhere.

Return time-optimized or distance-optimized routes

"edgeWeight":"time" to get a route that takes the shortest time, "edgeWeight":"distance" to get a route that covers the shortest distance.

Inputs

Basic inputs (see docs for more)

  • sources: array of starting points
  • targets: array of destination points
  • edge weight: “time” or “distance” optimization
  • travel type: “walk”, “bike”, “car”, “transit”
  • max edge weight: maximum time/distance to search for routes
  • path serializer: “compact” or “geojson” output format

Outputs

Basic outputs (see docs for details)

  • compact serializer: Custom json format, in EPSG:3857, used by Targomo-js libs. Array of routes - 1 for each source-target
  • geojson serializer:" Array of GeoJSON “LineString” features - 1 for each source-target

Operations counting strategy for public use

maxRoutingtime: each 60 minutes is counted as 1 operation.

sources & targets: each source point to 100 targets = 1 operation.

counting factors are multiplicative…

examples: 1 source, 100 targets, 60 minutes = 1 operation. 2 sources, 200 targets, 60 minutes = 4 operations.

200,000 single-source, single-target, 60-minute routes could be requested with the 300 € monthly use-credit.