Many public transit agencies provide both static and real-time data.
- static data often is sharing using the "GTFS" specification, which includes stop locations, route geometries, scheduled trips, etc. See http://gtfs.org/
- real-time data is shared using a variety of specifications, and typically includes vehicle locations, service alerts, and other notifications from the agency
The static kind of data can certainly be cached for local use. Try browsing and downloading some from the Transitland open transit data platform and its API: https://transit.land
The online search takes into account all short term schedule modifications. Considering how many such changes occur on almost daily basis, you would be quickly complaining about data usage from all those schedule updates. Or you would frequently get wrong route.
Either way, a lot of complexity / resources spent on something trivially solved by the original solution (webpage).