Hacking public transport APIs - written by NiXijav on 2018-09-24
Living in Santiago de Compostela or Vigo? Then this post is for you.
If you're usually using public transport, it's useful knowing when your bus is going to arrive. For this reason, I've created a website and a telegram bot.
For Santiago's public transport there are two options. The first one, buscq.com. Aimed for desktop devices, you'll be able to select your desired stop inside each bus line. Currently, it doesn't support searching. You have to know where you're going!
Buscq.com main menu
You also have @buscq_bot on Telegram. It only has one command, /parada. As a parameter, either the stop number or stop name are accepted.
Search by stop ID
Search by stop name
If your name search yields more than a result, a disambiguation message will be shown.
Disambiguation dialog
If you don't know where you are, you can send your current location, and the 10 nearest stops will be returned. You can then use /parada with the name or id.
On the other hand, if you're living in Vigo, there is @vitrasa_bot, also on Telegram. It works just like the Santiago one, but with Vigo data (obviously). It'll return 15 results instead of 10 in disambiguations and nearest stops
Fun fact: there are 580 bus stops in Santiago and 1192 in Vigo.
Source code for buscq and buscq_bot is available here, under the GPLv3Source code for vitrasa_bot is available here, also under the GPLv3
No comments yet
Leave a comment