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
10d 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 →
idealista.pt API
Search and filter property listings across Portugal by location, price, and size, then access detailed information about each property including its characteristics and pricing history. Monitor how property prices change over time to help you make informed decisions about buying or selling real estate.
homedepot.com API
Search and browse Home Depot's product catalog to compare pricing, check real-time availability, and review detailed product specifications. Find products across all categories, look up store locations and hours, and check fulfillment options including in-store pickup and delivery.
zocdoc.com API
Search for doctors and medical practices on Zocdoc by specialty and location. Retrieve provider profiles, accepted insurance, office locations, patient reviews, and appointment availability.
opentable.com API
Search for restaurants across the US with ratings, reviews, photos, and pricing information, plus get real-time availability and autocomplete suggestions as you type. Check reservation openings and explore detailed restaurant features to find and book your perfect dining experience.
zapimoveis.com.br API
Search and filter real estate listings across Brazil on ZAP Imóveis — the country's largest property portal. Retrieve listings for sale or rent with detailed attributes including price, location, size, bedrooms, bathrooms, parking, and amenities. Supports location autocomplete, property type discovery, and full listing detail retrieval.
immobiliare.it API
Search Italian property listings for sale or rent, browse real estate agencies, and explore price trends across Italian cities — all via immobiliare.it.
angieslist.com API
Search for home service professionals on Angi and access their detailed profiles including reviews, contact information, and photos to find the right contractor for your project. Quickly compare multiple service providers by viewing their ratings, customer feedback, and verified business details all in one place.
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.