
Transport for Philadelphia
TransportationReturns a list/queue of trains scheduled to arrive at a station in two/both directions. The direction is demarcated as either Northbound or Southbound. The directions are obviously not geographical references, but rather a reference to the old Reading and Pennsy Railroads. The key to understanding the direction is by using Suburban Station as a starting point: Any trains that that move eastbound towards Market East are all considered Northbound; trains going from Suburban to 30th St are all Southbound. The 'path' field describes more accurately the path of travel along the various branches. Station names and id's can be found here (csv).
📚 Documentation & Examples
Everything you need to integrate with Transport for Philadelphia
🚀 Quick Start Examples
// Transport for Philadelphia API Example
const response = await fetch('http://www3.septa.org/hackathon/', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
Getting Started with SEPTA Hackathon API
SEPTA (Southeastern Pennsylvania Transportation Authority) is a public transportation system that connects Philadelphia and the surrounding areas. SEPTA Hackathon provides a collection of APIs to get real-time information and other relevant data about the transportation system.
Authentication
SEPTA Hackathon APIs are publicly available and do not require any authentication key.
API Endpoints
There are several endpoints available in SEPTA Hackathon API which provide data regarding transit and other information. These are:
1. Station Information Endpoint
This endpoint provides data on all the stations in the SEPTA network. Here's an example of how to get station information using JavaScript:
fetch('http://www3.septa.org/hackathon/Stations/')
.then(response => response.json())
.then(data => console.log(data));
2. Train Schedule Endpoint
This endpoint provides the train schedule information for a selected station. Here's how to get the train schedule for a station using JavaScript.
fetch('http://www3.septa.org/hackathon/TrainView/', {
method: 'POST',
body: JSON.stringify({
req1: 'train_view',
req2: '<station_id>',
req3: '<direction>'
})
})
.then(response => response.json())
.then(data => console.log(data));
3. Bus Schedule Endpoint
This endpoint provides information about bus schedules for a particular bus route. Here's how to get bus schedule information using JavaScript.
fetch('http://www3.septa.org/hackathon/BusSchedules/', {
method: 'POST',
body: JSON.stringify({
req1: 'bus_schedule',
req2: '<route_id>'
})
})
.then(response => response.json())
.then(data => console.log(data));
4. Alerts Endpoint
This endpoint provides current alerts and updates regarding transit service disruptions. Here's an example of how to get alerts using JavaScript.
fetch('http://www3.septa.org/hackathon/Alerts/', {
method: 'POST',
body: JSON.stringify({
req1: 'alerts'
})
})
.then(response => response.json())
.then(data => console.log(data));
Conclusion
That's a quick overview of the SEPTA Hackathon API and how to use it with JavaScript. To get the best out of these endpoints, it is essential to understand the parameters and limits of the various APIs. This information is provided in the API documentation on the Hackathon website.
📊 30-Day Uptime History
Daily uptime tracking showing online vs offline minutes