What is a Distance Matrix API?
In the simplest of terms, the Distance Matrix API is a service that computes distances and travel times between a given set of origins and destinations. Be it for one origin to many destinations or many origins to many destinations, the API finds the most efficient path or paths to meet your needs. It does so by first calculating the best route between each origin and destination individually, and then identifying the most efficient paths among all of them, which connect the origins and destinations as per your requirements.
NextBillion.ai’s Distance Matrix API predicts accurate distances and arrival times
Who Needs Distance Matrix APIs?
Any business that deals with the movement of vehicles operationally has a need for a Distance Matrix API in order to optimize said operations via improved efficiency, predictability, and scalability.
Logistics, on-demand delivery, fleet management, mobility, ride-hailing — whatever your line of business, each has its own unique routing and operational challenges. For instance, in the case of trucking, you would need to take into account considerations like height clearances, load weights, vehicle- and time-based road restrictions, compliance requirements, and many more. Contrast this with the food delivery vertical, and a whole different set of factors come into play, from effective dispatching and order batching to apartment complex layouts and vehicle-specific routing for e-scooters, motorbikes, cars, etc.
It’s not hard to see that while all mobility-based companies have a clear need for a Distance Matrix API, there’s a lot of variability in the intricacies of each operation and what it takes to drive optimization. Such customizability for highly accurate distance and ETA predictions is one of the hurdles where most APIs in the market fall — but not NextBillion.ai’s Distance Matrix API.
What are the Differences Between NextBillion.ai’s, Google’s, and Mapbox’s Distance Matrix APIs?
NextBillion.ai’s proprietary Distance Matrix API is engineered to meet the needs of a spectrum of modern enterprise use cases, unlike other existing plug-and-play APIs that lack the ability to conform to varying requirements across numerous industries.
Below, we’ve compared our NextBillion.ai Distance Matrix API with Google’s and Mapbox’s equivalent offerings — the Google Distance Matrix API and the Mapbox Matrix API — which are currently two of the most widely used tools in the space. Here are some of the key differentiators:
As already mentioned, various use cases require differing operational nuances to be taken into consideration for the generation of accurate travel time and distance predictions. NextBillion.ai’s Distance Matrix API achieves this level of customization by using advanced machine learning algorithms to process both proprietary and third-party use-case-specific data in conjunction with live traffic information.
By sharing your historical or operational data such as origin and destination latlongs, travel times, speed profiles, or vehicle types, you get an API that’s deeply customized to your use case. Be it routing preferences, vehicle data, regional nuances, driver behavior, cargo type, or any other relevant data, we crunch it all to deliver accurate predictions every time, everywhere.
Google’s and Mapbox’s APIs do not offer such customizability. Without the ability to account for the numerous nuances that factor into routing operations across industries, you’re left with a generic tool that provides unreliable outputs. This, in turn, leads to mismatched expectations, and time and cost inefficiencies, which negatively impact your bottom line as well as driver and customer sentiment.
2. Matrix Size
One of the most important features of any Distance Matrix API is the matrix size it can support. Every API call returns a matrix of ETAs and distances for each origin and destination pair as shown here.
The Google and Mapbox APIs both have a matrix size of 25×25. This means that they can calculate ETAs and distances between a maximum of 25 origins and 25 destinations at a time. NextBillion.ai’s API, on the other hand, supports matrices of up to 5000×5000.
A bigger matrix size is crucial when it comes to large-scale operations like many-to-many delivery scenarios that involve a large number of vehicles and drop-off points. Long-haul trucking, which requires numerous stops — from fueling points, toll stations, and border crossings, to rest stops, food breaks, and warehouse locations — is another use case where larger matrix sizes are an important factor.
Such large matrices allow you to accurately account for as many stops as you need, and even ordering and reordering of stops as required. Unsurprisingly, this results in better-optimized dispatching and routing capabilities for your business-critical operations.
3. Cost and Pricing
Distance Matrix APIs often need to make a huge volume of API calls, especially in the case of large-scale operations. This can quickly become costly with most existing solutions on the market, though, as scaling with them comes with a rather heavy price tag.
NextBillion.ai’s Distance Matrix API is unique in that it comes with flexible, customized pricing options for every business model, so that you can scale your operations without worrying about cost feasibility.
Here’s a quick overview of our pricing models:
- Pay-as-you-go — Pricing based on volume of API calls
- Subscription — Fixed fee with unlimited API calls for on-premise deployment
- Customized — Pricing based on ML model deployed
The focus of our pricing is to help you achieve positive unit economics and reduce the cost of scaling up your business. With the rigid pricing models offered by Google and Mapbox, this can become a challenge. Below is a look at how NextBillion.ai stacks up against the competition in terms of pay-as-you-go pricing.
|Number of elements per Month||Google Maps|
|1 to 100K||$1.80||$5.0|
|100K to 500K||$1.50||$4.0|
|500K to 1M||$1.20||–|
|1M to 5M||$0.90||–|
|5M to 10M||$0.75||–|
Each query sent to our Distance Matrix API returns elements, where the number of elements is equal to the number of origins multiplied by the number of destinations.
We even offer a 20% discount if you bring your own data (BYOD). By sharing your historical or operational data, you get a more affordable, yet better-performing custom API that’s optimized for your specific use case.
4. Deployment Modes
Route optimization demands the ability to execute a large number of API calls at very low latencies, and there’s no better way to achieve such performance than through an on-premise solution deployment — which only NextBillion.ai’s Distance Matrix API supports.
Our on-premise deployment enables you to make unlimited API calls for a fixed price, at 2-3X lower latency and 10-20X higher throughput than Google’s and Mapbox’s relative performance levels.
NextBillion.ai’s cloud-agnostic solution architecture means that you’re not obligated to use any particular provider’s services, saving you the trouble and expense of having to modify your existing setup for the sake of compatibility.
All things considered, NextBillion.ai’s Distance Matrix API delivers a valuable combination of performance, affordability, and flexibility — one that no other solution available on the market can match.
Below is a quick summary of how we compare to Google and Mapbox.
You don’t have to take our word for it, though. Get a free trial to experience the difference for yourself. Raise your bottom line and achieve positive unit economics with a performant, cost-effective, and scalable Distance Matrix API.
Ready to get started?Talk to Sales
Lower fuel costs
by up to 20%
Ready to up your game in scheduling, dispatch, and routing?Request a Demo