Routing API provides a way to plan itineraries and query public transportation related information about stops and timetables using GraphQL.
If you are not familiar with GraphQL, start by reading the GraphQL page.
It is also recommended to try building queries and exploring the schema in GraphiQL.
Real-time information page has information about the real-time data available in the API.
Glossary page has explanations for terms commonly used in the API.
Translations page explains how to fetch translated texts from the API.
After this, you are ready to run queries for routes, stops, bicycles, e-scooters and cars, disruption info, canceled trips and do itinerary planning.
https://api.digitransit.fi/routing/v2/hsl/gtfs/v1
https://api.digitransit.fi/routing/v2/waltti/gtfs/v1
https://api.digitransit.fi/routing/v2/finland/gtfs/v1
https://api.digitransit.fi/routing/v2/varely/gtfs/v1
When sending queries, there are some things you should be aware of:
Avoid using deprecated queries, parameters or fields as it is not guaranteed they will return sensible information forever or they might be in a really experimental state.
GraphiQL can be used to identify deprecated entities from the GraphQL schema as it shows in the documentation which things are deprecated and warns about them if you try to use them in a query.
Term | Explanation |
---|---|
GraphQL | A query language for APIs and a runtime for fulfilling those queries with your existing data. |
GraphiQL | A simple UI for making GraphQL queries. You can use it both to run queries and to explore the GraphQL schema. |