Solutions
Developer guide
Pricing
Sign in
Get a free trial
Products
Solutions
Cases
Developer guide
Pricing
The Geocoding API (Beta)
The Distance Matrix API
The Geocoding API (Beta)

The Distance Matrix API for transport logistics and freight

Use an unlimited matrix size for your logistics application and streamline intercity transportation considering to real-time traffic information

Solution
The Distance Matrix API for professional transportation logistics is created to solve complex mathematical problems, including the classic "traveling salesman", so that every truck or another commercial vehicle could reach all planned destinations with the shortest route and in the minimum time.
The Distance Matrix API helps to find the most efficient routes by reordering stops and considering real-time traffic conditions and restrictions. It predicts the best departure time and calculates travel distance with the same accuracy as Google API does.
Main API features
You can find the optimum route for all the planned destinations by building matrixes 25x25, and more
Unlimited matrix size
You can rely on real mapping roads instead of straight lines from point A to point B
Optimum routes
The API considers all road conditions and restrictions that affect trucks
Real-time traffic situation
By determining the start time and considering traffic you can make predictions for delivery time
Predictive capabilities
Calculate distances for intercity and international transportation wherever your business is located
Worldwide coverage
You pay only for the monthly volume of elements you had used. No credit card needed
Flexible prices
truck route planner
drive time forecasting
distance matrix
real-time traffic
affordable price
global coverage
We have taken into account everything you need for building logistics software
Main API features
Unlimited matrix size
Optimum routes
Real-time traffic situation
Predictive capabilities
Worldwide coverage
Flexible prices
truck route planner
drive time forecasting
distance matrix
real-time traffic
affordable price
global coverage
We have taken into account everything you need for building logistics software
Cases
The Distance Matrix API in action for Delhivery company
A largest Indian transportation logistics company with 10 000+ clients uses several API tokens every day for different purposes from time and route calculation to optimizing the financial system.
delhivery case study
Read full story
Read full story
Cases
The Distance Matrix API in action for Delhivery company
A largest Indian transportation logistics company with 10 000+ clients uses several API tokens every day for different purposes from time and route calculation to optimizing the financial system.
delhivery case study
Read full story
Read full story
Information for developers
The request and response format of the Distance Matrix API is similar to Google's Distance Matrix API, and its migration is easy.
Example:
https://api.distancematrix.ai/distancematrix?origins=51.4822656,-0.1933769&destinations=51.4994794,-0.1269979&key=<your_access_token>
Response:
{
  "destination_addresses": [
    "Westminster Abbey, Westminster, London SW1P 3PA, UK"
  ],
  "origin_addresses": [
    "Chapel, Fulham, London SW6 1BA, UK"
  ],
  "rows": [
    {
      "elements": [
        {
          "distance": {
            "text":"4.7 miles",
            "value":7563.898
          },
          "duration":{
            "text":"31 min",
            "value":1860.0
          },
          "duration_in_traffic": { 
            "text":"31 min",
            "value":1860.0
          },
          "status":"OK"
        }
      ]
    }
  ],
  "status":"OK",
}
Read API documentation
Read API documentation
Find out how easy it is to migrate to the Distance Matrix API
You don't need to rewrite code, just change the API Key
Learn more
Start
Trusted by clients from all over the world
distancematrix.ai's clients
No credit card required, cancel any time
Start a free 7-day trial of the Distance Matrix API for Business
Get my 7-days free trial
Read API documentation
Get my 7-days free trial
Read API documentation