Search for content

Guide - Matrix Routing API


The PTV Developer Matrix Routing API allows you to calculate distances and travel times between multiple locations quickly and accurately. You can retrieve accurate results for different predefined vehicle configurations, to automatically respect road limitations like truck attributes depending on your vehicle characteristics. These distance and travel-time matrices are needed to solve vehicles routing problems (VRP) and provide the basis of all route and sequence optimization. 

The PTV Developer Matrix Routing API offers:

  • High performance routing: Don’t waste your time waiting: The calculation of a distance matrix for 20x20 waypoints takes 4 seconds and a matrix with 200x200 waypoints only 6 seconds. Compare that to the 39 minutes it would take with a conventional process, and you'll never want to use another matrix again.
  • Predefinable profiles and settings: Consider the side of street individually for each start and destination location. In our API, you can specify for each location whether you want to depart or arrive in the direction of travel, for example to avoid dangerous delivery situations or road crossings.
  • Exact Cost Calculation: Distance Matrix API considers the costs of tolls, drivers and vehicles. This makes it the ideal basis for the accurate calculation of transport costs and offers. It also considers the fact that outward and return might differ due to geography and infrastructure and therefore provides values for both directions.
  • Synchronous and asynchronous requests: No more time-outs: Instead of terminating a request, the API continues calculating in the background and automatically informs you when the request is completed. Synchronous requests support up to 1,000 locations.