When to update timetable data?

I’d like to save the GTFS-R timetable to a database, including all its changes, efficiently; so I can link the data to current and historical real-time vehicle locations.

The question is - how can I tell when I need to call the API to refresh the timetables?

If I’m calling it every hour, for example, the data starts to build up. I’d rather call it when I know there are changes.

I’d like to avoid having to code up a CRUD process for each table due to the work involved; or letting the table sizes blow out after a few weeks.

@minus34 You can make a HEAD request to the endpoints and monitor the Last-Modified header value to see if it has changed.

1 Like