MBTA

App · 7 actions

Boston's public transit from the MBTA: realtime predictions for the next train or bus at a stop, timetables, service alerts, live vehicle positions, and the routes and stops of the subway, Green Line, buses, commuter rail and ferries. No account or API key required.

Actions

ActionWhat it does
Get predictionsGet realtime predictions for the next trains, buses or boats at a stop, soonest first: route, destination, predicted arrival and departure, minutes away and any cancellation.
List alertsList MBTA service alerts (delays, shuttles, station closures, elevator outages and notices), most severe first, optionally for one route, stop or kind of service, and only those in effect now.
List route patternsList the different ways an MBTA route's trips run (each branch, short turn and diversion) with where they go and how typical each is.
List routesList the MBTA's routes (subway lines, Green Line branches, buses, commuter rail lines and ferries) with their colors and the names and destinations of their two directions.
List schedulesList scheduled arrival and departure times at a stop or along a route for a day, optionally between two times of day, earliest first.
List stopsList the stations along an MBTA route, or the stations and stops near a point (nearest first), with their ids, addresses, coordinates and wheelchair access.
List vehiclesSee where every vehicle on an MBTA route is right now: its position, the stop it is at or heading to, its destination and how full it is.

Get predictions

Get realtime predictions for the next trains, buses or boats at a stop, soonest first: route, destination, predicted arrival and departure, minutes away and any cancellation. No API key required.

Inputs

StopstoptextRequired
The stop or station id, e.g. 'place-pktrm' for all of Park Street. Find ids with List stops.
Routeroutetext
Only include this route id. Leave empty for all.
Directiondirection_idnumber
Only include trips going one way. Each route names its two directions (see List routes). Leave empty for both.One of: 0 (Direction 0 (e.g. southbound on the Red Line)), 1 (Direction 1 (e.g. northbound on the Red Line)).
Number of resultslimitnumber
How many predictions to return, 1 to 100. Defaults to 10.From 1 to 100.

Outputs

countnumber
How many predictions, soonest first came back.
predictionslist
The predictions, soonest first.
stoptext
The stop id (or ids) the predictions are for.
Example output
{
  "count": 1,
  "predictions": [
    {
      "arrival_time": "2026-10-16T14:34:58-04:00",
      "departure_time": "2026-10-16T14:36:33-04:00",
      "direction": "South",
      "direction_id": 0,
      "headsign": "Braintree",
      "is_cancelled": false,
      "minutes_away": 1,
      "platform_name": "Ashmont/Braintree",
      "route_id": "Red",
      "route_name": "Red Line",
      "schedule_relationship": null,
      "status": null,
      "stop_id": "70075",
      "stop_name": "Park Street",
      "trip_id": "77886131",
      "vehicle_id": "R-548C2A62"
    }
  ],
  "stop": "place-pktrm"
}

List alerts

List MBTA service alerts (delays, shuttles, station closures, elevator outages and notices), most severe first, optionally for one route, stop or kind of service, and only those in effect now. No API key required.

Inputs

Routeroutetext
Only include alerts for this route id.
Stopstoptext
Only include alerts for this stop or station id.
Kind of serviceroute_typetext
Only include this kind of service. Leave empty for all of them.One of: light_rail (Light rail (Green Line, Mattapan trolley)), subway (Subway (Red, Orange and Blue Lines)), commuter_rail (Commuter rail), bus (Bus (including Silver Line)), ferry.
In effect now onlyactive_nowtrue/false
Only include alerts in effect right now, leaving out upcoming ones.Default: false.
Number of resultslimitnumber
How many alerts to return, 1 to 200. Defaults to 20.From 1 to 200.

Outputs

alertslist
The alerts, most severe first.
countnumber
How many alerts, most severe first came back.
Example output
{
  "alerts": [
    {
      "active_periods": [
        {
          "end": null,
          "start": "2026-10-07T15:03:54-04:00"
        }
      ],
      "affected_route_ids": [
        "Red"
      ],
      "affected_stop_ids": [
        "70105",
        "place-brntn"
      ],
      "cause": "Unknown cause",
      "created_at": "2026-10-07T15:03:54-04:00",
      "description": "Affected stations:\r\nBraintree",
      "effect": "Notice",
      "header": "Braintree Station notice: Premium parking is available at this location. You can buy premium passes and permits using SpotHero.",
      "id": "1037418",
      "lifecycle": "Ongoing",
      "service_effect": "Red Line notice",
      "severity": 1,
      "short_header": null,
      "timeframe": "ongoing",
      "updated_at": "2026-10-07T15:03:54-04:00",
      "url": "http://www.mbta.com/SpotHeroBraintree"
    }
  ],
  "count": 1
}

List route patterns

List the different ways an MBTA route's trips run (each branch, short turn and diversion) with where they go and how typical each is. No API key required.

Inputs

RouteroutetextRequired
The route id, e.g. 'Red' or '1'.
Directiondirection_idnumber
Only include trips going one way. Each route names its two directions (see List routes). Leave empty for both.One of: 0 (Direction 0 (e.g. southbound on the Red Line)), 1 (Direction 1 (e.g. northbound on the Red Line)).

Outputs

countnumber
How many route patterns, typical ones first came back.
route_patternslist
The route patterns, typical ones first.
Example output
{
  "count": 1,
  "route_patterns": [
    {
      "direction": "South",
      "direction_id": 0,
      "headsign": "Braintree",
      "id": "Red-3-0",
      "is_canonical": true,
      "name": "Alewife - Braintree",
      "route_id": "Red",
      "time_description": null,
      "typicality": 1,
      "typicality_label": "Typical"
    }
  ]
}

List routes

List the MBTA's routes (subway lines, Green Line branches, buses, commuter rail lines and ferries) with their colors and the names and destinations of their two directions. Filter by kind of service or by a stop to see what serves it. No API key required.

