I built my own CityMapper
11 comments
·October 27, 2025aaronbrethorst
aaronbrethorst
and if you want to get involved, join our Slack https://join.slack.com/t/onebusaway/shared_invite/zt-32w08cz... or just shoot me an email! aaron@onebusaway.org
danielhep
I am involved with the OpenTripPlanner project, which is a Java trip planning application that also uses the RAPTOR algorithm! It’s used in cities all over the world, with the biggest deployment being ENTUR’s in Norway, which covers the entire country. I believe all trip planning apps in Norway use this deployment.
It supports many features and has a very active developer community.
denysvitali
During university, we've built OptiTravel (https://github.com/denysvitali/optitravel) to do something similar. We couldn't use Google Maps APIs (project requirement), so we wrote a custom routing algorithm based on A* and I've created a Rust server to host GTFS data (https://github.com/denysvitali/gtfs-server) à la Transitland (https://transit.land/).
Performance wasn't great since everything had to run locally and do network roundtrips, but it found routes in my hometown that Google Maps didn't show. Pretty cool discovering hidden connections in the transit network and being able to customize your own params (https://github.com/denysvitali/optitravel/blob/master/src/ma...)
mwagstaff
Very nice! I've also used the Rail Data Marketplace (terrible name) to build an app that uses the live departure board data (https://apps.apple.com/gb/app/traintrack-uk/id6504205950), and it's great the data is freely available.
Whilst HN is on the case, does anyone know of an API (inside Rail Data Marketplace or elsewhere) that acts as a journey planner for UK national rail, i.e. you can input source + destination stations and it will output journey options?
ashfn
It looks like TFL's journey planner API has the ability to do some of these national rail trips, only tested a few though
mwagstaff
Unfortunately, I believe it's limited to TfL stations only (e.g. Overground) rather than National Rail.
Oh, and I should have mentioned that I'm also aware of this, but it's not free so automatically outside of my app development budget. :/
https://www.nationalrail.co.uk/developers/online-journey-pla...
ashfn
I tried a route from a London tube station to Newcastle train station and it found one on the frontend for the tool so I think it may support national rail
idlemind
Check out api.tfl.gov.uk which should have everything you need for London in a more structured format.
ashfn
I used this exact API extensively for both buses and tubes :)
milliams
Why are the table and the description of the RAPTOR algorithm in the article images rather than text?
Before Citymapper existed, there was OneBusAway, a Ph.D. student project at the University of Washington.
It still exists and powers millions of transit rider trips every day all around the world in Seattle, Washington DC, New York City, Poznan Poland, Buenos Aires Argentina, Adelaide Australia, and who knows where else.
If you’re interested in hacking on something like Citymapper, or setting up an OBA server for your own city, you can find everything you need on our GitHub organization: https://github.com/OneBusAway
That includes docker images, an iOS app and a trip planner framework, android app, Sveltekit web app, and even a next generation OBA server written in Go.
As far as the data to power this, you can get GTFS for every US transit agency from https://mobilitydatabase.org/
(nb I’ve been involved in the OBA project since 2012)