Bay Area Rapid Transit

API

Real-time BART station info and arrival predictions API

Visit Website

Overview

The Bay Area Rapid Transit (BART) API provides RESTful endpoints for real-time train arrival predictions, station metadata (names, GPS coordinates, addresses), schedule details, and service alerts. It supports both JSON and XML response formats, with JSON being widely used. Key endpoints include /api/etd.aspx (arrival times), /api/stn.aspx (station details), /api/sched.aspx (trip schedules), and /api/bsa.aspx (service alerts). Use cases include building commuter apps, integrating transit data into navigation tools, displaying live arrival times on community websites, and creating tourist transit guides for the San Francisco Bay Area.

Example Integration (JavaScript)

script.js JS

fetch('http://api.bart.gov')
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));

Key Features

  • RESTful
  • JSON/XML support
  • Real-time arrival predictions
  • Station metadata
  • Service alerts
  • Schedule access

Frequently Asked Questions

? Is Bay Area Rapid Transit API free to use?

Yes, the BART API is completely free—you only need to register for a free API key from the BART API portal to access its endpoints.

? Does it require an API Key?

Yes, a free API key is mandatory for all requests. You can obtain one by registering at http://api.bart.gov.

? What is the response format?

The API supports both JSON and XML. Specify your preferred format using the 'format' parameter (e.g., format=json or format=xml) in requests.

Top Alternatives

San Francisco Muni API Search Google
Caltrain Real-Time API Search Google
Transitland API Compare

People Also Ask about Bay Area Rapid Transit

Bay Area Rapid Transit vs San Francisco Muni APIBay Area Rapid Transit vs Caltrain Real-Time APIBay Area Rapid Transit vs Transitland API Bay Area Rapid Transit 2025 review

Tool Info

Pricing Free
Category Transportation
Platform Public API

Pros

  • Free API key (no cost)
  • Reliable real-time data
  • Comprehensive transit endpoints
  • Well-documented

Cons

  • Rate-limited (1000 requests/minute)
  • Mandatory API key registration
  • Limited historical data access

More Transportation Tools