I believe google maps pulls its data from municipalities setting up and streaming realtime data using this: https://developers.google.com/transit/gtfs-realtime
For my city, I was able to pull this GTFS data into my home automation system to show next arrival times for a couple of convenient stops near my home.
Oh yeah, then you definitely need something else to take the transit schedule and realtime updates to plan routes for you.