As suggested by the answer to the question you linked, the edit API is unsuitable, but the Overpass API will probably be ok for city level stuff.

If you have JOSM running in “expert” mode there are some pre-saved Overpass download scripts for various types of public transport available in the download window. A bit of messing around with them to use a geocoded search area (which Overpass turbo supports) rather than a bounding box should give you what you want as long as mappers have added the relevant boundaries and routes into OSM.