Need API from particular route

168 views
Skip to first unread message

Pradeep Edward

unread,
Jun 28, 2021, 1:34:24 PM6/28/21
to MBTA Developers
Hi Team,

I need to list of train departure from "Park Street Station" from current time.
-Where they are going (destination town/city)
- Minutes until scheduled departure

can any one help and share me API which i need to use to get train list departure from "Park Street Station" from current time.

Repards,
Pradeep

Developer at MBTA

unread,
Jul 14, 2021, 1:49:45 PM7/14/21
to MBTA Developers
Hello Pradeep,

We'd recommend first reading through our V3 API pages — the main page includes an example of using the /predictions endpoint, which is the one you'll need to fetch real-time departures, and at the bottom of the Best Practices page you'll find info on how to interpret prediction data and how to implement our "countdown display" rules (which seems to be exactly what you're aiming for). Then take a look at the Swagger reference, which lists the format of all resources (e.g. predictions) and the parameters accepted by all endpoints. Finally, since the V3 API conforms to the JSON:API spec, you might want to see if there is a JSON:API library for your language, which can simplify making the requests and parsing the response data.

—Developer@MBTA
Reply all
Reply to author
Forward
0 new messages