/v4/time-filterJSON APICreate a distance matrix with the travel times and distances between thousands of locations in one go.
Supports two HTTP request types:
- GET - for simple requests using basic parameters only
- POST - for more complex requests using advanced parameters
With both request types, to create a many-to-many matrix you will need to use multiple searches.
For example given three points A, B, C you would need three arrival searches - one for each point.
- A -> { B, C }
- B -> { A, C }
- C -> { A, B }
Access URL: https://api.traveltimeapp.com/v4/time-filter
A POST request should be used for any of the following use cases:
- Using advanced parameters not available in the GET request
- Calculating a many-to-many matrix
The access URL is the same as the GET request format, but the differences are:
- Authentication is included in the request Headers
- Parameters are included in the request Body
Access URL: https://api.traveltimeapp.com/v4/time-filter
Define your locations to use later in departure_searches or arrival_searches.
Searches based on a departure time. Leave the departure location no earlier than the given time.
Specify a single departure location and multiple arrival locations in each search (one-to-many).
You can define a maximum of 10 searches per request.
Used to identify each search in the results array. Must be unique among all searches.
The id of the location to depart from. Must reference an id from the locations array.
The ids of the locations to arrive at. Must reference ids from the locations array.
You can define a maximum of 2000 location ids.
Leave departure location at no earlier than given time. In ISO 8601 format. For example:
2026-03-19T11:00:00Z (representing UTC)
2026-03-19T11:00:00-05:00 (representing New York on Standard Time: UTC-05:00)
Maximum journey time (in seconds). Maximum value is 14400 (4 hours) as standard. To discuss increasing this, please contact hello@traveltime.com.
Properties to be returned for each arrival location. Possible values:
travel_time,
route,
distance (driving, walking and cycling modes only),
distance_breakdown (driving, walking and cycling modes only),
fares (UK only. public_transport, coach, bus, train, driving+train and driving+public_transport modes only)
Transportation mode and related parameters. type is a mandatory field, but all other fields are optional and default values are used if not specified.
When enabled, range adds a departure window to the departure time, and results are returned for any journeys that depart during this window.
In the results array, the properties of these multiple alternative results are sorted by travel_time in ascending order.
Disabled by default.
Used in public_transport, coach, bus, train, driving+train, driving+public_transport and cycling+public_transport transportation modes. For other modes range search parameters are ignored.
Adjusts the process of looking up the nearest roads from the departure / arrival points.
Searches based on an arrival time. Arrive at the location no earlier than the given time.
Specify multiple departure locations and one arrival location in each search (many-to-one).
You can define a maximum of 10 searches per request.
The results array which is sorted lexicographically by the id attribute.
Properties array. May contain multiple elements if range was specified, single element otherwise. Sorted by travel_time. Only the properties included in the request are returned
Travel time in seconds.
Distance in meters.
Distance breakdown, shows how much distance was covered by car, bus, etc.
Array of unreachable locations
LoadingLoadingA GET request is the simplest way to calculate a travel time matrix. A single calculation with limited parameters can be done by specifying the query parameters in the URL.
Mode of transport used.
Available options: walking, public_transport, driving, cycling.
If specified, this time will be used as the time of departure from the search location. One of departure_time or arrival_time must be specified.
If specified, this time will be used the time of arrival at the search location. One of arrival_time or departure_time must be specified.
Latitude of the search.
Longitude of the search.
The coordinates of the locations. Multiple locations should be listed in the format lat1_lng1,lat2_lng2,lat3_lng3,lat4_lng4 etc.
For example: 51.1234_0.1234,50.0000_-1.0000,52.0000_1.0000
Maximum number of locations is 2,000
Used for authenticating the request. Visit our developer portal to access your credentials or generate new ones.
Used for authenticating the request. Visit our developer portal to access your credentials or generate new ones.
Successful requests will return an HTTP 200 response.
Response schema - application/json
The results array which is sorted lexicographically by the id attribute.
The properties array containing the travel time.
Travel time in seconds.
Array of unreachable locations. A location will be unreachable if either of the following is true:
- The required travel time is greater than 2 hours.
- The location is in an inaccessible location (e.g on a body of water, or in an extremely remote area).
- The location is more than 15 minutes walk from the nearest public transport stop/station (public transport mode only).
Request
https://api.traveltimeapp.com/v4/time-filter?type=public_transport&arrival_time=2026-03-19T12:00:00Z&search_lat=51.41070&search_lng=-0.15540&locations=51.45974_-0.16531,51.41494_-0.12492,51.41074_-0.21531,51.42942_-0.23343&app_id=YOUR_APP_ID&api_key=YOUR_APP_KEYPlease note that to send the GET request you will need to replace the YOUR_APP_ID and YOUR_APP_KEY values with your own credentials.
Request
LoadingResponse
Loading