Skip to main content
GET
https://www.mtaapi.dev
/
api
/
v1
/
subway
/
arrival-board
Get a nearby subway arrival board
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://www.mtaapi.dev/api/v1/subway/arrival-board', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
[
  {
    "station": {
      "id": "<string>",
      "name": "<string>",
      "displayName": "<string>",
      "lat": 123,
      "lon": 123,
      "parentId": "<string>"
    },
    "distanceMeters": 123,
    "directions": [
      {
        "arrivals": [
          {
            "route": {
              "id": "<string>",
              "shortName": "<string>",
              "longName": "<string>",
              "type": 123,
              "color": "<string>",
              "textColor": "<string>"
            },
            "stop": {
              "id": "<string>",
              "name": "<string>",
              "displayName": "<string>",
              "lat": 123,
              "lon": 123,
              "parentId": "<string>"
            },
            "arrivalTime": "<string>",
            "minutes": 123,
            "realtime": true,
            "source": "<string>",
            "destination": "<string>",
            "displayDirection": "<string>",
            "headsign": "<string>",
            "departureTime": "<string>",
            "tripId": "<string>",
            "raw": "<unknown>"
          }
        ],
        "headsign": "<string>"
      }
    ]
  }
]

Documentation Index

Fetch the complete documentation index at: https://mtaapi.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Returns the nearest subway stations to a lat / lon, with each station’s upcoming arrivals already grouped by direction. It combines nearby-station discovery and arrivals into one request — ideal for a lobby departure board or a “stations near me” screen. Control the board with limitStations (max 20, default 5) and limitArrivals per direction (max 10, default 3). Pass an optional route to restrict every station to a single line. Each entry is { station, distanceMeters, directions: [{ direction, headsign?, arrivals[] }] }.

SDK

const board = await mta.subway.arrivalBoard({
  lat: 40.7356,
  lon: -73.9906,
  limitStations: 5,
  limitArrivals: 3,
})
See the Arrival Boards guide for an end-to-end walkthrough.

Authorizations

Authorization
string
header
required

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

Query Parameters

lat
number
required
Required range: -90 <= x <= 90
lon
number
required
Required range: -180 <= x <= 180
route
string
Minimum string length: 1
radiusMeters
number
Required range: x >= 1
limitStations
number
Required range: 1 <= x <= 20
limitArrivals
number
Required range: 1 <= x <= 10
includeRaw
boolean

Response

200 - application/json

Response for status 200

station
object
required
distanceMeters
number
required
directions
object[]
required