canonical: https://jentic.com/apis/api.bart.gov/bart

# Bart Gov BART Legacy API

Jentic publishes the only available OpenAPI specification for BART Legacy API, keeping it validated and agent-ready. The BART Legacy API exposes real-time and scheduled transit data for the San Francisco Bay Area Rapid Transit system. It returns estimated departures for a station, station details and lists, route information, and schedules, along with current service advisories. Every operation is a read, so an agent can plan trips and report delays without changing anything on the service.

## For AI agents

Retrieve BART real-time estimated departures, station and route information, schedules, and service advisories for the San Francisco Bay Area.

## Scope

Read-only BART transit data for the San Francisco Bay Area. Does not sell tickets, handle payments, or cover transit systems outside BART.

## Capabilities

- Get real-time estimated departures for a station
- Retrieve station details and the list of stations
- Look up route information for the system
- Read schedules for trips and routes
- Get current service advisories and delays

## Use cases

### Real-Time Departure Assistant

A commuting assistant reports the next trains leaving a station so a rider knows when to leave. It reads the estimated departures for the station and formats the times and destinations. Through Jentic the agent finds the departures operation and calls it with the station abbreviation.

Example prompt: Get the estimated departures for a station and report the next trains and their destinations

### Trip Planning with Schedules

A trip-planning agent builds an itinerary using BART schedules and route information. It reads the routes and schedules to lay out connections and times. This lets a planner suggest departures that line up with a rider's target arrival.

Example prompt: Read the schedule and routes to plan a trip between two stations at a target time

### Service Disruption Alerts

An alerting agent watches for BART service advisories and notifies riders of delays. It polls the advisories operation and surfaces any active disruption. Riders get a heads-up before they reach the platform.

Example prompt: Poll service advisories and notify a rider when a new disruption is active

### Station Directory Lookup

A mapping agent lists BART stations and pulls details for one selected by a user. It reads the station list and then the details for a chosen station. This backs a picker or map overlay with authoritative station data.

Example prompt: List the BART stations and retrieve the details for a selected station

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/etd.aspx` | Get real-time estimated departures |
| GET | `/stn.aspx` | Get station information |
| GET | `/sched.aspx` | Get schedules |
| GET | `/route.aspx` | Get route information |
| GET | `/bsa.aspx` | Get service advisories |
| GET | `/version.aspx` | Get the API version |

## Key resources

- **Departures** — Real-time estimated departures for a station
- **Stations** — Station details and the full station list
- **Routes** — Route information for the BART system
- **Schedules** — Trip and route schedules
- **Advisories** — Current service advisories and delays

## Why Jentic

- **Setup:** Wiring BART by hand means managing its key query parameter against api.bart.gov and threading it through every departures and schedule call yourself. Through Jentic you install once, import BART from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** BART is read-only, so a rule limits your agent to the operations it needs, such as departures and advisories. You choose which operations it may call, so schedules or routes are included only when you add them.
- **Credential handling:** Your BART API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get real-time departures' or 'check service advisories', and Jentic returns the matching BART operation with its parameters so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Navitia** — Navitia is a multi-modal transit routing API covering many networks, a broader alternative to BART's single system.
- **MTA Developer API** — The MTA API provides transit data for New York, an alternative regional transit source.
- **Transit API** — Transit aggregates real-time data across many agencies, an alternative for multi-agency coverage.
- **511 SF Bay Transit API** — 511 SF Bay covers Bay Area transit including BART alongside buses and ferries for a regional picture.

## FAQ

### Why is there no official OpenAPI spec for BART Legacy API?

BART does not publish an OpenAPI specification for its legacy API. Jentic generates and maintains this spec so that AI agents and developers can call the BART Legacy API via structured tooling. It is validated against the live API and kept up to date. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### What authentication does the BART Legacy API use?

The BART Legacy API authenticates with an API key passed as the key query parameter. Through Jentic, that key is stored encrypted by your own Jentic One instance and injected at execution time, so it never enters the agent's prompt or logs.

### Can I get real-time departures from the BART Legacy API?

Yes. The estimated departures operation returns the next trains leaving a station with their destinations and times. An agent can call it with a station abbreviation to report live departure information to a rider.

### What are the rate limits for the BART Legacy API?

The OpenAPI spec does not specify rate limits for the BART Legacy API. Check the BART developer documentation at https://api.bart.gov/docs/overview/index.aspx for current limits, and back off when you receive a 429 response.

### How do I get station departures through Jentic?

Search Jentic for 'get real-time departures', import BART from the API Directory, and store your key once. Jentic returns the departures operation with its station parameter so your agent can call it directly and read back the next trains.

### Can I limit what my agent is allowed to do with the BART Legacy API?

Yes. The API is read-only, so you write a rule that allows the agent only the operations it needs, such as departures and advisories, leaving schedules or routes out unless you add them. Because Jentic One is self-hosted, those rules and the audit log of every call stay on your own infrastructure.

### Is there a BART Legacy API MCP server?

You do not need an MCP server to give your agent the BART Legacy API. Jentic connects it directly from the API Directory: import it, store your key once, and your agent can read departures, schedules, and advisories. That also keeps your agent's context free of an extra server's tool definitions.
