Open Data FAQ

Welcome to 511 SF Bay's open data FAQs. You may find your question answered in one of the topics belowIf you don’t find what you are looking for, please send your question to: 511sfbaydeveloperresources@googlegroups.com.

Select a different help topic below to switch FAQ pages


Questions

511 SF Bay, the free regional traveler information program managed by the Metropolitan Transportation Commission (MTC), currently offers transit, , traffic, and toll data through a number of standardized data feed and API endpoints. These open data services are provided to anyone with a valid API key. A single API key can be used with all data endpoints available through the http://api.511.org domain.

An API key can be requested by submitting this form. Once your email address is verified, a key will be issued. You will need to use that key with your desired data endpoints to receive data.

The default limit is 60 requests per 3600 seconds per API key. Rate limit can be increased based on the need of the use case. To request an increased rate limit, please contact transitdata@511.org with the following information:

  • your API key
  • the rate limit you need
  • a description of the use case
  • data endpoints you intend to use
  • a brief justification for the requested rate limit

Relevant technical specifications for transit, traffic, and toll data feeds and APIs can be found at the bottom of transit and traffic open data pages. These documents are kept up to date as and when changes to data feed and API endpoints are deployed in production.

We recommend that our data consumers first review transittraffic, and toll technical specifications, and then look up our FAQs. If further help is needed, please send an email to our Google group at 511developerresources@googlegroups.com. Someone will respond as soon as possible.

All transit service operators currently in the 511 system and their IDs can be queried from the http://api.511.org/transit/operators?api_key={your_key}. Couple of things to note in the response of this API:

  1. Operators with IDs 5E, 5F, 5O, and 5S are used internally by the 511 system and has no transit service data associated with them. 5E may be used to provide information during regional emergencies.
  2. A ‘true’ value in the <Monitored> tag means that the operator provides real-time data as well.

You can find all line ID and name for an operator from the Lines API: http://api.511.org/transit/lines?api_key={your_key}&Operator_id={operatorID}. For more detail and available filters, please review the 511 Transit data feed and API specification available here: Open 511 Data Exchange Specification - Transit.

To get an active timetable for a desired transit route, you need to send a request using the timetable API as below. http://api.511.org/transit/timetable?api_key={your_key}&operator_id={operatorID]&line_id={lineID}. Desired operatorID and lineID can be obtained from the APIs mentioned above. Please note that the timetable provides scheduled times for timepoint stops only. For more detail and available filters for the timetable API, please review the technical specifications.

511 open data currently includes rail services that operates beyond the nine-county San Francisco Bay Area including Capitol Corridor, ACE, and San Joaquins. Transit operators outside of the Bay Area providing express commuter bus services into the Bay Area are not yet included in the system.  However, MTC is exploring the possibility of incorporating those commuter services into 511 open data. 

511 SF Bay includes transit services based in the San Francisco Bay Area that are open to public and operate on a published schedule. Transit operators are required to provide data to the 511 SF Bay system following a protocol in a timely manner. Some private ferry operators do not provide scheduled services that are open to public; hence, they are not included in 511 open data. Other private ferry operators with scheduled departures to tourist destinations are currently not able to provide their data in a timely manner following the required protocol. As and when these ferry operators are able to provide data fulfilling 511 SF Bay’s requirements, data will become available through our system.

There are numerous shuttle services in the San Francisco Bay Area - some with scheduled service, and some are flexible. Shuttles with scheduled services that provide data to 511 SF Bay are made available through 511 open data.

To provide data consumers value-added single data feed for static and real-time transit data, 511 SF Bay has consolidated all data provided by the transit agencies in the region into Regional GTFS and Regional GTFS-RT feeds. The Regional feeds provide data consumers well-supported and curated single source for transit data for 30+ transit operations. In addition, these feeds not only merge data from transit agencies but also supports cross-agency conditions through GTFS Fares V2 and GTFS Pathways data.

You can download Regional GTFS Feed using ‘RG’ value for the operator filter in the Datafeeds API endpoint as shown in the data endpoint below:

Regional GTFS: http://api.511.org/transit/datafeeds?api_key=[YOUR_API_KEY]&operator_id=RG

