The BART API
January 15, 2019
BART is in the process of migrating to a new scheduling system, and output from the new system doesn’t map 1:1 with legacy systems. As a result, some API attributes will no longer be supported after the February 11, 2019 schedule change. We’d like to outline these changes for you.
For <sched> API <arrive> and <depart> commands with a date parameter of 02/11/2019 or later:
- The <C02> attribute will be removed from <trip>. C02 calculation is not supported by BART’s new system and no longer used by BART. The C02 <message> at the end of the results will also be removed. We have added C02 calculation to our backlog for consideration in later development. For data to make the calculation, visit https://www.bart.gov/guide/carbon.
- The <trainId> attribute will be removed from <leg>. We originally hoped to include this identifier in real time ETD data to facilitate matching. However, BART moved to GTFS / GTFS-RT for that purpose, so a separate, custom matching method is not supported.
- The <trainIdx> attribute will be removed from <leg>. The trainIdx was an attempt to provide an incremental identifier of scheduled trains on a route. However, BART increasingly adds, removes, replaces or diverts trains throughout the day, so this method is not reliable, and is not supported.
- The <transfercode> attribute will be removed from <leg>. <Transfercode> is not supported by BART’s new system and no longer used by BART. We have added <transfercode> to our backlog for consideration in later development.
- The <trip> element will contain only the cash <fare> class. Multiple fare classes are not supported by BART’s new system and no longer used by BART in trip plans. Multiple fare classes are still available in the <fare> command. We have added multiple <trip> element fare classes to our backlog for consideration in later development.
- The <legend> tag will be modified as appropriate to account for these changes.
We apologize if these changes affect your app or service. As we work to modernize our back office systems, we’re also working to minimize the impact on developer services. If any additional changes are necessary, we’ll provide as much advance notice as possible.
For more details about BART’s February 11, 2019 schedule change read the news story here.
Since 2010, the BART API (http://api.bart.gov/) has been a one-stop shop BART information:
- Complete BART trip plans;
- Car crowding levels, service advisories, fares
- Real time estimates by platform, including direction and car length
- Station information, and so much more...
Two ways to get a validation key
- (1) No strings attached
We don't make you register for BART open data and our License Agreement is one of the least restrictive in the business. So whether you're kicking the tires or taking it to production, just give our customers good information and don't hog community resources:
- (2) Strings with benefits
If you sign up for your very own key you'll still be able to access the API if the public key above is updated. Plus you'll get a backstage pass to check out pre-release functionality that may just break everything you're working on -- or give you a leg up in the marketplace.
- No registration required
We won't make you jump through hoops to use BART open data. Just follow our short and simple Developer License Agreement, give our customers good information and don't hog community resources
- Please keep your work up to date
Things change. When they do we'll try to give you plenty of notice through the BART developer email list.
- Please don't use the official BART logo or system map
Only we get to use official BART trademarks and copyrighted works to let customers know they're getting info directly from BART versus one of the tons of other places that use BART open data. (If you need a BART system map for your project, check out our editable App Map with a CC-By license).
- Don't forget about us!
Give us a shout out or a link back and let us know about the cool stuff you're doing
- Will you help me troubleshoot?
Sorry. If we help you, it's only fair that we help everyone else, too. We simply don't have the resources for that. But you can always ask questions to the unofficial BART Developers Google Group.
- What are your plans for future development?
All of our developer services are created on what we call "BART one percent time." In that context, we're doing our best to add new features, fix problems and keep it all going. Drop us a line if you have any suggestions.