/
Data API
/
Data API

For developers and location teams

Data API

Pick a location, a transport mode and a travel time to build a reachable catchment area. Build a profile of the area: places within reach, open space, flood risk and more.

About Data API

What is the TravelTime Data API demo?

TravelTime's Data API demo shows how location and site selection teams can profile any place by what is really within reach of it.

Enter an address, choose how people travel and how long they will go, and the demo maps the catchment. Switch between layers to see the places, transport, open space, neighbourhood and people in reach, or set your own rules to see how different location data layers work together.

Five location data categories

Return every location characteristic over the same area, with one call per category.

  • Places

    Shops, cafés, schools and brands in reach, by category.

  • Transport

    Stations and stops, and road access where it is served.

  • Open spaces

    Parks and green space within the journey.

  • Neighbourhood

    Noise, air, flood risk, crime and broadband.

  • People

    Who lives in reach, hexagon by hexagon.

Layer real journey calculations with location data

TravelTime allows users to calculate real-world catchment areas and layer in our location datasets. Instead of drawing a radius, the catchment is the area someone can actually reach in the time you set, by walking, cycling, driving or public transport.

The Data API then returns what is inside that area, hexagon by hexagon: places, transport, open space, the neighbourhood and who lives there. Use it to profile a site, compare locations or find the best area for your audience.

Custom location discovery, scoring and analysis

Set your own rules to discover, qualify and rank locations. For example, request areas that have a supermarket within a ten-minute walk or noise under 55 dB, and the Data API scores every hexagon against your criteria. Mark which factors are a must-have, to support better location analysis.

How the Data API demo was built

  1. Finds the starting locationGeocoding
  2. Maps everywhere reachable from the starting location within your time limit, using your chosen transport modeH3
  3. Asks for the location data in those reachable hexagons, one family per layer: places, transport, open spaces, neighbourhood and peopleData API
  4. Builds a profile of the area, from the number of places to the transport stops in reach, ready to feed into your own scoringData API

JavaScript

import { TravelTimeClient } from 'traveltime-api'

const { TRAVELTIME_APP_ID: applicationId, TRAVELTIME_API_KEY: apiKey } = process.env

// Every place 45 minutes by public transport from King's Cross Station, counted by category
// and group: the Places layer the demo opens on
const response = await fetch('https://data.traveltimeapp.com/v1/places/cells', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Application-Id': applicationId,
    'X-Api-Key': apiKey,
  },
  body: JSON.stringify({
    cells: await reach(),
    group_by: 'all',
    include: 'categories,groups',
  }),
})
const [{ count, category_counts, group_counts }] = (await response.json()).results

// The hexagons it counts over: everywhere 45 minutes from King's Cross, from the TravelTime API
async function reach() {
  const client = new TravelTimeClient({ applicationId, apiKey })
  const { results } = await client.h3Fast({
    resolution: 9,
    properties: ['min'],
    arrival_searches: {
      one_to_many: [
        { id: 'origin', coords: { lat: 51.5307, lng: -0.1238 },
          transportation: { type: 'public_transport' },
          arrival_time_period: 'weekday_morning', travel_time: 2700 },
      ],
    },
  })
  return results[0].cells.map((cell) => cell.id)
}

The same calls from your own code: the reach with the official SDK, the data from the Data API over HTTPS. Read the docs

Data API coverage

Most layers answer in Great Britain, the United States, France, Spain, the Netherlands and Australia. Road access is Great Britain and the US only, and the demo says so where a layer is not served.

Data API coverage · Data API docs

Next demo appAnywhereLet people ask for a place to live, or a place to hire, in plain English, and answer on a map.

Get started with TravelTime

Build without compromise. Get started with the leading location API today.