Hi MBTA, I am trying to create a query to find the recommended route between two stops. I only care about stops that have light/heavy subway rail vehicles (type=0,1). I have so far used the following queries:
Query #1
Get all routes that are of heavy/light rail type:
/routes?api_key={API_Key}&filter[type]=0,1
Query #2
Returns all stops for given route:
/stops?api_key={API_Key}&include=route&filter[route]={route}
Query #3
For each stop, I use the following query to get the detailed stop info, like id.
stops/{place}?api_key=
{API_Key}
&include=connecting_stops,child_stops
But I feel like I may be stuck. My goal is to supply any two stops for any of the Subway routes I get back from query #1, and to return a recommended route between the two. For example, I want to find a way to choose Haymarket (Orange Line) and Milton (Mattapan Trolley) and get a reccomended route between the two. My ideal functionality would be a query based JSON API version of what is available through
https://www.mbta.com/trip-planner.
Thank you in advance!