Contents
Documentation
Interline Routing Platform
Last updated
Available onExplorerPay As You GoHobbyist/AcademicEnterprisePlans and pricing
The Interline Routing Platform combines two complementary routing engines behind one API and one key.
- Transit routing comes from the Transitland Routing API, built on the platform's continuously updated archive of GTFS feeds.
- Street routing (auto, bicycle, and pedestrian) comes from Valhalla, an open-source engine running against OpenStreetMap data.
Together they cover a whole journey: walking, cycling, or driving to a stop, riding transit, and walking to a destination.
Transit itinerary legs include Onestop IDs that resolve through the REST and GraphQL APIs, and the SHA1 of the feed version the schedule came from. See Journeys and itineraries. For departures from a single stop, use the REST API stop departures endpoint.
Endpoints
| Endpoint | What it does |
|---|---|
| Transit routing | Transit and walking itineraries, OpenTripPlanner-compatible |
| Street routing | Turn-by-turn directions for auto, bicycle, and pedestrian |
| Optimized route | Visit several locations in the most efficient order |
| Matrix | Times and distances between many origins and destinations |
| Isochrone | Areas reachable within a time or distance limit |
| Map matching | Snap a GPS trace to the road network as a route |
| Trace attributes | Road attributes along a matched trace |
| Locate | What the network looks like near a coordinate |
| Expansion | Which edges a search explored, as GeoJSON |
| Centroid | Where routes from several locations converge |
API access
All Interline Routing Platform endpoints are hosted under:
https://transit.land/api/v2/routing/
Authentication uses the same API key mechanism as other Transitland APIs. Pass your key as the apikey query parameter or the apikey HTTP header; api_key, api_token, and access_token are accepted equivalently.
Street routing endpoints accept the same request object either way: POST sends it as a JSON body, and GET sends it url-encoded in a json query parameter.
How the routing works
Two graphs back these endpoints: a street graph built from OpenStreetMap and rebuilt about daily, and a transit graph built from Transitland's GTFS archive and updated within minutes of a new feed version. Because the graphs are separate, transit routing is its own endpoint and its coverage differs from street routing.
Street routing endpoints take a costing parameter that selects the travel model (auto, bicycle, pedestrian, truck, and others). Costing options are set per request.
See Routing graph and costing models for the costing table, and Journeys and itineraries for transit routing results.
Machine-readable schema
The platform publishes an OpenAPI 3.0 description covering both engines:
https://transit.land/api/v2/routing/openapi.json
Every endpoint page in this section is generated from that document. API clients, code generators, and coding agents can use the URL directly.
The street routing endpoints are also described on their own, for tools that want them alone:
https://transit.land/api/v2/routing/valhalla/openapi.json