Discover/bart.gov API
live

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.

Endpoints
3
Updated
27d ago
Try it

No input parameters required.

api.parse.bot/scraper/a3c68648-205d-4b57-a97b-b4d0bf6edcab/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/a3c68648-205d-4b57-a97b-b4d0bf6edcab/get_stations' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 3 totalclick to expand

Fetch the list of all BART stations and their abbreviated codes. These codes are required for use with the get_departures endpoint.

Input

No input parameters required.

Response
{
  "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.

Common use cases
  • 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
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 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.

Frequently asked questions
Does BART have an official developer API?+
Yes. BART publishes a free official REST API at https://api.bart.gov/docs/overview/index.aspx. It requires a free API key and covers real-time estimates, schedules, fares, and route information.
What does get_departures return for each train, and can I filter by destination?+
Each entry in the departures array includes a destination name and estimates (countdown times and car counts). The endpoint returns all departures across all platforms for the requested station; there is no server-side filter by destination. Filter client-side using the destination field after fetching the full response.
Does the API cover historical departure data or only the current moment?+
The API covers only live, current-state data. get_departures reflects the latest estimates as of the updated timestamp, and get_alerts reflects conditions as of as_of. No historical or archival departure records are exposed. You can fork this API on Parse and revise it to store responses over time and build a historical dataset.
Does the API include fare information or trip planning between two stations?+
Not currently. The API covers station listings, real-time departure estimates, and service alerts. Fare data and multi-station trip planning are not included in any of the three endpoints. You can fork it on Parse and revise to add a fare or trip-planning endpoint.
How current is the departure data returned by get_departures?+
Each response includes an updated timestamp indicating when the departure estimates were last refreshed. Freshness depends on the underlying BART system feed; under normal conditions this is updated every minute or less, but the timestamp in the response is the authoritative indicator of data age.
Page content last updated . Spec covers 3 endpoints from www.bart.gov.
Related APIs in Maps GeoSee all →
mbta.com API
Track real-time subway, bus, and commuter rail departures across Greater Boston, check schedules and service alerts, and find detailed information about routes and stops. Plan your commute with up-to-the-minute MBTA transit data and never miss your connection.
nationalrail.co.uk API
Check live train departure and arrival times at UK stations, search for specific stations, and get real-time service disruption alerts. Stay informed about rail service delays and changes to plan your journeys efficiently.
amtrak.com API
Search for Amtrak trains across stations, compare fares, and discover discounts to plan your rail journey with current pricing and availability. Get detailed train information, autocomplete station names, and find the cheapest routes for your travel dates.
bahn.com API
Search German train schedules and stations, find connections between destinations, and compare ticket prices across Deutsche Bahn routes. Get real-time station information and transit association details to plan your train journey efficiently.
rfi.it API
Check real-time train schedules and station information across Italy's railway network, search for stations, and get live alerts about delays and service disruptions. Monitor train circulation status and access detailed station mappings to plan your journeys efficiently.
bahn.de API
bahn.de API
citymapper.com API
Get real-time transit information including live stop arrivals, service status, and line details across major cities worldwide. Search for nearby transit options and stay informed with service alerts to plan your commute efficiently.
ratp.fr API
Monitor real-time traffic conditions and service disruptions across Paris's RATP and RER networks to plan your commute efficiently. Get instant updates on line statuses, delays, and service alerts for all metro and regional rail lines.
BART Real-Time Departures API | bart.gov · Parse