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.
- 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
The table below covers the main features of the two services.
| Google API | TravelTime API | |
|---|---|---|
| Maximum isoline size | 1 hour (driving) 2 hours (walking, cycling) | 3 hours* |
| Sync / async | Synchronous | Synchronous |
| Rate limit | 600 requests per minute (per project) | Unlimited |
| Transport modes | Car, Pedestrian, Bicycle | Car, Pedestrian, Bicycle, Public Transit |
| Range types | Travel time | Travel time, Distance* |
| Arrival vs departure | Both (travelDirection: FROM / TO) | Both (one_to_many / many_to_one searches) |
| Time of day configuration | Traffic-unaware (default), or live traffic at the time of the request | Peak and Off Peak options |
| Response formats | GeoJSON | JSON GeoJSON WKT |
| Pricing | Usage based | Fixed price, unlimited usage |
| Endpoint playground | developers.google.com/maps/documentation/isochrones/demo | playground.traveltime.com/isochrones-fast |
| Support | Monthly fee + % of platform charges (for Enhanced support) | Included in all licences |
| Caching | Restricted | Permitted |
*Distance isolines are supported through a separate Distance Map endpoint
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.
| Google API | TravelTime API | |
|---|---|---|
| Base URL | isochrones.googleapis.com/v1/isochrones:generate | api.traveltimeapp.com/v4/time-map/fast |
| API version | Included in URL path (/v1) | Included in URL path (/v4) |
| Primary request type | POST | POST* |
*TravelTime API supports GET requests through the Time Map endpoint
| Google API | TravelTime API | |
|---|---|---|
| Authentication method | X-Goog-Api-Key header (or key query string, or OAuth token) | X-Application-Id and X-Api-Key headers |
| Required headers | Content-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 headers | N/A | Accept: application/geo+json(used to adjust the response format - e.g. geoJSON, JSON, or WKT) |
Both services use POST requests, with parameters included in a JSON request body.
| Google API | TravelTime API | |
|---|---|---|
| Batch support | Not supported (one isochrone per request) | Supported through an array of one-to-many or many-to-one searches |
| Arrival vs departure | travelDirection: FROM (departure) travelDirection: TO (arrival) | Determined by using either one_to_many or many_to_one search |
| Coordinate input | location: { latitude, longitude } or place: places/{place_id} | coords: { lat, lng } |
| Transport type | travelMode:DRIVE /WALK /BICYCLE | transportation: { type:driving+ferry /cycling+ferry /walking+ferry /public_transport} |
| Travel time configuration | travelDuration(in seconds, as a string with an s suffix - e.g. "3600s") | travel_time(in seconds) |
| Traffic configuration | routingPreference: TRAFFIC_UNAWARE(static travel times) routingPreference: TRAFFIC_AWARE(live traffic at the time of the request) | traffic_model: peak /off_peak |
| Shape granularity | Controlled 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) |
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.
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"
}'
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"
}
}
]
}
}'
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.
| Google API | TravelTime API | |
|---|---|---|
| Response formats | GeoJSON | JSON GeoJSON WKT |
| Top-level structure | An isochrone object containing a geoJson geometry object (MultiPolygon) | A GeoJSON FeatureCollection, with a search_id property to identify each search |
| Support for holes | GeoJSON - 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 polygons | GeoJSON - handled natively | JSON - handled by multiple shell arrays GeoJSON - handled natively WKT - handled natively |
| Coordinate order | [longitude, latitude] (RFC 7946) | [longitude, latitude] (RFC 7946) for GeoJSON responses |
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).
{
"isochrone": {
"geoJson": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-74.00688,
41.323584
],
[
-74.016671,
41.322901
],
...
]
]
]
}
}
}
{
"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"
}
}
]
}
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 API | TravelTime API | |
|---|---|---|
| Structure | Nested error object | Nested additional_info |
| HTTP status code | Included in JSON body (code) | Included in JSON body |
| Root elements | error(containing codemessagestatus) | http_statuserror_codedescriptiondocumentation_linkadditional_info |
The response examples below show the error response for an invalid query.
{
"error": {
"code": 400,
"message": "Travel duration must be positive.",
"status": "INVALID_ARGUMENT"
}
}
{
"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"
]
}
}
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 upTo help you get up and running, check out some of the links to more resources below.