Last time I ran into something similar, I researched whether I could get real-time subway train location data for my city, St Petersburg. It turned out that such data unfortunately doesn't exist as far as I can tell. I did find an official open API for the ground transport though.