SEPTA

Southeastern Pennsylvania Transportation Authority Serving Bucks, Chester, Delaware, Montgomery, and Philadelphia Counties

Choose Your Service

Trip Planner

System Map

beginning location
final destination

or

Quick Links

SEPTA API


New - Jan 30 2014

Bus/Trolley, ALL locations (json)

Instead of fetching vehicle location data route by route, you can now get all the vehicle locations at once. Below is a rendering of the data returned in a single call.

Param(s): None
http://www3.septa.org/hackathon/TransitViewAll/


New - Dec 18 2013

Regional Rail Station Arrivals/Departures (json)

Returns 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). A full list of paths will be published soon.

The api has two parameters:

  • -station name or id (required - Regional Rail Stations ONLY)
  • -number of results - default is 5, max is 200/all (optional)

Web Interface
HTML interface to the data (circa 2009)

Param(s): Station Name (required) / Number of Results (optional)
Example: Next 5 trains at Suburban Station (called by Station Name)
http://www3.septa.org/hackathon/Arrivals/Suburban Station/5/

Param(s): Station Name (required) / Number of Results (optional)
Example: Next 10 trains at Suburban Station (called by Station ID)
http://www3.septa.org/hackathon/Arrivals/90005/10/


Apps for Philly Transit Hackathon Release

SEPTA and SEPTAdev is proud to be a sponsor of Apps for Philly Transit and we welcome all participants. In additiona to prizes and give-aways care of SEPTA's Sales and Marketing Departments we are pleased to release the following data for this event.

Bus Shelter Locations (csv)

Single static CSV file that contains geo-coordinates of all the Bus Shelters on the system. Thanks to the City of Philadelphia's Mayor's Office of Transportation & Utilities.
Bus Shelter Locations (csv)

Center City Regional Rail Arrivals (csv)

Regional Rail arrival times are displayed at three Center City stations. These displays will be available online in the near future. The displays refresh every 15 seconds.

Note: If you are using Internet Explorer if may be necessary to open the 'Control Panel' and go to:
'Internet Options -> Browsing History -> Settings'
and change the browser caching and checking for newer options value to 'every time'.
Market East Station Display
Suburban Station Display
30th Street Station Display

The data for the above displays is available in CSV format and is updated every 20 seconds.
Market East Station Display Data (csv)
Suburban Station Display Data (csv)
30th Street Station Display Data (csv)

Pass Perks (json, ary)

A dump of all Pass Perks in the SEPTA Pass Perks Website in json and serialized PHP array formats.
Note: this data does not include geo-coordinates for the locations.
Pass Perks (json)
Pass Perks (ary)

Elevator Outages (json)

A list of elevators that are out of service is displayed on the Elevator Status page. This data is now available encoded in json format; it returns a list of elevators that are out of service.
Elevator Outages (json)

SEPTA iOS App - BETA (git)

Source code to the beta version of SEPTA's iOS application, which will be released to the public at the end of October. The source code is available under an open source licence, but the graphics are not. Since we can not release the graphics at this time, they have been modified so that the application can function with the source provided.
SEPTA iOS App source code (github)


Real-Time Data

NOTE: Real-time Data is not yet available for the Broad Street Line (Subway), Market Frankford Line (EL), Norristown High Speed Line (Rt. 100), and Subway-Surface Trolley's (when they are in the tunnel).

SEPTA System Locations (json/jsonp)

SEPTA locations API- This api takes in 4 paramters a latitude(required), longitude(required), type(optional), radius(optional) to return all SEPTA locations from a geographical point within a radius that is measured in miles. Reference: SEPTA Pass Perks website and SEPTA Sales Locations.

Types: [bus_stops , rail_stations , perk_locations , trolley_stops , sales_locations]

Note: For radius it is a decimal value so .5 is acceptable for half a mile.

JSONP OR JSON compatiable. For JSONP add &callback=?

Additonal Notes: More infomation about sales and perk locations are embedded inside the arrays. Notifed as perk_data or sales_data. The API is ordered by closest location. The distance field returned by the api will tell you how far you are from the supplied lat/lng in miles.

http://www3.septa.org/hackathon/locations/get_locations.php?lon=-75.33299748&lat=40.11043326&radius=3
Sample Jquery: 
$.ajax({
  url: "http://www3.septa.org/hackathon/locations/get_locations.php?lon=-75.161&lat=39.95205&callback=?",

 dataType: "jsonp",
  success: function(data){
    $.each(data, function(i,item){
        var locname =item.location_name;
        if( item.location_type== 'perk_locations')
        {

            if(item.location_data != null)
             alert(item.location_data.location_id + ' ' +item.location_data.location_name);
        }

    });
  }
});

System Status: Suspensions, Alerts, Detours and Advisories (json/jsonp)

System Status Web Page

Param(s): Route/Line Name (optional)
Will show if there is an alert, advisory, or detour:
http://www3.septa.org/hackathon/Alerts/

JSONP Example(s)
http://www3.septa.org/hackathon/Alerts/?callback=?

Adivosry, Alert, Detour Messages:

All Alerts Messages
http://www3.septa.org/hackathon/Alerts/get_alert_data.php?req1=all

