Build a route map from the transport API

Draw direct links between places or turn a dated journey's stop calls into GeoJSON.

For a network map, query /v1/places for markers, or start at one place and query /v1/destinations for outgoing links. Use bbox=west,south,east,north to limit the marker query to your viewport. A bounding box filters places, not routes. Page through results before treating a map as complete for that query.

To draw an itinerary instead, make one line per leg. Ground calls include stored stops between boarding and alighting. For flights, and any leg without at least two calls, join the endpoints. This draws approximate lines. The API doesn’t supply track geometry, flight paths or walking directions. Use GeoJSON’s longitude-first coordinate order.

With the quickstart environment variables and jq, map the first Cologne to Tokyo option in the dated journey example:

curl -fsS --get "$TRIP_TOPOLOGY_URL/v1/journeys" \
  -H "Authorization: Bearer $TRIP_TOPOLOGY_KEY" \
  --data-urlencode 'from=geonames:2886242' \
  --data-urlencode 'to=geonames:1850147' \
  --data-urlencode 'date=2026-12-03' \
  --data-urlencode 'depart_after=11:00' \
  --data-urlencode 'depart_before=11:30' \
  --data-urlencode 'limit=1' |
  jq '{
    type: "FeatureCollection",
    features: [(.data[0].legs // [])[] | {
      type: "Feature",
      properties: {mode, label},
      geometry: {
        type: "LineString",
        coordinates: ((if (.calls | length) >= 2 then .calls else [.from, .to] end)
          | map([.longitude, .latitude]))
      }
    }]
  }' > journey.geojson

The rail feature’s geometry includes the intermediate call at Siegburg:

{
  "type": "LineString",
  "coordinates": [
    [6.958729, 50.94303],
    [7.203026, 50.793915],
    [8.57014, 50.053196]
  ]
}

The other feature connects Frankfurt Airport to Haneda. Color by properties.mode. The flight line ends at HND; it does not include ground access to Tokyo.