Quickstart
Copy link

This guide shows you how to get an API key and make your first two requests. The first finds the places near a point, and the second shows what data the API has for a country.

1. Get an API key
Copy link

Sign up for a TravelTime account. Your application id and API key are on your account dashboard. You use the same pair for both the TravelTime API and the Data API. The rate limits are listed in the limits table.

Lost or leaked key

Create a new key on your account dashboard, switch your requests to it, then delete the old one.

2. Set your key
Copy link

Send your application id and key in two headers with every request. When you are logged in, the examples in these docs include your credentials.

Headers

X-Application-Id: YOUR_APP_ID
X-Api-Key: YOUR_APP_KEY

3. Find places near a point
Copy link

GET /v1/places returns the places within a radius of a coordinate, nearest first. This request returns the places listed as cafés within 300 m of King's Cross. The category field on each row is the place's main category.

Request

curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
  "https://data.traveltimeapp.com/v1/places?near=51.5307,-0.1238&radius_m=300&category=cafe"
200 · 42 places

42 pins inside the 300 m circle; a pin opens its row.

How to read the response:

  • name, category and brand describe the place. verified is true when a government register confirms it.
  • cell is the resolution 9 H3 cell that contains the place. Every dataset uses the same grid, so you can use one cell id with all of them.
  • distance_m is the distance from your coordinate in metres, and results are nearest first. To get the next 100 results, pass next_cursor back as cursor. When next_cursor is null, you have all the results.
  • A 401 means the application id or key is missing or wrong. Check the X-Application-Id and X-Api-Key headers.

4. See what data is available
Copy link

GET /v1/catalog/{country} lists what is available for one country. It returns every dataset with its routes, fields, number of records and update date, as well as the country's boundary types, transport modes and operators.

Request

curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
  "https://data.traveltimeapp.com/v1/catalog/gb"
200 · 10 results
RoutesroutesResolutionsresolutionsFieldsfieldsCountries gb availablecountries.gb.available
/places, /places/{id}, /places/cells6, 7, 8 +2id, name, category +21available
/transport/transit/stations, /transport/transit/stations/{id}, /transport/transit/stations/cells6, 7, 8 +2id, name, modes +11available
/transport/transit/lines, /transport/transit/lines/{id}, /transport/transit/lines/cells6, 7, 8 +2id, name, operator.id +9available
/transport/roads, /transport/roads/{id}—id, name, ref +3available
/transport/roads/access, /transport/roads/access/{id}—id, type, road.id +7available

5 of 10 shown · the other 5 are in the response

Next steps
Copy link