Associating a DATE with a given trip_id from GTFS Static Data

45 views
Skip to first unread message

David Wintermeyer

unread,
Oct 18, 2023, 8:21:51 AM10/18/23
to MBTA Developers
Hello MBTA community,

I am working on a project using the MBTA's GTFS-static date. I would like to associated a specific date (10/18/23) with each specific trip_id, and am not sure the best way to do this. I suspect someone has solved this problem and would appreciate any guidance! I found an associated stack overflow but am not able to exactly understand how I would apply it.


Thanks!

David

Developer at MBTA

unread,
Nov 16, 2023, 3:44:25 PM11/16/23
to MBTA Developers
Hi David, thanks for reaching out. Apologies for the delayed response — this autumn we changed our internal process for responding to inquiries like this (including onboarding a new team member), and we're now getting up to speed. I hope our answer is still helpful! 

When it comes to associating specific dates with trip_ids, it's important to note that trips can occur on multiple days. Therefore, directly linking a single date to a trip_id might not be super straightforward.

We might suggest associating each trip_id with the corresponding service_id found in the calendar.txt file of the GTFS-static data. This link will allow you to understand on which days a specific trip is scheduled to run.

If your goal is to find out whether a trip runs on a particular date, you might find it more useful to filter the /schedules endpoint in the v3 API. By filtering by date, route, and other relevant parameters, you can determine if a specific trip is scheduled for that date.

I hope this helps clarify things. If you need more guidance, please let us know!

All the best,
Developer@MBTA
Reply all
Reply to author
Forward
0 new messages