bart.gov APIwww.bart.gov ↗
Get live BART train departure estimates, station codes, and service alerts. 3 endpoints covering all Bay Area Rapid Transit stations in real time.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/a3c68648-205d-4b57-a97b-b4d0bf6edcab/get_stations' \ -H 'X-API-Key: $PARSE_API_KEY'
Fetch the list of all BART stations and their abbreviated codes. These codes are required for use with the get_departures endpoint.
No input parameters required.
{
"type": "object",
"fields": {
"stations": "array of objects with name (string, full station name) and code (string, abbreviated station code)"
},
"sample": {
"data": {
"stations": [
{
"code": "12TH",
"name": "12th St. Oakland City Center"
},
{
"code": "EMBR",
"name": "Embarcadero"
},
{
"code": "MONT",
"name": "Montgomery St."
}
]
},
"status": "success"
}
}About the bart.gov API
The BART API provides 3 endpoints for real-time Bay Area Rapid Transit data: station listings with abbreviated codes, live platform-level departure estimates via get_departures, and current service alerts including elevator and escalator outages. Every departure response includes destination, estimated times, and car counts, making it suitable for building transit displays, commute tools, or service-monitoring integrations.
Station Lookup and Departure Estimates
Start with get_stations to retrieve the full list of BART stations. Each object in the response includes a name (e.g. "Embarcadero") and a code (e.g. EMBR). These codes are required as the station_code parameter for get_departures. Passing an unrecognized or malformed code to get_departures returns a stale_input error, so always source codes from get_stations rather than hardcoding them.
Real-Time Platform Departures
get_departures accepts a single required parameter, station_code, and returns a station_name, an updated timestamp, and a platforms array. Each platform object contains a name and a departures array whose entries include the destination and estimates — the per-train countdown values and car counts. This structure mirrors how BART displays information on its own departure boards, organized by direction and platform.
Alerts and Advisories
get_alerts requires no inputs and returns a snapshot of the current system status as of an as_of timestamp. The response separates content into six arrays: current_service_alerts (each with a type and message), planned_service_advisories, elevator_alerts, escalator_alerts, planned_elevator_advisories, and planned_escalator_advisories. Elevator and escalator alert objects include station, station_code, location, reason, and estimated_return, which is useful for accessibility-aware routing tools. Planned advisory objects carry a description and a url for further detail.
- Build a real-time departure board app for a specific station using get_departures platform and estimates data
- Send push notifications when elevator or escalator outages are reported at a commuter's home station via get_alerts elevator_alerts
- Display next-train countdowns on a smart home display by polling get_departures for a saved station_code
- Aggregate planned_service_advisories from get_alerts to surface weekend or holiday schedule changes to users
- Cross-reference escalator_alerts with station_code to warn wheelchair or mobility-aid users before they travel
- Monitor current_service_alerts messages in get_alerts to detect active disruptions and surface them in a commute app
- Enumerate all valid station codes once from get_stations to populate a station picker UI without hardcoding values
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.