Single Alerts Messages
http://www3.septa.org/hackathon/Alerts/get_alert_data.php?req1=bus_route_1

JSONP Example
http://www3.septa.org/hackathon/Alerts/get_alert_data.php?req1=all&callback=?


Regional Rail: TrainView (json, web)

TrainView Web Page

Regional Rail Trainview Feed (json)

Regional Rail Trains on a Google Map

Regional Rail Trains on a System Map. There's bugs in how a few point get rendered. The area's in orange are "Dark Territory" the data in those locations is an estimate at best and that goes for above json data as well. End users should understand that the data can be unreliable. We're wroking to get reliable data from Amtrak. Finally, a suspended train has a 'late' value of 999.

Regional Rail: Next to Arrive (json)

Next to Arrive Web Page

Param(s): Start Station / End Station / Number of Results (optional)
http://www3.septa.org/hackathon/NextToArrive/Airport%20Terminal%20B/Ardmore/10

JSONP Example
http://www3.septa.org/hackathon/NextToArrive/?req1=Airport%20Terminal%20B&req2=Ardmore&req3=10&callback=?

Bus/Trolley: Locations (json)

TransitView Web Page

Param(s): Route Number or Letter. Lettered routes in caps.
http://www3.septa.org/hackathon/TransitView/17
JSONP Example
http://www3.septa.org/hackathon/TransitView/?route=20&callback=?
Bus/Trolley Locations (WITH TRIP-ID'S)
http://www3.septa.org/hackathon/TransitView/trips.php?route=17

Bus: Detours (json)

Bus Detours Web Page - deprecated

Param(s): Route (optional)
All Detours for all routes:
http://www3.septa.org/hackathon/BusDetours/

Detour By Route:
http://www3.septa.org/hackathon/BusDetours/2

JSONP Example
http://www3.septa.org/hackathon/BusDetours/?req1=2&callback=?

@SEPTA Twitter Posts (json)

SEPTA Twitter Accounts Web Page

@SEPTA Account Param(s): Number of posts
http://www3.septa.org/hackathon/Twitter/2

Current Travel Alerts (html) - deprecated

Current Travel Alerts. HTML only sorry, scrape & grep on div then strong
http://www.septa.org/realtime/alert.html

Static Data (Schedules, Stops, GIS)

GTFS Schedules (zip/gtfs)

http://www2.septa.org/developer/download.php

Regional Rail: Route Trace (kml)

Single KML file of the Regional Rail (kml)

Bus/Trolley: Route Trace (kml)

Param(s): Route Number or Letter. Lettered routes in caps.
http://www3.septa.org/transitview/kml/17.kml

Regional Rail: Schedules by Train Number (json)

Param: Train Number
http://www3.septa.org/hackathon/RRSchedules/458
JSONP Example
http://www3.septa.org/hackathon/RRSchedules/?req1=458&callback=?

Bus/Trolley: Schedules (json)
Parms(s): ?req1=stop_id req2=route (optional) req3=(i or o) (for inbound/outbound)optional req=6 number of results(optional)
http://www3.septa.org/hackathon/BusSchedules/
JSONP Example
http://www3.septa.org/hackathon/BusSchedules/?req1=17842&req2=17&req3=i&req6=7&callback=?

Bus/Trolley: Stops By Route - unsorted (json)

Param(s): Route Number or Letter. Lettered routes in caps.
http://www3.septa.org/hackathon/Stops/23
JSONP Example
http://www3.septa.org/hackathon/Stops/?req1=23&callback=?

Bus/Trolley: SMS Schedules by Stop (text /n delimited)

Param(s): StopID / RouteID (optional) / DirectionID (i=inbound, o=outbound, optional when applicable)
http://www3.septa.org/sms/17842/17/o/

RSS Feeds

Press Releases
http://www.septa.org/rss/releases.xml

News Bites (w/ error)
http://www.septa.org/rss/news.xml

Sustainability Journal Entries (with errors)
http://www.septa.org/rss/sustain.xml

Travel Alerts (by mode)
http://www2.septa.org/rss/alerts/index.xml

Elevator Outages
http://www2.septa.org/rss/elevators/index.xml

Bus Detours
http://www2.septa.org/rss/detours/index.xml

Links/Resources

Event info, Web versions of the above, etc.

Apps For Septa: http://www.appsforsepta.org/
PennApps20120: http://2012s.pennapps.com/
TransitView (Bus/Trolley Locations): http://www3.septa.org/transitview
Next To Arrive (Regional Rail Departures): http://app.septa.org/nta/
SMS Schedules: http://www3.septa.org/sms/simulator/
Mobile Website: http://m.septa.org/
Twitter: http://www.twitter.com/septa/
Press Releases: http://septa.org/media/releases/
News Bites: http://septa.org/media/short/
Current Travel Alerts: http://www.septa.org/realtime/alert.html
Elevator Status: http://www2.septa.org/elevators/
Bus Detours: http://septa.org/realtime/index.html
TrainView: html pda mobile

Contact SEPTA Team

SEPTAdev Google Group
SEPTAdev Twitter
SEPTAdev Email

api0