Routing API

Routing API enables developers to query routes and timetable related information using either REST or GraphQL interfaces.

edit architecture image

Service Architecture

Routing API is implemented using OpenTripPlanner.

Static and realtime information

OpenTripPlanner APIs provide access to static and realtime routing and transit information. Routing and timetable data is based on static GTFS and it is enriched by realtime information for those departures that have realtime information available. This means that results returned by OpenTripPlanner always contain realtime information should it be available.

Hosting the API locally

If you need to make large amount of requests (e.g. requesting schedules from all stops) to the API, you might want to host the API locally. To run OpenTripPlanner with Docker, use command:

docker run --rm --name otp-hsl -p 9080:8080 -e ROUTER_NAME=hsl -e JAVA_OPTS=-Xmx5g -e ROUTER_DATA_CONTAINER_URL= hsldevcom/opentripplanner

After OpenTripPlanner has built the routing graph, the API can be accessed from http://localhost:9080/otp/routers/hsl/index/graphql

API Documentation


REST interface is provided as it is available in OpenTripPlanner. First thing to do is to familiarize yourself with OpenTripPlanner documentation:

OpenTripPlanner requires developers to make API requests through routers. Digitransit providers routers for Helsinki region, the Waltti regions and entire Finland:

Region Router URL
Helsinki region
Waltti regions
Entire Finland


GraphQL API is built by us. Similarly to REST, GraphQL has different router endpoints for Helsinki region, the Waltti regions and entire Finland.

For more details about the GraphQL you can go to our GraphQL page

Introspection query

You can get access to GraphQL schema by running this example in GraphQL console

URL Project description OpenTripPlanner upstream development on GitHub!forum/opentripplanner-dev OpenTripPlanner forum for developers!forum/opentripplanner-users OpenTripPlanner forum for end users OneBusAway: The Open Source platform for Real Time Transit Info✓&query=gtfs GTFS related projects: Open-source transit app for real-time information Google developers transit community: Making public transit data universally accessible Conveyal R5 development on GitHub: Rapid Realistic Routing on Real-world and Reimagined networks Conveyal blog

Docker image

The resulting Docker image is called hsldevcom/opentripplanner and it is available at DockerHub. The image can be built using this build script.

To run Docker container, run:

docker run -e OTP_DATA_CONTAINER_URL=http://otp-data-container:8080 -p 8080:8080 hsldevcom/opentripplanner

To access Docker container:


For More information about how to use Docker see docker info.