Docs for Realtime Data Feeds

147 views
Skip to first unread message

Zaarib Zabin

unread,
Sep 12, 2024, 3:13:45 PMSep 12
to mtadeveloperresources
Hello,
I have just found this page: https://api.mta.info/#/. However, I'm not seeing any documentation, are there any? If not, can anyone help me with how to process the response returned from these API calls?
Thank you!

Grisha Temchenko

unread,
Sep 13, 2024, 9:41:41 AMSep 13
to mtadeveloperresources
Checkout this page: https://new.mta.info/developers
(link from the bottom of the API page)

dude

unread,
Sep 21, 2024, 8:33:01 PMSep 21
to mtadeveloperresources
If you want to do it from scratch, from what I read (I'm no expert by any means) but you have to first parse the GTFS data using  MobilityData/gtfs-realtime-bindings: Language bindings generated from the GTFS Realtime protocol buffer spec for popular languages. (github.com), unless you want to parse that yourself...

Then it will give you a readable object which looks like this: (I just used N Q R W feed as an example)
t.jpg
The stopTimeUpdate has all the data you need, you just have to loop through it and get the arrival times for each stopID

This is a good video on GTFS if you don't know what it is, although I'll be honest i didn't watch it: https://www.youtube.com/watch?v=8OQKHhu1VgQ

If you want a Python library this is a great one:  Andrew-Dickinson/nyct-gtfs: Real-time NYC subway data parsing for humans (github.com) 
I also made a library ( ̄y▽, ̄)╭ [pls try it out =D]  /transitHelper: A Typescript library to make getting MTA data easy (github.com)

Also why does this reply to all... It didn't let me just reply to this post

Elias Gino Cripotos

unread,
Sep 23, 2024, 1:47:12 PMSep 23
to mtadeveloperresources
Hello, 

Just chiming in here. Im Elias, GTFS Community Manager at MobilityData. 

For all things GTFS outside of MTA's scope I would recommend taking a look at the newly redesigned GTFS.org.  
  • It is now the official canonical documentation website for GTFS as of December 21, 2022
  • It is maintained to reflect the latest GTFS information extracted from the official repository (google/transit) and aggregates other related repositories. 
  • There are many other resources there that could help you out and if you don't find what you need, you can always reach out the community through Github or Slack
  • The Getting Started section is great for newcomers. I especially enjoy the comprehensive GTFS Features page
Hope this helps. Let me know if you have any specific questions related to the standard outside MTA's scope of work. 

Reply all
Reply to author
Forward
0 new messages