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": [...]
}
]
}
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.