But I do not know of any city where you buy an urban bus ticket ahead of time...and it seems you´re talking about urban buses.
For those visiting... in Barcelona, you can do so :) ....
I take this opportunity to simplify the range of options available in the city. If you're a tourist, you essentially have three choices:
- T-Casual: This option provides 10 trips and is valid until February of the following year after purchase. It can be used for the metro, tram, and bus within Zone 1 (Barcelona and its surroundings). However, it excludes the metro to/from the airport, Aerobus, and special services. It includes the Montjuïc funicular but not the Tibidabo funicular. This card is for individual use only (one traveller per card), and it costs €11.35 (as of 2023).
- T-Family: Similar to T-Casual, this card offers 8 trips and the same validity rules. The difference is that T-Family is multi-person, meaning different travellers can use it, deducting one trip per person at the ticket machines. It costs €10 (as of 2023).
- Hola Barcelona Travel Card: This card provides unlimited travel for 2, 3, 4, or 5 days. It includes the same services as T-Casual and, additionally, the metro to/from the airport. Like T-Casual, it is for individual use only and costs approximately €17 to €38 (as of 2023). It's perfect for those who want to travel as much as they need on public transport without worries.
For reference:
Single ticket: €2.40 in Zone 1 (Barcelona and surroundings), excluding the airport metro.
Airport ticket: €5.15, only for the metro to/from the airport.
For more info or to purchase online: https://www.tmb.cat/en/barcelona-fares-metro-bus
Note: there's no need whatsoever to purchase in advance, purchasing when arriving is easy and probably more convenient
Usage of credit cards