Open dotlambda opened 8 years ago
Sure, if an API is available! Some long distance buses are in the DB system, but not the more interesting ones (e.g. Mein Fernbus, Flix...)
One problem with buses is that they're reservation only. So if a bus is full, what should happen for departure and trip queries? I guess an API, public-transport-enabler and the apps using pte would need to separate usecases by people who don't already have a ticket/reservation and people who do. The same would be needed for flights by the way.
I'm not sure about other providers, but there are some long-distance buses included in the Texas provider.
I think that the main obstacle to getting this to work is the lack of APIs, since (at least in the US) most long-distance buses are run by private companies, while city metros are run by city agencies. Private companies are probably more reluctant to release a public API.
@juliuste has covered some European long-distance bus providers using JavaScript, but I'm not sure if the clients are up to date.
deinbus
– JavaScript client for the deinbus coach travel API.ecolines
– JavaScript client for the Ecolines API.eurolines-de
– JavaScript client for the eurolines.de API.meinfernbus
– JavaScript client for the Meinfernbus/FlixBus API.nettbuss-stations
– A list of Nettbuss.se stations.ouibus
– JavaScript client for the OUIBUS API.Disclaimer: eurolines-de
is not an API client but rather a scraper. The other three I made (ouibus, deinbus, flixbus/meinfernbus) use API endpoints and should be up to date, though.
I don't know about the rest of the world, but here in Germany long distance buses (Fernbusse) are getting more and more important. Sadly, I don't know of any bus company that has a publicly available API. But this can be changed if we convince them that a public API is worth the effort. What do you think about adding long distance buses?