canonical: https://jentic.com/apis/api-v3.mbta.com/mbta

# Api V3 Mbta MBTA V3 API

The MBTA V3 API provides schedule, real-time vehicle position, and service alert information for the Massachusetts Bay Transportation Authority's bus, subway, commuter rail, and ferry network across the Greater Boston area. Responses follow the JSON:API specification with sparse fieldsets, filtering, and included relationships, so clients can request exactly the data they need. The API exposes resources for routes, stops, trips, vehicles, predictions, schedules, alerts, and shapes. Anonymous access is rate-limited; an x-api-key header lifts the cap for higher-volume agents.

## For AI agents

Look up MBTA bus, subway, commuter rail, and ferry schedules, real-time vehicle positions, and service alerts for the Greater Boston transit network.

## Scope

Does not handle ticketing, fare payment, or rideshare booking - use for MBTA schedule, real-time, and alert data only.

## Capabilities

- Fetch real-time arrival predictions for any MBTA stop using the /predictions endpoint
- Query live vehicle positions and headings across the bus, subway, and commuter rail fleet via /vehicles
- Retrieve scheduled departures filtered by route, stop, and service date through /schedules
- Look up route metadata, colour, and direction descriptions for the rapid transit and bus network
- Resolve stops and parent stations along with accessibility and platform information
- Pull active service alerts and disruption notices affecting specific routes or stops

## Use cases

### Real-time arrival board

Build a public arrival board or mobile widget that surfaces upcoming bus, subway, or ferry departures for a chosen MBTA stop. The /predictions endpoint returns ETA, direction, and status for every vehicle approaching the stop, while /alerts surfaces disruptions that affect those predictions. The combined response keeps riders informed of delays, detours, and platform changes within a few seconds of the event.

Example prompt: Fetch /predictions filtered by stop=place-pktrm and direction_id=0, then return the next three departures with route, headsign, and minutes-until-arrival.

### Trip planning and routing

Power a trip planner that combines /routes, /stops, and /schedules to suggest journeys across the MBTA network for a given origin, destination, and time. The JSON:API include parameter pulls related resources in a single call, so an agent can answer a routing question without chaining many requests. Useful for travel assistants, accessibility-focused planners, and commuter dashboards.

Example prompt: Call /routes for type=2 (commuter rail), then /schedules with route=CR-Worcester and date=2026-06-09 to list outbound departures from Boston South Station.

### Service disruption monitoring

Run an automated monitor that polls /alerts and notifies operations or community channels when new high-severity alerts appear on specific routes. Each alert object includes the affected lifecycle, cause, effect, and a list of informed entities (route, stop, trip), so an agent can route the right notice to the right audience. Reduces the manual work of scanning the MBTA alerts page.

Example prompt: Poll /alerts every 60 seconds filtered by route=Red and severity>=7, and post any new alert title and effect to a Slack channel.

### Agent integration via Jentic

Expose MBTA real-time data as a tool that a conversational agent can call when a user asks about Boston transit. Through Jentic the agent receives the operation schema for /predictions, /routes, /stops, /vehicles, and /alerts and can call the right one based on the user's intent without hand-coded glue. The MBTA API key is stored once in your Jentic One instance and never appears in the agent's prompt.

Example prompt: Search Jentic for 'get next bus arrival', load the MBTA /predictions operation, and execute it for stop=70061 returning the ETA list to the user.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /predictions | Real-time arrival and departure predictions |
| GET | /vehicles | Live vehicle positions across the network |
| GET | /routes | List all bus, subway, rail, and ferry routes |
| GET | /stops | Stops and stations with accessibility metadata |
| GET | /schedules | Scheduled stop times for trips on a date |
| GET | /trips | Trip details and shape associations |

## Key resources

- **Predictions** — Real-time predicted arrival and departure times for stops and trips
- **Vehicles** — Live position, bearing, and status for each MBTA vehicle
- **Routes** — Bus, subway, commuter rail, and ferry route metadata and styling
- **Stops** — Stops, stations, and parent station relationships with accessibility data
- **Schedules** — Scheduled stop times for trips on a given service date
- **Alerts** — Service alerts, advisories, and disruption notices

## Why Jentic

- **Setup:** Wiring the MBTA V3 API by hand means handling its x-api-key header, targeting the v3 host, and mapping the prediction, schedule, route, and alert routes with their filter parameters yourself. Through Jentic you install once, import MBTA from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** MBTA selects data through query parameters rather than resource ids in the URL path, so you limit the agent to the operations it needs, such as reading predictions, schedules, or stops. Broader operations like vehicles or alerts are only available if you include them in the allowed set.
- **Credential handling:** Your MBTA x-api-key is stored once, encrypted, by your own Jentic One instance and injected as the header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'next bus at an MBTA stop', and Jentic returns the matching MBTA operation with its input schema, including parameters such as stop and direction_id, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **BART Legacy API** — Equivalent real-time and schedule API for Bay Area Rapid Transit instead of Boston
- **Transport for London Unified API** — London transit equivalent covering Tube, bus, rail, and cycle hire
- **Transit App API** — Aggregated multi-agency transit data including MBTA

## FAQ

### What authentication does the MBTA V3 API use?

The MBTA V3 API uses an API key passed in the x-api-key header (or as the api_key query parameter). Anonymous calls are accepted but rate-limited; a key lifts the cap. When called through Jentic the key is stored in your Jentic One instance and injected at execution time, so it never appears in agent prompts.

### Can I get real-time vehicle positions with the MBTA V3 API?

Yes. The /vehicles endpoint returns live latitude, longitude, bearing, current_status, and trip association for every MBTA vehicle in service. Filter by route, trip, or label to narrow the result set, and use the JSON:API include parameter to pull the related route or trip in the same response.

### What are the rate limits for the MBTA V3 API?

Anonymous requests are limited to roughly 20 per minute; authenticated requests with an x-api-key are allowed 1,000 per minute per key. Agents that poll /predictions or /vehicles continuously should always use a key to avoid 429 responses.

### How do I look up the next arrival at an MBTA stop through Jentic?

Search Jentic for 'get next MBTA arrival', load the /predictions operation, and execute it with the stop ID (for example stop=70061 for Park Street southbound) and direction_id. The response is a JSON:API document with arrival_time, departure_time, and the related trip and route resources.

### Does the MBTA V3 API include service alerts?

Yes. The /alerts endpoint returns active and upcoming alerts with cause, effect, severity, lifecycle, and a list of informed entities (route, stop, trip). Filter by route or severity to surface only the alerts that matter to a given trip or dashboard.

### Is the MBTA V3 API free to use?

Yes. The API is provided free of charge by the MBTA, including for commercial use, subject to its terms of service and rate limits. Register at api-v3.mbta.com to obtain an API key.

### Can I limit what my agent is allowed to do with the MBTA V3 API?

Yes. Because you run Jentic One yourself, your own rules decide which MBTA operations the agent may call, so you can allow read-only lookups such as predictions, schedules, stops, and routes while withholding broader operations like vehicles or alerts unless you add them to the allowed set. The MBTA API selects data through query parameters rather than resource IDs in the URL path, so scoping happens at the operation level rather than per record. Your x-api-key is held by your own Jentic One instance and injected at execution time, never appearing in the agent's prompt or logs.
