Migration Guide: Google Isochrones API to TravelTime Time Map Fast API
Copy link

1. Introduction
Copy link

This guide is aimed at helping a migration from the Google Isochrones API, to the Time Map Fast endpoint.

It covers the main similarities and differences between the two services, covering Features, Request Details, Response Details, and Error Handling.

Why migrate to TravelTime?
Copy link

  • Significantly better performance (often more than 10x faster)
  • Support for public transit
  • Longer travel times (up to 3 hours, vs 1 hour for driving with Google)
  • Fixed cost and unlimited usage, instead of transactional pricing
  • Permissive caching policy

2. Features comparison
Copy link

The table below covers the main features of the two services.

Google APITravelTime API
Maximum isoline size1 hour (driving)

2 hours (walking, cycling)
3 hours*
Sync / asyncSynchronousSynchronous
Rate limit600 requests per minute (per project)Unlimited
Transport modesCar, Pedestrian, BicycleCar, Pedestrian, Bicycle, Public Transit
Range typesTravel timeTravel time, Distance*
Arrival vs departureBoth (travelDirection: FROM / TO)Both (one_to_many / many_to_one searches)
Time of day configurationTraffic-unaware (default), or live traffic at the time of the requestPeak and Off Peak options
Response formatsGeoJSONJSON
GeoJSON
WKT
PricingUsage basedFixed price, unlimited usage
Endpoint playgrounddevelopers.google.com/maps/documentation/isochrones/demoplayground.traveltime.com/isochrones-fast
SupportMonthly fee + % of platform charges (for Enhanced support)Included in all licences
CachingRestrictedPermitted

*Distance isolines are supported through a separate Distance Map endpoint

3. Request comparison
Copy link

The sections below cover the main details of the API requests for each service, including endpoint details, authentication, and request structure.

A side-by-side comparison is provided to show how the same one hour driving isochrone can be generated using each service.

Endpoint
Copy link

Google APITravelTime API
Base URLisochrones.googleapis.com/v1/isochrones:generateapi.traveltimeapp.com/v4/time-map/fast
API versionIncluded in URL path (/v1)Included in URL path (/v4)
Primary request typePOSTPOST*

*TravelTime API supports GET requests through the Time Map endpoint

Authentication
Copy link

Google APITravelTime API
Authentication methodX-Goog-Api-Key header

(or key query string, or OAuth token)
X-Application-Id and X-Api-Key headers
Required headersContent-Type: application/json
X-Goog-Api-Key: {Your_API_Key}
Content-Type: application/json
X-Application-Id: {Your_App_ID}
X-Api-Key: {Your_API_Key}
Optional headersN/AAccept: application/geo+json
(used to adjust the response format - e.g. geoJSON, JSON,
or WKT)

Request structure
Copy link

Both services use POST requests, with parameters included in a JSON request body.

Google APITravelTime API
Batch supportNot supported (one isochrone per request)Supported through an array of
one-to-many or many-to-one searches
Arrival vs departuretravelDirection: FROM (departure)

travelDirection: TO (arrival)
Determined by using either one_to_many or many_to_one search
Coordinate inputlocation: { latitude, longitude }

or place: places/{place_id}
coords: { lat, lng }
Transport typetravelMode:
DRIVE /
WALK /
BICYCLE
transportation: { type:
driving+ferry /
cycling+ferry /
walking+ferry /
public_transport
}
Travel time configurationtravelDuration
(in seconds, as a string with an s suffix - e.g. "3600s")
travel_time
(in seconds)
Traffic configurationroutingPreference: TRAFFIC_UNAWARE
(static travel times)

routingPreference: TRAFFIC_AWARE
(live traffic at the time of the request)
traffic_model: peak /
off_peak
Shape granularityControlled through:

polygonFidelity (control the granularity of the shape - LOW / MEDIUM / HIGH)

enableSmoothing (round off the polygon edges)
Controlled through:

polygons_filter (remove smaller separated polygons)

level_of_detail (control the granularity of the shape)

no_holes (fill in holes in polygons)

Request examples
Copy link

The curl examples below both show how to generate a simple one hour driving isochrone departing from a location in New York City.

These requests both include all of the required fields. Both services offer additional optional fields for tailoring the results further.

Google API Request:
Copy link

