search icon
Overview
Developer Tools
Travel Time Matrix API
Isochrone API
H3 API
Geohash API
v4/geohash/fast
Endpoint Reference
v4/geohash
Endpoint Reference
Distance Map API
Routes API
Geocoding API
Additional API Reference
Error Handling
ArcGIS plugin
Alteryx plugin
TravelTime.comchevronDocs

Isochrones for Property Portals

Use Case

  • Allow users to search for properties by commute time
  • Display their commutable area as a polygon on the map
  • Filter reachable properties using this polygon

Value

  • Increase conversions by showing more relevant search results
  • Capture user commute preferences to build a richer profile for relevant notifications and alerts

Customer Case study

Zoopla logo
  • tick icon300% increase in conversions
  • tick iconMore relevant results for users
  • tick iconReduced agent churn with higher quality leads
Read customer storychevron icon
Ben Amos

Ben Amos

Senior Product Manager at Zoopla

“With TravelTime, we help users much earlier in their property search journey, providing a more personalised discovery process based on what they need to be near, how long they want to travel, and by what transport mode.”

Typical flow

single isochrone flow chart

Sending requests

Request typePOST
Hostapi.traveltimeapp.com
Endpoint/v4/time-map/fast
AuthenticationApplication-Id
Api-Key

You can find your Application-Id and Api-Key by logging into your TravelTime account.

Or if you don't already have an account, then sign up for free access below.

Request body


{
  "arrival_searches": {
    "many_to_one":[
      {
        "id": "Commute Time Search",
        "coords": {
            "lat": 51.1234,
            "lng": -0.1984
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 3600,
        "transportation": {
            "type": "driving"
        }
      }
    ] 
  }
}
          
Parameters:

many_to_one - captures the area that the user could travel from to arrive at their chosen location (e.g a morning commute to the office)

coords - lat-long coordinates of the user's search location - their address can be converted to lat-long coordinates using the TravelTime geocoding endpoint

arrival_time_period - weekday_morning reflects the typical travel times for a morning commute

travel_time - taken from the user's chosen commute time (up to 3 hours)

transportation - taken from the user's chosen transport mode, typically Driving / Public_Transport / Walking / Cycling

Response body

JSON


{
  "results": [
    {
      "search_id": "Commute Time Search",
      "shapes": [
        {
          "shell": [
            {
              "lat": 51.272484,
              "lng": -0.964971
            },
            {
              "lat": 51.272484,
              "lng": -0.9634258
            },
            {
              "lat": 51.271996,
              "lng": -0.9626532
            },
            {
              "lat": 51.271015,
              "lng": -0.9626532
            },
            {
              "lat": 51.269054,
              "lng": -0.95956284
            },
            .
            .
            .
            .
            .
            {
              "lat": 51.51646,
              "lng": -0.75791556
            },
            {
              "lat": 51.51646,
              "lng": -0.75637037
            }
          ],
          "holes": []
        }
      ],
      "properties": {}
    }
  ]
}

            

GeoJSON


{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [
                -0.964970980072394,
                51.27248479181435
              ],
              [
                -0.96342579042539,
                51.27248479181435
              ],
              [
                -0.962653195601888,
                51.2719948773738
              ],
              [
                -0.962653195601888,
                51.2710150484927
              ],
              .
              .
              .
              .
              .
              [
                -0.7579155673738569,
                51.516462183208205
              ],
              [
                -0.7563703777268529,
                51.516462183208205
              ]
            ]
          ]
        ]
      },
      "properties": {
        "search_id": "Commute Time Search"
      }
    }
  ]
}

            

Additional Optional Parameters

  • level_of_detail - decrease this to improve performance of the application, or increase it to show more granular polygons
  • polygons_filter - by default, the isochrone returned can be a multi-polygon, with disconnected 'islands' that are reachable but not attached to the main shape. Use this parameter to reduce the number of individual polygons
  • no_holes - by default, the isochrone returned can have unreachable areas surrounded by a reachable area. Use this parameter to fill in these holes

SDKs

NodeJS
Python

Installation

npm

npm i traveltime-api

This package comes with TypeScript support.

Usage

Client Initialization

Before starting, the package needs to be configured with your account's application ID and Key, which can be found in the TravelTime Developer Portal Dashboard. To create an instance - you will need to create new TravelTimeClient class object with credentials you got from dashboard.

import { TravelTimeClient } from 'traveltime-api';

const travelTimeClient = new TravelTimeClient({
  apiKey: 'YOUR_APP_KEY',
  applicationId: 'YOUR_APP_ID',
});

Time Map Fast Function


travelTimeClient.timeMapFast({
  "arrival_searches": {
    "many_to_one":[
      {
        "id": "Commute Time Search",
        "coords": {
            "lat": 51.1234,
            "lng": -0.1984
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 3600,
        "transportation": {
            "type": "driving"
        }
      }
    ] 
  }
}).then((data) => console.log(data))
  .catch((e) => console.error(e));
              

Installation

Install Travel Time Python SDK in a virtualenv using pip. virtualenv is a tool to create isolated Python environments.

virtualenv allows to install Travel Time Python SDK without needing system install permissions, and without clashing with the installed system dependencies.

Linux/Mac

pip3 install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install traveltimepy

Windows

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install traveltimepy

Sdk set up

In order to authenticate with Travel Time API, you will have to supply the Application Id and Api Key.

Takes:

  • app_id: str - Application Id
  • api_key: str - Api Key
  • limit_per_host: int - Number of simultaneous connections to one host.
  • rate_limit: int - Number of searches which can be made in a time window.
  • time_window: int - Duration, in seconds, of the time period in which to limit the rate.
  • retry_attempts: int - Number of retries for failed requests.
  • host: str - TravelTime host, default value is api.traveltimeapp.com.
  • timeout: int - Maximum session time until timeout. Default value is 300 (5 minutes).

from traveltimepy import TravelTimeSdk

sdk = TravelTimeSdk(app_id="YOUR_APP_ID", api_key="YOUR_APP_KEY")

Time Map Fast Function


import asyncio

from traveltimepy import Coordinates, Transportation, TravelTimeSdk

async def main():
    sdk = TravelTimeSdk("7092cee5", "3cdef325b69bda71401228df7dc4015b")

    results = await sdk.time_map_fast_async(
        coordinates=[Coordinates(lat=51.1234, lng=-0.1984)],
        transportation=Transportation(type="driving+ferry"),
        travel_time=3600
    )

    print(results)


asyncio.run(main())
              

FAQs

What is the performance like?
chevron

The average response time for an isochrone is 105ms.

How accurate is your data?
chevron
Our dedicated Data Team ensures our data is always fully up to date, and our Public Transport timetables are updated at least once a week. We build our Driving models from the ground up to replicate the drive times from Google Maps as closely as possible, and you can run benchmarks to compare our results to other providers using our Github Comparison Tool.
How reliable is the service?
chevron
Our APIs never drop below 99.99% uptime - view the details on our live status page.
Where do you have coverage?
chevron
We support driving, walking and cycling in 235 countries globally, with public transport data in over 110 countries. We publish exactly what public transport data we have in our interactive Coverage Tool.
How much will this cost?
chevron

We never charge based on usage. Instead we offer unlimited usage licences for a fixed monthly fee. The only thing you need to decide is the maximum Requests Per Minute (RPM) you need.

Can I test out the endpoint for myself?
chevron
You can test the full functionality of the Isochrone Fast endpoint in our API Playground. Once you've signed up for a TravelTime account, you can also use your API key for an unlimited 2 week trial.