How to calculate travel door to door with and without an API

by Niharika Sisodia
on Oct 23, 2018

What is a routing map?

A routing map shows you the route from a starting point to a destination. A simple example would be calculating a route from your home address to your local supermarket. The map below uses the TravelTime platform to show the route from Kennington to the UK supermarket, Tesco.


The TravelTime platform returns routing information between a starting point and the destinations. You can do a departure or arrival search from the search origin to up to two destination points. For example, arrive at London King’s Cross station at 9am or depart at 9am.


The example below shows the shortest route from King’s Cross to the British Museum departing at 9am.


The user could also do an arrival search.


The example below shows the shortest route from King’s Cross to the British Museum arriving at 9am.


The TravelTime platform supports the following modes of transport:

  • Cycling
  • Driving
  • Driving+train
  • Public transport
  • Walking
  • Coach
  • Bus
  • Train
  • Ferry
  • Driving+ferry
  • Cycling+ferry

Using routing on TravelTime Maps tool

Try it yourself. Travel door to door using the TravelTime platform.

Routing can also be integrated into websites as part of a business solution. For example, a cinema chain could use routing on a cinema finder page. The below map uses Time Map and Time Filter, powered by the TravelTime Search API.

In this example, the user can find out which cinemas are easiest to reach. They enter their preferred mode of transport (public transport in the example below) and the journey times to each location is shown. Time Map produces the isochrone shape on the map. Time Filter produces the journey time information in a list on the left side of the page. The below example shows all cinemas within 15 minutes of central London by public transport.


From the map or the list, the user would select their preferred cinema. They would then select ‘directions to here’.









This would provide them with a route.


Time Filter can return travel time and directions for up to 100,000 points from the search origin. Time Filter requires a defined travel time limit of up to 4 hours. This allows it to show only the results that are relevant to the user and to filter out unreachable locations.

Learn more about Time Filter and how the TravelTime Search API can support your business.

How do I code a route?

Before you begin, you first need to request an API key and ID.

The example below shows you how to code a departure search. The point of origin is the centre of London. The destination points are Hyde Park and ZSL London Zoo. The mode of transport is driving. In the example, the departure date is 2018-09-17 and the departure time is 08:00. The request is for travel time, distance and route.


First, you need to create the request.

Add locations

Then, you need to add locations to your request by entering the geo-coordinates. In this case, we will use 51.508930, -0.131387 as the centre of London, 51.508824, -0.167093 as Hyde Park and 51.536067, -0.153596 as ZSL London Zoo. Take a look at our free geocoder tool if you don’t have lat/longs.

This request has both a departure and arrival search example.

For the departure search, the API returns travel times, route details and fares for public transport. It also shows the distance for other modes from one departure point to up to two destination points.

Departure search



For the arrival search, the API returns 1 result for this journey within a range of 1800 seconds (30 minutes). This means the user can arrive within a 30-minute window, rather than arrive at a specific time. The API can also return up to 5 alternative results, like on the screenshot below.

Arrival search






The response for this request contains the departure and arrival search results with routes information. Look at the code here.

Get in touch to learn more about calculating travel door to door using the TravelTime platform.



5 ways to do geocoding for free

Discover solutions that do geocoding for free. Find out which free geocoders have the best functionality. Convert addresses and postcodes into coordinates.

Evelina Bezubec Sep 9, 2019

TravelTime platform releases isochrone QGIS plugin

Create a QGIS isochrone using the TravelTime platform API. API keys are free to use for non-commercial purposes. You can also calculate a distance matrix and routing using the plugin.

Louisa Bainbridge Jun 12, 2019

5 Google Places API alternatives for points of interest data

Find Google Places API alternatives. Connect to a reliable 'points of interest' database via an API. Improve user experience and perfect your location search tool.

Louisa Bainbridge Jun 14, 2019

The guide to TravelTime API limits

Discover the volume of searches you can do per month and per minute on the TravelTime API free plan. You can use more than one search in an API request.

Louisa Bainbridge May 16, 2019

Step by step free geocoding for Leaflet

Geocoding for Leaflet. Learn how to use a geocoder that is Leaflet-compatible. Convert addresses and postcodes into coordinates to be displayed on a Leaflet map.

Louisa Bainbridge May 7, 2019

IFS use TravelTime to calculate 3.2 billion journey times

How the IFS created a travel time matrix of 40,000 origins to 40,000 destinations for both driving and public transport using the TravelTime platform.

Louisa Bainbridge Apr 16, 2019