Minotor is an open-source transit routing library for the browser, nodejs servers and react-native apps. It supports extended GTFS feeds parsing, complex routing queries, geographic and textual stops search. Unlike most transit planners out there, minotor can store all the transit data for a given day in memory on the client, allowing for fast runtime queries using only local data.
# Examples
An example client-side transit router running in the browser with a web worker. It uses the full data from the Swiss GTFS feed for a day (Monday May 27th 2025) from opentransportdata.swiss , loaded in memory (thus works offline too). Check out the code from this example.
# Get started
# Installation
for CLI usage install globally (see CLI Usage below):
# Data sources
opentransportdata.swiss provides a GTFS feed for Switzerland that is supported by the library.
GTFS feeds from other providers and other regions can be used as well but are not officially supported yet.
# GTFS Feed parsing
Parse the swiss GTFS feed for the current day:
Note that this operation can take a few minutes for large GTFS feeds and requires a Node.js environment.
timetable and stopsIndex are binary protobufs that can be serialized and loaded (e.g. from the browser) for later use.
# Stop Search
Lookup stops by name:
Partial and fuzzy matches are also supported:
Query stops by ID:
Or by location (e.g. find the 5 closest stops within 500m):
# Routing
Build the routing graph according to the parameters in the query:
Get the route between origin and the closest destination (optionally provide another destination stop than the one in the query, the resulting route will be found if it's reachable before the first query destination reached).
Get the arrival time to any stop (optionally provide the max number of transfers if you're interested in a lower one than the one provided in the query). This time will be correct for any stop reachable before the first query destination reached.
# CLI Usage
A simple CLI is provided to parse GTFS feeds and query the router interactively.
Parse GTFS data for a day and output the timetable and stops index, using the swiss GTFS profile (minotor parse-gtfs -h for more options):
Note that this operation can take a few minutes for very large GTFS feeds. Without extra parameters it saves the timetable and stopsIndex for the current day in /tmp as binary protobufs.
Run the REPL to query the router or the stop index (minotor repl -h for more options):
Search stops (minotor> .find -h for more options):
Query routes (minotor> .route -h for more options):
# Routing algorithm
Minotor routing algorithm is mostly based on RAPTOR. See Round-Based Public Transit Routing, D. Delling et al. 2012.