Overview
The MBTA V3 API is the official public API for the Massachusetts Bay Transportation Authority — Boston's subway, bus, commuter rail, and ferry system. It's free to use, follows the JSON:API specification, and gives you a 50× rate-limit boost when you authenticate with a (free) API key.
Setup guide
Get your API key
- Visit the MBTA Developer Portal and sign up — email plus an organization name is enough.
- Once verified, the portal shows your API key on the dashboard.
- Copy the key value.
Add it to Ingest
In the Ingest UI under Connectors → MBTA, paste the key. Ingest stores it in AWS Secrets Manager under the key token. The runtime sends it as the x-api-key request header on every call.
Mind the limits
Without a key, the MBTA API enforces 20 req/min globally — too low for any production sync. With a registered key, the limit is 1,000 req/min (about 16 req/sec). The Ingest runtime dispatches at 8 req/sec by default and uses AIMD backoff on 429 responses.
The API returns JSON:API-shape envelopes — every response has a top-level data array (or single object) containing resources of the form {id, type, attributes, relationships}. The connector flattens attributes into your Iceberg mart's columns.
Errors with status 400 (malformed request — usually missing a required filter), 403 (key revoked / disabled), 404 (no resource matches), or 406 (unsupported response type) are treated as fatal — fix the cause before retrying.
Pick endpoints
The MBTA endpoints fall into a few groups:
- Static reference data —
routes,stops,lines,route_patterns,services,shapes,trips,facilities. Refresh daily or weekly; this is the schedule and network topology. - Schedule data —
schedules. Pre-published time-of-day plans tied to a service. Best refreshed when the published schedule rotates (a few times per year), unless you're modeling daily expected vs actual. - Real-time —
predictions,vehicles,live_facilities,alerts,stop_events. Dynamic feeds you'd pull on a frequent schedule for live dashboards. Note that some of these endpoints (e.g.predictions,schedules) require a filter and will return 400 without one — your generator model handles the filter parameter.
Supported streams
14 endpoints are available out of the box. Each endpoint syncs into its own Iceberg table in Snowflake.
| Endpoint | Description | Reference |
|---|---|---|
| alerts alerts | – | |
| facilities facilities | – | |
| lines lines | – | |
| live_facilities live_facilities | – | |
| predictions predictions | – | |
| route_patterns route_patterns | – | |
| routes routes | – | |
| schedules schedules | – | |
| services services | – | |
| shapes shapes | – | |
| stop_events stop_events | – | |
| stops stops | – | |
| trips trips | – | |
| vehicles vehicles | – |
Authentication
- Auth type
- API Key
- Sent as header
x-api-key- Provider docs
- www.mbta.com ↗
Performance & limits
- Rate limit
- 20 req/min unauthenticated; 1,000 req/min with a registered API key (free). Ingest dispatches at 8 req/sec by default and lets AIMD tune up. Pagination is offset-based via `page[offset]` and `page[limit]`.