curl -X POST "https://isochrones.googleapis.com/v1/isochrones:generate" \
-H "Content-Type: application/json" \
-H "X-Goog-Api-Key: {Your_API_Key}" \
-d '{
  "location": {
    "latitude": 40.72511,
    "longitude": -73.99088
  },
  "travelDuration": "3600s",
  "travelMode": "DRIVE",
  "travelDirection": "FROM"
}'

TravelTime API Request:
Copy link

curl -X POST https://api.traveltimeapp.com/v4/time-map/fast \
-H 'Content-Type: application/json' \
-H 'Accept: application/geo+json' \
-H 'X-Application-Id: YOUR_APP_ID' \
-H 'X-Api-Key: YOUR_APP_KEY' \
-d '{
  "arrival_searches": {
    "one_to_many":[
      {
        "id": "Example",
        "coords": {
          "lat": 40.72511,
          "lng": -73.99088
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 3600,
        "transportation": {
          "type": "driving"
        }
      }
    ]
  }
}'

4. Response comparison
Copy link

The sections below cover the main details of the API response for each service.

A side-by-side comparison is provided to show how the same one hour driving isochrone is returned using each service.

Structure differences
Copy link

Google APITravelTime API
Response formatsGeoJSONJSON
GeoJSON
WKT
Top-level structureAn isochrone object containing a geoJson geometry object (MultiPolygon)A GeoJSON FeatureCollection, with a search_id property to identify each search
Support for holesGeoJSON - handled natively

(no option to remove holes from the response)
JSON - handled by holes arrays
GeoJSON - handled natively
WKT - handled natively
Support for multiple disconnected polygonsGeoJSON - handled nativelyJSON - handled by multiple shell arrays
GeoJSON - handled natively
WKT - handled natively
Coordinate order[longitude, latitude] (RFC 7946)[longitude, latitude] (RFC 7946) for GeoJSON responses

Response examples
Copy link

The response examples below both show a one hour driving isochrone from a location in New York City.

For the TravelTime response, geoJSON is used as the response format, but other formats are available (JSON, WKT).

Google API Response:
Copy link

{
    "isochrone": {
        "geoJson": {
            "type": "MultiPolygon",
            "coordinates": [
                [
                    [
                        [
                            -74.00688,
                            41.323584
                        ],
                        [
                            -74.016671,
                            41.322901
                        ],
                        ...
                    ]
                ]
            ]
        }
    }
}

TravelTime API Response:
Copy link

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.66676814504899,
                                40.653876852826215
                            ],
                            [
                                -74.66441676905379,
                                40.65567800810095
                            ],
                            [
                                -74.66206539305858,
                                40.653876852826215
                            ],
                            [
                                -74.65971401706338,
                                40.65567800810095
                            ],
                            [
                                -74.65736264106818,
                                40.65567800810095
                            ],
                            ...
                            [
                                -73.28063199587632,
                                40.849302200134844
                            ]
                        ]
                    ]
                ]
            },
            "properties": {
                "search_id": "Example"
            }
        }
    ]
}

5. Error handling
Copy link

Both the TravelTime API and the Google API use standard http status codes, such as 401 Unauthorized and 500 Internal Server Error.

The table below details the main differences in the structures of the error response for each service.

Google APITravelTime API
StructureNested error objectNested additional_info
HTTP status codeIncluded in JSON body (code)Included in JSON body
Root elementserror
(containing code
message
status)
http_status
error_code
description
documentation_link
additional_info

Error message examples
Copy link

The response examples below show the error response for an invalid query.

Google API Response:
Copy link

{
    "error": {
        "code": 400,
        "message": "Travel duration must be positive.",
        "status": "INVALID_ARGUMENT"
    }
}

TravelTime API Response:
Copy link

{
   "http_status": 422,
   "error_code": 2,
   "description": "Invalid request json",
   "documentation_link": "https://docs.traveltime.com/reference/error-codes",
   "additional_info": {
       "obj.arrival_searches.one_to_many[0].transportation.type": [
           "Path missing"
       ]
   }
}

6. Next steps
Copy link

If you are looking to migrate from using the Google Isochrones API to TravelTime, you’ll need to first sign up for an API key.

Sign up

To help you get up and running, check out some of the links to more resources below.