Inputs

Kind of serviceroute_typetext
Only include this kind of service. Leave empty for all of them.One of: light_rail (Light rail (Green Line, Mattapan trolley)), subway (Subway (Red, Orange and Blue Lines)), commuter_rail (Commuter rail), bus (Bus (including Silver Line)), ferry.
Stopstoptext
Only include routes that serve this stop or station id. Leave empty for all routes.
Number of resultslimitnumber
How many routes to return, 1 to 200. Defaults to 20.From 1 to 200.

Outputs

countnumber
How many routes, in the MBTA's own order came back.
routeslist
The routes, in the MBTA's own order.
Example output
{
  "count": 1,
  "routes": [
    {
      "color": "#DA291C",
      "description": "Rapid Transit",
      "directions": [
        {
          "destination": "Ashmont/Braintree",
          "direction_id": 0,
          "name": "South"
        },
        {
          "destination": "Alewife",
          "direction_id": 1,
          "name": "North"
        }
      ],
      "fare_class": "Rapid Transit",
      "id": "Red",
      "long_name": "Red Line",
      "name": "Red Line",
      "route_type": "Subway",
      "short_name": null,
      "text_color": "#FFFFFF",
      "url": "https://www.mbta.com/schedules/Red"
    }
  ]
}

List schedules

List scheduled arrival and departure times at a stop or along a route for a day, optionally between two times of day, earliest first. No API key required.

Inputs

Stopstoptext
The stop or station id. Give a stop, a route, or both.
Routeroutetext
Only include this route id.
Directiondirection_idnumber
Only include trips going one way. Each route names its two directions (see List routes). Leave empty for both.One of: 0 (Direction 0 (e.g. southbound on the Red Line)), 1 (Direction 1 (e.g. northbound on the Red Line)).
Dateservice_datedate
The day to list, within the current timetable. Defaults to today.
From timemin_timetext
Only include times from this time of day, e.g. 07:30 (Boston time).
Until timemax_timetext
Only include times up to this time of day, e.g. 09:00.
Number of resultslimitnumber
How many times to return, 1 to 200. Defaults to 20.From 1 to 200.

Outputs

countnumber
How many scheduled times, earliest first came back.
scheduleslist
The scheduled times, earliest first.
Example output
{
  "count": 1,
  "schedules": [
    {
      "arrival_time": "2026-10-16T18:03:00-04:00",
      "departure_time": "2026-10-16T18:03:00-04:00",
      "direction": "South",
      "direction_id": 0,
      "drop_off": "Regular",
      "headsign": "Braintree",
      "is_timepoint": false,
      "pickup": "Regular",
      "platform_name": "Ashmont/Braintree",
      "route_id": "Red",
      "route_name": "Red Line",
      "stop_id": "70075",
      "stop_name": "Park Street",
      "stop_sequence": 70,
      "trip_id": "77886154"
    }
  ]
}

List stops

List the stations along an MBTA route, or the stations and stops near a point (nearest first), with their ids, addresses, coordinates and wheelchair access. Use a stop id from here in Get predictions or List schedules. No API key required.

Inputs

Routeroutetext
List the stations on this route id. Give this, or a latitude and longitude, or both.
Latitudelatitudenumber
Find stops near this latitude (with longitude).From -90 to 90.
Longitudelongitudenumber
Find stops near this longitude (with latitude).From -180 to 180.
Within (miles)radius_milesnumber
How far from the point to look, in miles. Defaults to 0.5.From 0.01 to 10.0.
Number of resultslimitnumber
How many stops to return, 1 to 200. Defaults to 20.From 1 to 200.

Outputs

countnumber
How many stations and stops came back.
stopslist
The stations and stops.
Example output
{
  "count": 1,
  "stops": [
    {
      "address": "Alewife Brook Pkwy and Cambridge Park Dr, Cambridge, MA 02140",
      "description": null,
      "id": "place-alfcl",
      "kind": "station",
      "latitude": 42.39583,
      "longitude": -71.141287,
      "municipality": "Cambridge",
      "name": "Alewife",
      "parent_station_id": null,
      "platform_name": null,
      "url": "https://www.mbta.com/stops/place-alfcl",
      "vehicle_type": null,
      "wheelchair_accessible": true
    }
  ]
}

List vehicles

See where every vehicle on an MBTA route is right now: its position, the stop it is at or heading to, its destination and how full it is. No API key required.

Inputs

RouteroutetextRequired
The route id, e.g. 'Red' or '1'.
Directiondirection_idnumber
Only include trips going one way. Each route names its two directions (see List routes). Leave empty for both.One of: 0 (Direction 0 (e.g. southbound on the Red Line)), 1 (Direction 1 (e.g. northbound on the Red Line)).
Number of resultslimitnumber
How many vehicles to return, 1 to 200. Defaults to 50.From 1 to 200.

Outputs

countnumber
How many vehicles came back.
vehicleslist
The vehicles.
Example output
{
  "count": 1,
  "vehicles": [
    {
      "bearing": 350.0,
      "carriage_count": 6,
      "current_status": "Incoming at",
      "direction": "North",
      "direction_id": 1,
      "headsign": "Alewife",
      "id": "R-548C3BF7",
      "in_revenue_service": true,
      "label": "1825",
      "latitude": 42.37293,
      "longitude": -71.11652,
      "occupancy": null,
      "platform_name": "Alewife",
      "route_id": "Red",
      "route_name": "Red Line",
      "speed_mps": null,
      "stop_id": "70068",
      "stop_name": "Harvard",
      "trip_id": "NONREV-1580831388",
      "updated_at": "2026-10-16T14:34:37-04:00"
    }
  ]
}

On this page