TravelTime Docs logo
TravelTime API
ArcGIS plugin
QGIS plugin
Alteryx plugin

Travel Time Matrix (Fast)anchor icon

A very fast version of Time Filter. However, the request parameters are much more limited. Currently only supports UK and Ireland.

Request Bodyanchor icon

array[object]

Define your locations to use later in arrival_searches.

Hide child attributes

You will have to reference this id in your searches. It will also be used in the response body. Must be unique among all locations.

The coordinates of the locations.

Show child attributes

Latitude.

Longitude.

Searches based on arrival time. Arrive at a destination or multiple destinations at no later than given time.

Hide child attributes

This allows you to specify a single arrival location and multiple departure locations. You can define a maximum of 10 searches.

Show child attributes

Used to identify each search in the results array. Must be unique among all searches.

The id of the location we should arrive to. Must reference an id from locations array.

The id of the location we should arrive to. Must reference an id from locations array.

Show child attributes

Possible values: public_transport, driving, driving+public_transport, driving+ferry, cycling, cycling+ferry, walking, walking+ferry

Maximum journey time (in seconds).
Maximum value is 14400 (4 hours) as standard. To discuss increasing this, please contact sales@traveltime.com.

Possible values: weekday_morning

Properties to be returned about the points. Possible values: travel_time, fares

This allows you to specify a single arrival location and multiple departure locations. You can define a maximum of 10 searches.

Show child attributes

Used to identify each search in the results array. Must be unique among all searches.

The id of the location we should arrive to. Must reference an id from locations array.

The id of the location we should arrive to. Must reference an id from locations array.

Show child attributes

Possible values: public_transport, driving, driving+public_transport, driving+ferry, cycling, cycling+ferry, walking, walking+ferry

Maximum journey time (in seconds).
Maximum value is 14400 (4 hours) as standard. To discuss increasing this, please contact sales@traveltime.com.

Possible values: weekday_morning

Properties to be returned about the points. Possible values: travel_time, fares

Response Bodyanchor icon

array[object]

The results array which is sorted lexicographically by the id attribute

Hide child attributes

array[object]

Show child attributes

Only the properties included in the request are returned here.

Show child attributes

Travel time in seconds.

array[string]

Ids of locations that cannot be reached within the specified travel_time.

Examplesanchor icon

Requestanchor icon

POST /v4/time-filter/fast HTTP/1.1
Host: api.traveltimeapp.com
Content-Type: application/json
X-Application-Id: ...
X-Api-Key: ...

{
  "locations": [
    {
      "id": "London center",
      "coords": {
        "lat": 51.508930,
        "lng": -0.131387
      }
    },
    {
      "id": "Hyde Park",
      "coords": {
        "lat": 51.508824,
        "lng": -0.167093
      }
    },
    {
      "id": "ZSL London Zoo",
      "coords": {
        "lat": 51.536067,
        "lng": -0.153596
      }
    }
  ],
  "arrival_searches": {
    "many_to_one": [
      {
        "id": "arrive-at many-to-one search example",
        "departure_location_ids": [
          "Hyde Park",
          "ZSL London Zoo"
        ],
        "arrival_location_id": "London center",
        "transportation": {
          "type": "public_transport"
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 1900,
        "properties": [
          "travel_time",
          "fares"
        ]
      }
    ],
    "one_to_many": [
      {
        "id": "arrive-at one-to-many search example",
        "arrival_location_ids": [
          "Hyde Park",
          "ZSL London Zoo"
        ],
        "departure_location_id": "London center",
        "transportation": {
          "type": "public_transport"
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 1900,
        "properties": [
          "travel_time",
          "fares"
        ]
      }
    ]
  }
}

Response Bodyanchor icon

{
  "results": [
    {
      "search_id": "arrive-at many-to-one search example",
      "locations": [
        {
          "id": "Hyde Park",
          "properties": {
            "travel_time": 1404,
            "fares": {
              "tickets_total": [
                {
                  "type": "month",
                  "price": 80.7,
                  "currency": "GBP"
                },
                {
                  "type": "year",
                  "price": 840,
                  "currency": "GBP"
                }
              ]
            }
          }
        }
      ],
      "unreachable": [
        "ZSL London Zoo"
      ]
    },
    {
      "search_id": "arrive-at one-to-many search example",
      "locations": [
        {
          "id": "Hyde Park",
          "properties": {
            "travel_time": 1529,
            "fares": {
              "tickets_total": [
                {
                  "type": "month",
                  "price": 80.7,
                  "currency": "GBP"
                },
                {
                  "type": "year",
                  "price": 840,
                  "currency": "GBP"
                }
              ]
            }
          }
        }
      ],
      "unreachable": [
        "ZSL London Zoo"
      ]
    }
  ]
}

Example Request

POST /v4/time-filter/fast HTTP/1.1
Host: api.traveltimeapp.com
Content-Type: application/json
X-Application-Id: ...
X-Api-Key: ...

{
  "locations": [
    {
      "id": "London center",
      "coords": {
        "lat": 51.508930,
        "lng": -0.131387
      }
    },
    {
      "id": "Hyde Park",
      "coords": {
        "lat": 51.508824,
        "lng": -0.167093
      }
    },
    {
      "id": "ZSL London Zoo",
      "coords": {
        "lat": 51.536067,
        "lng": -0.153596
      }
    }
  ],
  "arrival_searches": {
    "many_to_one": [
      {
        "id": "arrive-at many-to-one search example",
        "departure_location_ids": [
          "Hyde Park",
          "ZSL London Zoo"
        ],
        "arrival_location_id": "London center",
        "transportation": {
          "type": "public_transport"
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 1900,
        "properties": [
          "travel_time",
          "fares"
        ]
      }
    ],
    "one_to_many": [
      {
        "id": "arrive-at one-to-many search example",
        "arrival_location_ids": [
          "Hyde Park",
          "ZSL London Zoo"
        ],
        "departure_location_id": "London center",
        "transportation": {
          "type": "public_transport"
        },
        "arrival_time_period": "weekday_morning",
        "travel_time": 1900,
        "properties": [
          "travel_time",
          "fares"
        ]
      }
    ]
  }
}

Response Body

{
  "results": [
    {
      "search_id": "arrive-at many-to-one search example",
      "locations": [
        {
          "id": "Hyde Park",
          "properties": {
            "travel_time": 1404,
            "fares": {
              "tickets_total": [
                {
                  "type": "month",
                  "price": 80.7,
                  "currency": "GBP"
                },
                {
                  "type": "year",
                  "price": 840,
                  "currency": "GBP"
                }
              ]
            }
          }
        }
      ],
      "unreachable": [
        "ZSL London Zoo"
      ]
    },
    {
      "search_id": "arrive-at one-to-many search example",
      "locations": [
        {
          "id": "Hyde Park",
          "properties": {
            "travel_time": 1529,
            "fares": {
              "tickets_total": [
                {
                  "type": "month",
                  "price": 80.7,
                  "currency": "GBP"
                },
                {
                  "type": "year",
                  "price": 840,
                  "currency": "GBP"
                }
              ]
            }
          }
        }
      ],
      "unreachable": [
        "ZSL London Zoo"
      ]
    }
  ]
}