Septa Next Bus
The API

All API are available to use free and publicly from the following links. They all return json objects. They all also may return "warnings" or "errors" arrays in the json response. All of the calls are cross domain capable in case you want to call them from javascript.

The Predict API:
This api takes a bus_id and stop_id and returns a "prediction_in_seconds" for that bus to reach that stop. To get the latest bus information it is recommended to use http://www3.septa.org/hackathon/TransitViewAll/. To get stop information it is recommended to use http://www3.septa.org/hackathon/Stops/42 or the gtfs databases.

The public API: http://hestia.nighsoft.net/septa_next_bus/predict.php
Example usage: http://hestia.nighsoft.net/septa_next_bus/predict.php?busid=5462&stopid=6060

The Next Bus API:
This api will return an array of bus objects "next_buses_for_stop". It takes only a stop_id as input. It will return one bus from each route that goes to this stop_id. The bus objects include the "prediction_in_seconds" to get to that stop and also a lot of information about the bus like it's lat / lng etc.

The public API: http://hestia.nighsoft.net/septa_next_bus/next_bus.php
Example usage: http://hestia.nighsoft.net/septa_next_bus/next_bus.php?stopid=6060

The Nearby To API:
This api takes a lat/lng from a source and destination locations and returns back all the buses, routes, and stops which go in between them. It also sorts the buses in order for each route regarding which one will go from a source stop to a destination stop first. Each bus also includes all the predictions for all the stops returned.

The public API: http://hestia.nighsoft.net/septa_next_bus/nearby_to.php
Example usage: http://hestia.nighsoft.net/septa_next_bus/nearby_to.php?near_lat=39.950927&near_lng=-75.165594&to_lat=39.948386&to_lng=-75.144061