Stations and predicted arrivals for BART
Access BART train schedules, real-time arrival estimates, station information, and service advisories using the legacy API.
import requests
api_key = 'YOUR_API_KEY'
station_abbr = 'EMBR' # Example: Embarcadero station
url = f'http://api.bart.gov/api/etd.aspx?cmd=etd&orig={station_abbr}&key={api_key}&json=y'
response = requests.get(url)
response.raise_for_status() # Raise an exception for HTTP errors
print(response.json())Last 50 checks (10 min intervals)