Welcome to 511 SF Bay's open data FAQs. You may find your question answered in one of the topics below. If you don’t find what you are looking for, please send your question to: 511sfbaydeveloperresources@googlegroups.com.
Questions
What is open 511 data?
511 SF Bay, the free regional traveler information program managed by the Metropolitan Transportation Commission (MTC), currently offers transit and traffic event 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.
How do I obtain an API key and begin receiving data?
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.
I am receiving rate limit error. What is the default request rate limit, and how do I request for an increase?
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
How do I get technical support?
We recommend that our data consumers first review transit and traffic technical specifications, and look for their questions in this 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.
Where do I find transit operator ID
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:
-
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.
-
A ‘true’ value in the <Monitored> tag means that the operator provides real-time data as well.
Where can I find all line IDs for a transit operator?
You can find all line ID and name for an operator from the http://api.511.org/transit/lines?api_key={your_key}&Operator_id={operatorID} API. For more detail and available filters, please review the 511 Transit data feed and API specification available here: Open 511 Data Exchange Specification - Transit.
How do I get timetable for a route with a specific transit operator?
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. For more detail and available filters for the timetable API, please review the technical specifications.
When I use my new API token with the http://services.my511.org/Transit2.0/GetAgencies.aspx?token={my_token} I receive “Invalid Credentials” error. Why?
The group of APIs exposed under the http://services.my511.org/… domain was our previous edition of custom real-time transit APIs. These APIs are set to expire sometime later this year and new tokens are not generated for these APIs. If you have received a new token by submitting a request form available at http://511.org/open-data/token, your token will only work with the new open 511 transit and traffic APIs.
Does 511 open data include out of the region transit operators with commuter services into the Bay Area?
511 open data currently does not include any transit services in the Bay Area that are provided by operators based outside of the region.
Some ferry services and shuttles are not included in the 511 open data. Why?
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 services 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.
Currently no ferry or shuttle services provide real-time data to 511 SF Bay.
What roadway network does the traffic event API cover?
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.
What are Regional GTFS and Regional GTFS-RT feeds?
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.
How can I download Regional GTFS Feed?
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
How can I download Regional GTFS-RT Feeds?
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
Does 511 provide Pathways data?
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.
Is detailed transit fare information provided? How?
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.
What is the purpose of the historic GTFS feed? How can I get it?
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.
http://api.511.org/transit/datafeeds?api_key=[YOUR_API_KEY]&operator_id=RG&historic=2021-01
How is historic GTFS feed different from Regional GTFS feed?
Historic Regional GTFS feeds are equivalent to the original daily Regional Feeds in the stops, routes, and scheduled services they contain. Use 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)
These differences should not affect routing engine or similar types of analysis. However, keep these differences in mind if you are trying to use historical feeds to understand changes in GTFS data and its practices over time at Bay Area agencies.
Is there a historic GTFS-RT feed?
As of now, historic GTFS-RT feeds are not available. 511’s team is currently working on a real-time data archive that will allow data consumers to download actual (observed) arrival times at all stops for all trips in a monthly historic data feed. This data, alongside the historic scheduled arrivals/departures can be valuable for transit service analysis, transportation planning, and other research purposes. Regional real-time data archive is expected to be available in Fall 2021.