OPENBART

REAL-TIME TRANSIT SYSTEMS

SECTION 1.0

JAN 2025

OVERVIEW

The OpenBART API provides real-time transit data for BART (Bay Area Rapid Transit) using the GTFS Realtime specification. All endpoints return JSON responses with current vehicle positions, trip updates, and service alerts.

ENDPOINTS

[GET] /bart/snapshots

Retrieve paginated list of data snapshots with search filters.

page
Page number (default: 1)
limit
Results per page (default: 20, max: 100)
finished
Filter by completion status (true/false)
from
Filter by start date (ISO 8601 format)
to
Filter by end date (ISO 8601 format)
RESPONSE JSON STATUS 200 OK DATA { "snapshots": [ { "id": 123, "feed_timestamp": "2025-01-17T12:00:00Z", "entities_count": 42, "finished": true } ], "pagination": { "page": 1, "limit": 20, "total": 100, "total_pages": 5, "has_next": true, "has_prev": false } }
[GET] /bart/trip-updates

Retrieve real-time trip updates for all active trains.

snapshot
Snapshot ID (optional, defaults to latest finished)
RESPONSE JSON STATUS 200 OK DATA { "snapshot": { "id": 123, "timestamp": "2025-01-17T12:00:00Z", "feed_version": "2.0" }, "trip_updates": [ { "trip": { "trip_id": "...", "route_id": "...", "headsign": "..." }, "vehicle": { "id": "...", "label": "..." }, "delay": 0, "stop_time_updates": [...] } ] }
[GET] /bart/vehicle-positions

Retrieve current positions of all active vehicles in the system.

snapshot
Snapshot ID (optional, defaults to latest finished)
RESPONSE JSON STATUS 200 OK DATA { "snapshot": { "id": 123, "timestamp": "2025-01-17T12:00:00Z" }, "vehicle_positions": [ { "vehicle": { "id": "...", "label": "..." }, "position": { "latitude": 37.7749, "longitude": -122.4194 }, "current_status": "IN_TRANSIT_TO" } ] }
[GET] /bart/departures/:station

Retrieve upcoming departures for a specific station. Replace :station with the station code (e.g., EMBR, MONT, POWL).

snapshot
Snapshot ID (optional, defaults to latest finished)
RESPONSE JSON STATUS 200 OK DATA { "station": "EMBR", "station_name": "Embarcadero", "platforms": ["1", "2"], "departures": [ { "destination": "Richmond", "route": { "route_id": "...", "route_name": "..." }, "platform": "1", "minutes": 3, "delay": 0 } ] }
[GET] /bart/alerts

Retrieve current service alerts affecting the transit system.

snapshot
Snapshot ID (optional, defaults to latest finished)
RESPONSE JSON STATUS 200 OK DATA { "snapshot": { "id": 123, "timestamp": "2025-01-17T12:00:00Z" }, "alerts": [ { "alert_id": "...", "header": "Service Alert", "description": "...", "effect": "MODIFIED_SERVICE", "affected_routes": [...], "affected_stops": [...] } ] }

RESPONSE CODES

200 OK
Request successful. Data returned in response body.
404 NOT FOUND
Requested resource does not exist.
500 INTERNAL ERROR
Server error. Contact system administrator if error persists.

STATION CODES

12TH12th St. Oakland City Center
16TH16th St. Mission
19TH19th St. Oakland
24TH24th St. Mission
ANTCAntioch
ASHBAshby
BALBBalboa Park
BAYFBay Fair
CASTCastro Valley
CIVCCivic Center/UN Plaza
COLSColiseum
COLMColma
CONCConcord
DALYDaly City
DBRKDowntown Berkeley
DUBLDublin/Pleasanton
DELNEl Cerrito del Norte
PLZAEl Cerrito Plaza
EMBREmbarcadero
FRMTFremont
FTVLFruitvale
GLENGlen Park
HAYWHayward
LAFYLafayette
LAKELake Merritt
MCARMacArthur
MLBRMillbrae
MONTMontgomery St.
NBRKNorth Berkeley
NCONNorth Concord/Martinez
OAKLOakland Int'l Airport
ORINOrinda
PITTPittsburg/Bay Point
PCTRPittsburg Center
PHILPleasant Hill/Contra Costa
POWLPowell St.
RICHRichmond
ROCKRockridge
SBRNSan Bruno
SFIASan Francisco Int'l Airport
SANLSan Leandro
SHAYSouth Hayward
SSANSouth San Francisco
UCTYUnion City
WARMWarm Springs/South Fremont
WCRKWalnut Creek
WDUBWest Dublin/Pleasanton
WOAKWest Oakland

ROUTES

RED LINE - Richmond to Millbrae/SFO
ORANGE LINE - Richmond to Berryessa
YELLOW LINE - Antioch to SFO/Millbrae
GREEN LINE - Berryessa to Daly City
BLUE LINE - Dublin/Pleasanton to Daly City

NOTES

All timestamps are provided in ISO 8601 format. Data is captured in snapshots that are marked as finished once processing completes. Response times are typically under 100ms.
Snapshots represent point-in-time captures of the GTFS-RT feed. All endpoints default to the latest finished snapshot unless a specific snapshot ID is provided via the ?snapshot parameter.
Station codes follow BART's official four-letter naming convention. Use the codes listed above when making API requests to the /bart/departures/:station endpoint.
Delay values are provided in seconds. Positive values indicate the vehicle is running behind schedule. Negative values indicate the vehicle is ahead of schedule.