You can download Regional GTFS-RT Feeds using ‘RG’ value for the agency filter in TripUpdates, VehiclePositions, and servicealerts data API endpoints. See below for complete data endpoints:

Regional Trip Updates: https://api.511.org/Transit/TripUpdates?api_key=[YOUR_API_KEY]&agency=RG

Regional Vehicle Positions: https://api.511.org/Transit/VehiclePositions?api_key=[YOUR_API_KEY]&agency=RG

Regional Service Alerts: https://api.511.org/transit/servicealerts?api_key=[YOUR_API_KEY]&agency=RG

Historic GTFS-RT feeds are available in a form of a real-time data archive – stop_observations.txt – that will allow data consumers to download observed real-time arrival times at all stops for all trips in a monthly historic static GTFS data feed. This data, alongside the historic scheduled arrivals/departures can be valuable for transit service analysis, transportation planning, and other research purposes. Stop_observations file is available in monthly historic feed starting from March 2022 and can be requested by appending ‘-so’ to the ‘yyyy-mm’ historic parameter value as shown in the sample URL below: https:// https://api.511.org/transit/datafeeds?api_key=[YOUR_API_KEY]&operator_id=RG&historic=2023-01-so

The Historical Regional GTFS feed is produced monthly and gives a complete, retrospective view of service scheduled on each day of the month. By combining multiple monthly historic feed, users can perform analyses across months, quarters, and years.

The historic Regional GTFS feed can be downloaded by using the filter ‘historic’ with datafeeds API. Following is sample URL to download historic feed for January 2021.

https://api.511.org/transit/datafeeds?api_key=[YOUR_API_KEY]&operator_id=RG&historic=2021-01

Historic Regional GTFS feeds are equivalent to the original daily Regional Feeds in the stops, routes, and scheduled services they contain. Use of a historic feed will produce the same output in a routing engine or another type for analysis.

Historic feeds are different from Regional GTFS feeds in their specific GTFS structure:

  • calendars.txt records are removed and rewritten in calendar_dates.txt
  • trips.txt records are hashed and compared (as described in Appendix E3.3 of Open Data Specification - Transit)
  • IDs for global records are namespaced (as described in Appendix E.3.2 of Open Data Specification - Transit)
  • Additional stop_ observations.txt file, if requested explicitly, provides observed real-time arrivals at every stop for all trips.

These differences should not affect routing engine or similar types of analysis. However, data consumers should keep these differences in mind when they are trying to use historical feeds to understand changes in GTFS data and its practices over time at Bay Area agencies.

Yes, 511 SF Bay provides detailed fare information for all transit agencies in the San Francisco Bay Area region as part of the Regional GTFS feed in the proposed GTFS Fares V2 format (URL: http://bit.ly/gtfs-fares). See above to find out how to download Regional GTFS feed.

Yes, 511 SF Bay Open Data Portal now provides pathways information for many transit station/hubs in the region in the GTFS Pathways format. This information is provided as part of the 511’s Regional GTFS feed. See above to find out how to download the Regional GTFS feed.

Yes, 511 Open Data Portal provides toll data for all SF Bay Area Bridges and dynamic toll rate data for some Express Lane corridors in the region.  This information is available over 511’s toll API endpoint, and can be accessed using the following URL: https://api.511.org/toll/programs?api_key=ENTER-API-KEY-HERE

511 SF Bay program covers all freeways and state highways in the San Francisco Bay Area. The traffic event API provides active incidents and planned events on those roadways. Detail technical specification of the traffic event API can be downloaded from here.

Yes, the 511 SF Bay WZDx feed utilizes the specification put together by a consortium of USDOT agencies including FHWA, ITS JPO, and others. The specification can be found at https://github.com/usdot-jpo-ode/wzdx.   

WZDx API is designed to cover all local streets, freeways, and state highways in the San Francisco Bay Area for participating jurisdictions. The WZDx API provides planned and active work zone related activities, closures, and detours on those roadways.

You can access WZDx Feed using the following endpoint: https://api.511.org/traffic/wzdx?api_key=[YOUR_API_KEY]

^ Back to top