- Offer upcoming shifts to the best matched workers based on who can get to the shift in time
- Use travel times to help facilities find the best available workers to cover a shift in the case of a no-show
- Improve the matching of workers and shifts to drive up fill rates
- Only offer shifts to workers that fit within their commute preferences to reduce late withdrawals
- Increase the fill rate of late withdrawals and no shows to drive up overall fulfillment rates
Reduced poor matches by 18%
Increased quality connection rate by 12%
Reduced late withdrawals by 3x

Grisha Ghukasyan
VP of Engineering at Brigad
“In order to improve our financial benefits, we had to improve the connection rate...all the missions that we don't connect are lost - and we don't make any money on it.
Until we started working with TravelTime, all we showed was kilometres and straight-line distance, and it was making people leave the app.”
Request type | POST |
Host | api.traveltimeapp.com |
Endpoint | /v4/time-filter |
Authentication | Application-Id Api-Key |
{
"locations": [
{
"id": "Shift Location",
"coords": {
"lat": 54.2389,
"lng": -0.3975
}
},
{
"id": "Worker 1",
"coords": {
"lat": 54.2442,
"lng": -0.4075
}
},
{
"id": "Worker 2",
"coords": {
"lat": 5.2483,
"lng": -0.4349
}
},
.
.
.
{
"id": "Worker 2,000",
"coords": {
"lat": 53.9923,
"lng": -0.5134
}
}
],
"arrival_searches": [
{
"id": "Shift Lottery",
"arrival_location_id": "Shift Location",
"departure_location_ids": [
"Worker 1",
"Worker 2",
.
.
.
"Worker 2,000"
],
"arrival_time": "2024-10-01T19:00:00",
"travel_time": 14400,
"transportation": {
"type": "driving"
},
"properties": [
"travel_time"
]
}
]
}
locations - an array containing the IDs and lat-long coordinates of the worker's home location and all of the shifts. This can include up to 2,000 shifts, but could be pre-filtered using other relevant parameters if desired
arrival_searches - travel times are calculated departing from the relevant workers' home locations, travelling to the shift location
arrival_time - the desired arrival time at the shift, taking into account the shift start time
travel_time - used to filter workers into just those within a chosen max travel time
transportation - one mode of transport per search - include multiple searches within the one request to calculate the travel times for multiple modes
properties - the data point(s) to be calculated for each listing - typically just travel_time, but distance can also be used if required
{
"results": [
{
"search_id": "Shift Lottery",
"locations": [
{
"id": "Worker 1",
"properties": [
{
"travel_time": 249
}
]
},
{
"id": "Worker 2,000",
"properties": [
{
"travel_time": 2903
}
]
}
.
.
.
],
"unreachable": [
"Worker 2"
]
}
]
}
locations - Reachable workers based on the maximum travel time used in the request
unreachable - Any workers that fall outside of the maximum travel time
npm i traveltime-api
This package comes with TypeScript support.
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',
});
travelTimeClient.timeFilter({
"locations": [
{
"id": "Shift Location",
"coords": {
"lat": 54.2389,
"lng": -0.3975
}
},
{
"id": "Worker 1",
"coords": {
"lat": 54.2442,
"lng": -0.4075
}
},
{
"id": "Worker 2",
"coords": {
"lat": 5.2483,
"lng": -0.4349
}
},
.
.
.
{
"id": "Worker 2,000",
"coords": {
"lat": 53.9923,
"lng": -0.5134
}
}
],
"departure_searches": [
{
"id": "Shift Lottery",
"departure_location_id": "Shift Location",
"arrival_location_ids": [
"Worker 1",
"Worker 2",
.
.
.
"Worker 2,000"
],
"departure_time": "2024-10-01T19:00:00",
"travel_time": 14400,
"transportation": {
"type": "driving"
},
"properties": [
"travel_time"
]
}
]
}).then((data) => console.log(data))
.catch((e) => console.error(e));
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.
pip3 install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install traveltimepy
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install traveltimepy
In order to authenticate with Travel Time API, you will have to supply the Application Id and Api Key.
- 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")
import asyncio
from traveltimepy import Location, Coordinates, Driving, Property, TravelTimeSdk
async def main():
sdk = TravelTimeSdk("YOUR_APP_ID", "YOUR_APP_KEY")
locations = [
Location(id="Shift Location", coords=Coordinates(lat=54.2389, lng=-0.3975)),
Location(id="Worker 1", coords=Coordinates(lat=54.2442, lng=-0.4075)),
Location(id="Worker 2", coords=Coordinates(lat=54.2483, lng=-0.4349)),
Location(id="Worker 3", coords=Coordinates(lat=53.9923, lng=-0.3134)),
.
.
.
Location(id="Worker 2,000", coords=Coordinates(lat=53.9923, lng=-0.5134))
]
results = await sdk.time_filter_async(
locations=locations,
search_ids={
"Shift Location": [
"Worker 1",
"Worker 2",
"Worker 3",
.
.
.
"Worker 2,000"
],
},
departure_time="2024-10-01T19:00:00",
travel_time=14400,
transportation=Driving(),
properties=[Property.TRAVEL_TIME],
)
print(results)
asyncio.run(main())
What is the performance like?
The Travel Time Matrix Fast endpoint can calculate 100,000 travel times in under 150ms.
How accurate is your data?
How reliable is the service?
Where do you have coverage?
How much will this cost?
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.