How we reduced delivery time by 25%

Distance Matrix API and delivery time calculation for food service
How we reduced delivery time by 25%
Distance Matrix API and delivery time calculation for food service is one of Ukraine's largest Asian food preparation and delivery chains. It's located in cities with populations of more than a million, such as Kharkiv, Dnipro, and Odessa. Every day, the company faces the traveling salesman problem: How can we deliver more than 120 orders per hour on time and provide customers with fast, high-quality service?

80% of the success of delivery service depends on the Distance Matrix API. The other 20% of success is based on the strength of the software that analyzes the data returned from the API. After Distance Matrix API by Google doubled in price in 2018, its users began to look for a cheaper solution that was just as effective. tasked us with finding a way to determine the best routes for its couriers and optimize the company's business processes. Every month, more than 500 000 requests had to be returned, with geolocation data and the fastest routes between points. Thanks to the optimization of queries and a solution customized specifically to meet the business model of the suppliers, DistanceMatrix and worked together to reduce delivery times by 25%.

Here's how we solved the problem and reached those numbers.
Geocoding to optimize business processes and delivery time calculation
There are four main ways for a customer to order food: by phoning 996, via chat-bot, via the company's website, or via a mobile version of the site.

Considering the variety of the existing communications modes, one of the main functionalities the company required was geocoding.
Geocoding API
Geocoding converts addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which can be used to place markers on a map. Reverse geocoding is the process of converting geographic coordinates into an address understandable by humans.

This feature helps optimize 966's business processes, especially when taking orders over the phone. All the operator needs to do is enter the address once. The geocoding service converts it into coordinates. The system can directly send these to DistanceMatrix, calculate the distance from the kitchen to the client, and determine how long it will take to deliver the food.
Implementation of a new Distance Matrix API that reduced costs fivefold
Because it has several kitchens in the city, had to calculate the best routes for its couriers in seconds in order to deliver food to its customers on time.

As the company had used Google API before, it was easy to migrate to DistanceMatrix. Our solution's syntax for requests is similar to Google's. The only thing that needs to be done is to change the domain and access token. It takes less than one day to migrate, because there is no need to rewrite any code.

The main customers were mobile users, which comprised about 70% of all online users. They wanted to know how long it would take for the delivery to reach their address. After implementing the new API, decided to show their clients exactly when the courier would arrive with their order. On both the mobile and desktop versions of the website, every user now enter their address and see the delivery time right away.
Delivery time calculation
The company shows users the time in minutes. This includes time for food preparation, packing, and how long the courier will spend on the way.

The Distance Matrix API helps accurately calculate the delivery time, taking into account traffic jams and the fastest routes for the nearest kitchen and courier.

As a result, we managed to reduce – by 5 times, compared to using the Google Distance Matrix API –'s cost of calculating delivery times.
The main advantage of delivery time calculation using the Distance Matrix API
After changed some of its business processes, it managed to reduce its delivery times by 25%. Every request sent by the Distance Matrix API is 5 to 7 times cheaper than sending it via the Google API. This helps the company save costs on delivery time calculation and deliver high-quality services to their clients on time. Overall, managed to reduce its delivery costs by 60%. It also became possible to send more requests to the API to refine the algorithms for calculating distance and time.

We carry out continuous work to calculate route durations and constantly supplement the database with new data.
Client's review
Dmitriy Khvostick
CEO at
"We have been using the Distance Matrix API for almost 2 years. This solution helped us reduce the costs of calculating routes and optimize business processes. I can highly recommend geocoding and the Distance Matrix API for those who need to solve travelling salesman problems and want a good alternative to Google Distance Matrix."
Fill in the form and get a free 7 days trial period for Distance Matrix API
Tell us more about your project and we'll help you to choose the best solution and pricing plan.
Link to your website or your company name and job position
Email where to send a token and instructions
What is the most comfortable channel to communicate with you?
Volume of elements (origin-destination pairs) per month:
Have you ever used Google Distance Matrix API or any other similar API before?
You agree with our Terms and Conditions
Made on