Miscellaneous API feedback

32 views
Skip to first unread message

Colin Weir

unread,
May 15, 2023, 1:23:29 PM5/15/23
to SEPTAdev
I have some feedback notes on the API, having used it for some projects recently:

The "station" parameter for the /Arrivals endpoint has a few quirks related to station names. The input "Gray 30th Street" is not valid, despite being shown on several septa.org pages linked from the documentation. The correct string is "30th Street Station". The error message for the above also says to ensure the "req1" parameter is correct, even when passing "?station=".

The /Alerts endpoint uses a confusing series of strings that require you to specify the vehicle type as bus_route_x or trolley_route_y, which doesn't seem to be a requirement on any other API endpoints. There's also no indicated way to get alerts for the MFL, BSL, etc. This should be standardized to use the same parameters as returned by the /Routes endpoint. The parameter is also named "routes", plural, but only takes a single "route" as an input.

There is a bug when using the /Arrivals endpoint. If you call a route where the last departure for the day has already happened, the "sched_time" data returned will include today's date, with tomorrow's departure time. 

Example: A bus route has its last departure at 10pm on May 4, and has its next departure at 8am on May 5. If you call the /Arrivals endpoint for a stop on that route at 11pm on May 4, it will return May 4 at 8am as the next scheduled departure.

Last, the /Stops endpoint returns HTML entity in its strings. Eg: "stopname": "Market St & 11th St".

Reply all
Reply to author
Forward
0 new messages