Skip to main content
GET
The mta.bus namespace provides access to real-time bus data sourced from the MTA’s Bus Time API. Use mta.bus.arrivals to get the next predicted buses at a specific stop, and mta.bus.vehicles to see where every active bus on a route is right now, including its coordinates, bearing, next stop, and passenger occupancy status.

mta.bus.arrivals(params)

Returns upcoming bus arrival predictions for a single stop. Pass an optional route to limit results to one route serving that stop.

Parameters

stopId string required The MTA bus stop ID to query (for example, '308214'). Look up stop IDs with mta.stops.near or from the MTA’s published stop data. route string Optional route filter (for example, 'M23'). When omitted, all routes serving the stop are returned. limit number Maximum number of upcoming arrivals to return. Must be between 1 and 100. includeRaw boolean When true, the response includes the raw upstream feed payload alongside the normalized arrivals. Useful for debugging or accessing fields not yet surfaced by the normalized API.

Code example

mta.bus.vehicles(params)

mta.bus.vehicles(params)

Returns active bus vehicles. Pass route to scope to a single route, or vehicleId to look up a specific vehicle. Data is refreshed approximately every 30 seconds and reflects the most recent position reported by each vehicle’s onboard GPS unit.

Parameters

route string Optional bus route ID to filter on (for example, 'B63' for the Brooklyn route along Fifth Avenue, or 'M15' for the Manhattan crosstown route on First and Second Avenue). Route IDs are case-sensitive and match MTA’s published route identifiers. vehicleId string Optional MTA vehicle ID to look up a single vehicle (for example, 'MTA_8741'). limit number Maximum number of vehicles to return. Must be between 1 and 100. includeRaw boolean When true, the response includes the raw upstream feed payload alongside the normalized vehicle list.

TypeScript signature

Response fields

route string required The route ID that was queried, echoed back in the response. vehicles object[] required An array of active vehicles on the route. Returns an empty array if no vehicles are currently in service. vehicles properties vehicleId string required The unique identifier for the vehicle, matching the MTA’s fleet numbering system. lat number required The vehicle’s current latitude in decimal degrees (WGS 84). lon number required The vehicle’s current longitude in decimal degrees (WGS 84). bearing number required The vehicle’s direction of travel in degrees, measured clockwise from true north (0–359). nextStop string required The name or ID of the next scheduled stop for this vehicle. occupancyStatus string required The current passenger load level. Possible values: 'EMPTY', 'MANY_SEATS_AVAILABLE', 'FEW_SEATS_AVAILABLE', 'STANDING_ROOM_ONLY', 'CRUSHED_STANDING_ROOM_ONLY', 'FULL'.

Code example

Example response

Use bearing together with lat and lon to render animated bus icons on a map that point in the correct direction of travel.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

route
string
Minimum string length: 1
vehicleId
string
Minimum string length: 1
limit
number
Required range: 1 <= x <= 100
includeRaw
boolean

Response

200 - application/json

Response for status 200

mode
enum<string>
required
Available options:
subway,
bus,
path,
nj-transit-rail,
lirr,
metro-north
route
object
required
source
string
required
vehicleId
string
tripId
string
stop
object
lat
number
lon
number
bearing
number
destinationName
string
recordedAt
string
raw
any