> ## 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.

# mta.subway.arrivalBoard() — nearby subway departure board

> Reference for GET /api/v1/subway/arrival-board. Find nearby subway stations and group their upcoming arrivals by direction in a single request.

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

```typescript theme={null}
const board = await mta.subway.arrivalBoard({
  lat: 40.7356,
  lon: -73.9906,
  limitStations: 5,
  limitArrivals: 3,
})
```

See the [Arrival Boards guide](/guides/arrival-boards) for an end-to-end walkthrough.


## OpenAPI

````yaml GET /api/v1/subway/arrival-board
openapi: 3.0.3
info:
  title: MTA API
  description: Managed, API-key protected access to MTA realtime and static data.
  version: 0.1.0
servers:
  - url: https://www.mtaapi.dev
    description: Production
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: subway
    description: Subway realtime data
  - name: bus
    description: BusTime realtime data
  - name: alerts
    description: Service alerts
  - name: stops
    description: Route-aware static GTFS stop lookup
  - name: system
    description: Health and database status
paths:
  /api/v1/subway/arrival-board:
    get:
      tags:
        - subway
      summary: Get a nearby subway arrival board
      description: >-
        Find nearby subway stations and group upcoming arrivals by direction for
        each station.
      operationId: getApiV1SubwayArrival-board
      parameters:
        - name: lat
          in: query
          required: true
          schema:
            minimum: -90
            maximum: 90
            type: number
        - name: lon
          in: query
          required: true
          schema:
            minimum: -180
            maximum: 180
            type: number
        - name: route
          in: query
          required: false
          schema:
            minLength: 1
            type: string
        - name: radiusMeters
          in: query
          required: false
          schema:
            minimum: 1
            type: number
        - name: limitStations
          in: query
          required: false
          schema:
            minimum: 1
            maximum: 20
            type: number
        - name: limitArrivals
          in: query
          required: false
          schema:
            minimum: 1
            maximum: 10
            type: number
        - name: includeRaw
          in: query
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - station
                    - distanceMeters
                    - directions
                  properties:
                    station:
                      type: object
                      required:
                        - id
                        - name
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        displayName:
                          type: string
                        lat:
                          type: number
                        lon:
                          type: number
                        mode:
                          enum:
                            - subway
                            - bus
                          type: string
                        parentId:
                          type: string
                    distanceMeters:
                      type: number
                    directions:
                      type: array
                      items:
                        type: object
                        required:
                          - direction
                          - arrivals
                        properties:
                          direction:
                            type: string
                            enum:
                              - north
                              - south
                              - east
                              - west
                              - unknown
                              - uptown
                              - downtown
                          headsign:
                            type: string
                          arrivals:
                            type: array
                            items:
                              type: object
                              required:
                                - mode
                                - route
                                - stop
                                - direction
                                - arrivalTime
                                - minutes
                                - realtime
                                - source
                              properties:
                                mode:
                                  type: string
                                  enum:
                                    - subway
                                    - bus
                                    - lirr
                                    - metro-north
                                route:
                                  type: object
                                  required:
                                    - id
                                  properties:
                                    id:
                                      type: string
                                    shortName:
                                      type: string
                                    longName:
                                      type: string
                                    type:
                                      type: number
                                    color:
                                      type: string
                                    textColor:
                                      type: string
                                stop:
                                  type: object
                                  required:
                                    - id
                                    - name
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                    displayName:
                                      type: string
                                    lat:
                                      type: number
                                    lon:
                                      type: number
                                    mode:
                                      enum:
                                        - subway
                                        - bus
                                      type: string
                                    parentId:
                                      type: string
                                direction:
                                  type: string
                                  enum:
                                    - north
                                    - south
                                    - east
                                    - west
                                    - unknown
                                    - uptown
                                    - downtown
                                destination:
                                  type: string
                                displayDirection:
                                  type: string
                                headsign:
                                  type: string
                                arrivalTime:
                                  type: string
                                departureTime:
                                  type: string
                                minutes:
                                  type: number
                                tripId:
                                  type: string
                                realtime:
                                  type: boolean
                                source:
                                  type: string
                                raw: {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````