The Google Distance Matrix API lets you calculate travel times and distances between a pair of locations. If you’re exploring all matrix providers to compare costs check out our latest blog:
This post is a deep dive into Google vs. TravelTime only. We’ll show you why the TravelTime API is the best alternative to Google’s Distance Matrix API for calculating travel times and distances between locations.
Why calculate drive times and distances?
Calculating driving distance can be useful for online search and for location analysis. For example, a store finder page that uses a distance matrix can help customers decide location is easier for them to get to using a distance matrix.
Or, if you’re planning an office relocation, you could calculate the distance and travel times from the potential offices to each employee’s address.
Determining drive times to many points of interest involves multiple calculations. This is because drive times to multiple potential destinations need to be calculated.
How does the Google Distance Matrix API work?
The Google Distance Matrix API calculates travel distances and time between many origins and destinations.
Conducting a search from a single origin to multiple destinations is called a query. Within that query are multiple origin-destination pairs. These are the number of searches between the point of origin and multiple destination points.
Each one of these pairs is called an element. So, if there is a single start point and 10 destinations, this equates to 10 origin-destination pairs, or elements.
How much does the Google Distance Matrix API cost?
Google uses a pay-as-you-go model for its Distance Matrix API. The API is priced per element (an element being the number of origins multiplied by the number of destinations). Pricing is also different based on whether you are using a Basic or Advanced request.
The table below shows pricing for a Basic request for the Google Distance Matrix API:
What is the best alternative to the Google Distance Matrix API?
The Travel Time Matrix API is the best alternative to the Google Distance Matrix API.
With the Travel Time Matrix API, you can calculate travel times between thousands of origins and destinations simultaneously, for any mode of transport – including driving, public transport, cycling and walking. To see how it works, you can test our Travel Time Matrix Playground for free here.
TravelTime is also a much more affordable option than the Google Distance Matrix API.
This means that you can get started with using the TravelTime API as a free alternative to the Google Distance Matrix API. TravelTime also offers a pay-as-you-go plan as part of its tiered pricing plans. With PAYG, you get an unlimited number of monthly credits.
How do I create a matrix with the TravelTime API?
To use the travel time matrix feature of the TravelTime API, you would enter:
- Your starting destination
- Your maximum travel time
- Your preferred mode of transport
The matrix endpoint then calculates the travel times from the origin to each point of interest.
What are the main differences between the Google Distance Matrix API and TravelTime API?
Below is a detailed feature comparison – if you have any questions, get in touch!
What else can I do with the TravelTime API?
Create isochrones (travel time shapes)
In addition to calculating travel times, you can also create isochrones with the TravelTime Isochrone API. Isochrones are shapes that show how far you can travel within a time limit – and the TravelTime Isochrone API lets you do this for any mode of transport.
The example below shows where can be reached within 30 minutes’ drive from Covent Garden in London:
How can I use the TravelTime API?
1. For location-based search
Many users use the TravelTime API is as part of their website or app search functionality.
This is because the API lets you filter and rank location search results by travel time, rather than distance, resulting in a more accurate and personalised search experience.
For example, the image below shows a job board search using the TravelTime API, where the user has selected a maximum travel time of 45 minutes and driving as their preferred transport mode.
The TravelTime API calculates travel times between the user’s start location and all possible results within that maximum travel time:
In another example, the image below shows a property search using the TravelTime API. Although there are 692 potential properties, this would be considered a single search:
2. For location analysis
The second way to use the TravelTime API is to make better location decisions. For example, if you’re relocating an office, you can use the TravelTime API to calculate the travel times and distance to each employee’s address.
Below is an example of staff commute times to two potential offices:
TravelTime: A cost-effective alternative to the Google Distance Matrix API
The TravelTime API offers a flexible and cost-effective alternative to the Google Distance Matrix API. With TravelTime, you can not only calculate accurate travel times and distances between many locations instantly, but you can also create isochrones to show where you can travel within a time limit for any mode of transport and create A to B routes.