Transit Data

511 SF Bay’s Portal for Open Transit Data. Data is free and available using a token.

511 SF Bay provides transit data in both bulk and API quantities for all publicly available transit service providers in the San Francisco Bay Area. Besides GTFS and GTFS-Realtime (Trip Updates, Vehicle Positions, Service Alerts) feeds in bulk, a number of APIs modeled after SIRI and NeTEx standards are also available. Available transit data feeds include:

  1. Static transit data in General Transit Feed Specification (GTFS) and Open 511 SIRI/NeTEx API formats
  2. Real-time transit data via Open 511 SIRI APIs and GTFS-Realtime

Once you have obtained your API token, you can choose any combination of data endpoints from the following list to obtain the data you need. The default rate limit per API token is 60 requests per 3600 seconds. If you need increased rate limit for your purpose, please send your request to 511sfbaydeveloperresources@googlegroups.com without including your API Key. For more detail on these data endpoints, you can download the technical specification.

List of Bulk Data Feeds

GTFS Operators provides the list of transit operators/agencies that have a GTFS dataset available for download. It provides the operator’s ID, name, and the date the operator’s feed was last updated.

  • Endpoint: http://api.511.org/transit/gtfsoperators?api_key=[your_key]
  • Allowable Parameters: api_key (mandatory)

GTFS Feed Download allows the user to download a zip file containing GTFS dataset for the specified operator/agency. It also contains additional files, called the GTFS+ files, that provide information not contained in the GTFS files such as the direction names, fare zone names, etc.

In addition to operator/agency feeds, user can download a consolidated active Regional GTFS feed as well as monthly historical Regional GTFS feed. Active regional feed can be obtained by setting the Operator_id to ‘RG’ and the historic regional feed can be obtained by setting the historic parameter value to desired year and month (YYYY-MM).

  • Endpoint: http://api.511.org/transit/datafeeds?api_key=[your_key]&operator_id=[operatorID]
  • Allowable parameters: api_key (mandatory), operator_id (mandatory), and historic (optional)

GTFS-Realtime Trip Updates provides real-time updates on the expected arrival and departure times for an agency in the Protocol Buffer format.

In addition to individual transit agency feed, a single consolidated Regional Trip Updates feed can also be downloaded using value 'RG'.

  • Endpoint: http://api.511.org/transit/tripupdates?api_key=[your_key]&agency=[operatorID]
  • Allowable parameters: api_key (mandatory), agency (mandatory)

GTFS-Realtime Vehicle Positions provides real-time updates on the vehicle positions for an agency in the Protocol Buffer format.

In addition to individual transit agency feed, a single consolidated Regional GTFS-RT Vehicle Positions feed can be downloaded by setting the agency parameter to the value 'RG'. 

  • Endpoint: http://api.511.org/transit/vehiclepositions?api_key=[your_key]&agency=[operatorID]
  • Allowable parameters: api_key (mandatory), agency (mandatory)

GTFS-Realtime Service Alerts provides real-time updates on service alerts for the entire region as well as per agency in the Protocol Buffer, XML, and JSON formats.

In addition to individual transit agency feed, a single consolidated Regional GTFS-RT Service Alerts feed can be downloaded by setting the agency parameter to the value 'RG'. 

  • Endpoint: http://api.511.org/transit/servicealerts?api_key=[your_key]&agency=[operatorID]
  • Allowable parameters: api_key, agency (optional), format (optional)

List of Available APIs

Real-time Stop Monitoring API provides the expected arrival and departure times of vehicles at a stop in XML and JSON formats.

  • Endpoint: http://api.511.org/transit/StopMonitoring?api_key=[your_key]&agency=[operatorID]
  • Allowable parameters: api_key (mandatory), agency (mandatory), stopcode (optional) and format (optional)

Real-time Vehicle Monitoring API provides information about current location and expected activities of a vehicle in XML and JSON formats.

  • Endpoint: http://api.511.org/transit/VehicleMonitoring?api_key=[your_key]&agency=[operatorID]
  • Allowable parameters: api_key (mandatory), agency (mandatory), vehicleID (optional) and format (optional)

The Operators API provides a list of the transit operators along with the operator information such as the operator ID, name and contact. The response is provided in XML and JSON formats.

  • Endpoint: http://api.511.org/transit/operators?api_key=[your_key]
  • Allowable parameters: api_key (mandatory), operator_id (optional) and format (optional)

The Lines API provides the list of routes serviced by a transit agency. It provides route id, name, mode of transport and other details. The response is provided in XML and JSON formats.

  • Endpoint: http://api.511.org/transit/lines?api_key=[your_key]
  • Allowable parameters: api_key (mandatory), operator_id (mandatory), line_id (optional) and format (optional)

The Stops API returns the list of stops where passengers can board or alight from vehicles. It returns the stop id, name and location information for the stops.

  • Endpoint: http://api.511.org/transit/stops?api_key=[your_key]&operator_id=[operatorID]
  • Allowable parameters: api_key (mandatory), operator_id (mandatory), include_stop_areas(optional), Direction_id (optional), line_id (optional), Pattern_id (optional) and format (optional)

The Stop Places API returns the list of physical stops for an agency and includes a more detailed information about the stop.

  • Endpoint: http://api.511.org/transit/stopplaces?api_key=[your_key]&operator_id=[operatorID]
  • Allowable parameters: api_key (mandatory), operator_id (mandatory), format (optional), stop_id (optional)

The Patterns API returns a list of patterns for a given route/line. A pattern is an ordered list of stop points and time points and it describes a trip pattern followed by the public transport vehicle.

  • Endpoint: http://api.511.org/transit/patterns?api_key=[your_key]&operator_id=[operatorID]&line_id=[lineID]
  • Allowable parameters: api_key (mandatory), operator_id (mandatory), line_id (mandatory), format (optional) , pattern_id (optional)

The Route Timetable API returns all the timetables for a given route. It includes supporting elements referenced by the timetable such as the Route (ordered list of timepoints for which times are provided), direction and the day type (service type).

  • Endpoint: http://api.511.org/transit/timetable?api_key=[your_key]&operator_id=[operatorID]&line_id=[lineID]
  • Allowable parameters: api_key (mandatory), operator_id (mandatory), line_id (mandatory), format (optional) , includespecialservice (optional), exceptiondate (optional)

The Scheduled Departures at a Stop API (also known as SIRI Stop Timetable) provides all the scheduled departures and arrivals at a stop within a given window of time.

  • Endpoint: http://api.511.org/transit/stoptimetable?api_key=[your_key]&operatorref=[operatorID]&monitoringref=[stopID_id]
  • Allowable parameters: api_key (mandatory), operatorref (mandatory), monitoringref (mandatory), format (optional) , lineref (optional), starttime (optional), endtime (optional)

Service Holidays API returns the list of service exceptions (typically holidays) for an agency.

  • Endpoint: http://api.511.org/transit/holidays?api_key=[your_key]&operator_id=[operatorID]
  • Allowable parameters: api_key (mandatory), operator_id (mandatory), format(optional)

Want to use 511 Open Data APIs?

Here's a short text of the process. And don't forget to check the Terms & Conditions of usage.

Get Started by Requesting a Token

API Documentation

^ Back to top