Public transport information is published and maintained by transit agencies themselves. It’s an open standard and trivially easy to access.
See: https://gtfs.org/