Sep 12, 2022 • Blog

Distance Matrix API Pricing Comparison: Google, Mapbox & More

facebook iconx icon

Contents

What is a Distance Matrix API?

A Distance Matrix API is a web service that calculates the distances and journey times between a set of origins and destinations.

One to many matrix

Use cases for a distance matrix are incredibly broad, from fleet optimisation to gravity modelling to B2C search applications. The number of different providers in the market is also very extensive, from Google to Mapbox to TravelTime, all offering similar features and functionality.

There are a number of different providers offering similar products to meet these different application areas, often with slightly different features that can be hard to disentangle in order to work out how they stack up against one another.  

There are a couple of key areas where differences between different providers are more obvious though:

  1. Usage limits- what size matrices can you generate, and how quickly?
  2. Pricing- how much does it cost to generate matrices of different sizes?

Usage limit considerations

For usage limits, restrictions normally come in two forms:

  1. How many locations can be included in a matrix?
  2. How many requests can be made to the API in a given time period (usually per minute)?

In other words, how big can a single matrix be and how quickly can you make multiple matrices?

Pricing considerations

For pricing, Distance Matrix API providers typically offer:

  • A free tier
  • Variable pricing based on the number of ‘elements’ used

Very occasionally a provider will calculate their own unit to price on (e.g “Elements / 2”) but the general idea is exactly the same - the more data you need, the more you pay.

What is an element?

An element is a single result in a matrix (i.e the distance and/or travel time between one origin and one destination). So for example, a matrix with 1 origin and 1,000 destinations would be 1,000 elements (1 x 1,000), while a matrix with 10 origins and 20 destinations would be 200 elements (10 x 20).

distance matrix
Example of an element: 24 min

Usage based pricing vs. TravelTime’s unlimited usage pricing

TravelTime is the only provider in the market that does not price on elements (or a metric related to elements). Instead, we offer fixed monthly pricing based solely on the maximum concurrency required. We measure concurrency based on ‘Hits’.

Our base level Unlimited Plan gives a maximum concurrency of 60 Hits Per Minute, for a fixed price of £900 per month.

Distance matrix CTA

What is a hit & how does it compare to an element?

A hit is a single one-to-many or many-to-one matrix request. The number of elements that can be included in a single hit depends on which TravelTime API endpoint is being used:

So how many elements can I use each month?

Using the Time Filter Fast endpoint, the base level Unlimited Plan of 60 hits per minute gives a limit of 6 million elements per minute. Maxing this out over the course of a month, we could calculate over 200 billion elements per month, all for a fixed price of £900 per month.

Comparing the different Distance Matrix providers

To compare the different providers, we’re going to consider two typical applications of a Distance Matrix API, but covering very different use cases and usage profiles:

  1. A consumer facing search application, that will involve lots of one-to-many matrices
  2. A route scheduling application that will involve just a few many-to-many matrices

Scenario 1: Using a distance matrix API on a consumer facing application

Search Scenario Price
(per month)
Maximum One-To-Many Matrix Size Maximum Requests
(per minute)
TravelTime $1,200 -try our unlimited plan free! 100,000 60
Google $799,900 100 600
Mapbox $240,400 25 60
TomTom $4,000,000 200 10
Bing Not publicly available 625 Unknown
OpenRouteService Not possible with maximum allowed usage 50 40
Nextbillion.ai $151,050 5,000 6,000
Graphhopper Not possible with maximum allowed usage 150 50,000 credits per day*

Based on creating 100,000 matrices per month, each of size 1 x 2,000 

* Credits = either #origins x #destinations / 2 or max(#origins, #destinations) x 10 is used. Depending on which is smaller.

In the first scenario, we operate a web application that allows users to search for jobs near to where they live. Each time a visitor searches the site a one-to-many matrix is generated, calculating the distances and journey times between their home location and the locations of all available jobs on the site that match the search criteria (e.g the job title and salary).

In terms of specific values:

  • The site gets 100,000 visitors per month, each conducting a single job search
  • There are on average 2,000 live job postings that meet a typical search criteria

This means that each month we need to use a Distance Matrix API to generate 100,000 matrices, each of size 1 x 2,000.

The table above shows how much this would cost for the different Distance Matrix API providers, per month. For consistency, where multiple plans are available we have taken the highest available plan that is published publicly.

Distance matrix CTA

Scenario 2: Using a distance matrix API for a routing application

Big Data Scenario Price
(per month)
Time Required
(minutes)
TravelTime $1,200 22
Google $25,900 27
Mapbox $8,200 1,082
TomTom $200 232
Bing Not publicly available Unknown (2,600 requests required)
OpenRouteService Not possible with maximum allowed usage Not possible with maximum allowed usage
Nextbillion.ai $6,925 1*
Graphhopper $384 Not possible with maximum allowed usage

Based on creating two matrices per week (50 x 1,250 and 1,250 x 1,250)

* Based on maximum usage allowed per minute. Actual time required may depend on API response times.

In our second scenario, our company has a fleet of 50 service engineers, who between them conduct on average 1,250 customer home visits each week. At the start of each week we build a schedule of visits for each engineer based on an efficient routing calculation. To do so, we need to know the driving times from each engineer to each customer home, and from each customer home to each other customer home.

The calculations we make at the start of each week are:

  • A matrix of each engineer to each customer (50 x 1,250)
  • A matrix of each customer to each customer (1,250 x 1,250)

The table above is a breakdown of how much this would cost for the different Distance Matrix API providers, per month. We’ve also taken the usage limits to calculate how long it would take to get the required amount of data.

Distance matrix CTA

What do these results mean?

The comparisons of usage Limits and pricing can be looked at separately, but it often makes more sense to assess a provider by looking at both together.

For example, if we were looking for a provider to power a location-based search on a web application, then the very high limits provided by nextbillion.ai (6,000 requests per minute) look incredibly appealing. When we look at the cost of such high concurrency, however, it quickly becomes apparent that this is unlikely to be affordable, coming in at over $150,000 per month just to power 100,000 searches in our job site example.

Similarly, if we wanted to use a Distance Matrix API provider to power our route scheduling application example, looking solely at cost makes TomTom appear to be an attractive option at just $200 per month. However, when we take into account that for synchronous requests, there is a limit of 200 locations per request, and a maximum of 10 requests per minute, it turns out that to run the calculations we need would take over 12 hours each week.

Choosing a Distance Matrix API provider to suit your needs

When choosing between the different Distance Matrix API providers, the features and functionality on offer are often broadly similar, but where the biggest differences come in are around Pricing and Usage Limits.

When making your decision, we’d always advise that you map out what sort of usage you are expecting to see, and then pick a provider that can both meet your requirements in terms of both usage and budget.

Ready to try TravelTime?

TravelTime is built for high volume users focused on performance and data accuracy.

  • High usage limits
  • Low cost
Save up to 90% on your distance matrix API cost.
TravelTime is the only API to charge on bespoke requests per minute – not PAYG, not monthly or annual usage limits, and no overage.
Get started
cta accent icon
facebook iconx icon

Contents

Calculate thousands of travel times with the TravelTime API

Get started free
cta accent icon