Skip to main content
GET
Find route-aware nearby stops
The mta.stops namespace lets you discover MTA stops near any point on the map. Use mta.stops.near to find subway stations, bus stops, or both, sorted by distance from a given latitude and longitude. You can also pass a route to return only stops served by that route — for example, only L train stops or only M23 SBS bus stops within walking distance. This is the recommended starting point when you need stop IDs for use with mta.subway.arrivals or mta.bus.arrivals, or to power a “stops near me” feature in your application.

mta.stops.near(params)

Returns a list of MTA stops within a configurable radius of the provided coordinates, sorted by distance ascending. You can limit results to subway stops, bus stops, or both by passing the modes parameter, and further filter to stops served by a specific route.

Parameters

lat
number
required
The latitude of the center point for the search, in decimal degrees (WGS 84). For example, 40.7128 for lower Manhattan.
lon
number
required
The longitude of the center point for the search, in decimal degrees (WGS 84). For example, -74.0060 for lower Manhattan.
modes
string[]
An array of transit modes to include in the results. Accepted values are 'subway' and 'bus'. Pass ['subway'] to return only subway stations, ['bus'] to return only bus stops, or ['subway', 'bus'] to return both. Defaults to both modes if omitted.
route
string
Optional route filter. When supplied, only stops served by this route are returned. For example, 'L' returns nearby stops served by the L train, and 'M23' returns nearby M23 SBS bus stops. Route IDs are case-sensitive and match MTA’s published identifiers.
includeRoutes
boolean
When true, each returned stop includes route metadata: a servedRoutes array of ServedRoute objects and a directionHeadsigns map. Defaults to false to keep responses small when you only need stop identity and distance.
radiusMeters
number
Search radius in meters. Defaults to 500. Increase this when querying sparse areas or to widen a “stops near me” view.
limit
number
Maximum number of stops to return. Must be between 1 and 100. Results remain sorted by distance ascending.

TypeScript signature

Response fields

stops
NearbyStop[]
required
An array of nearby stops, sorted by distanceMeters ascending. Returns an empty array if no stops are found within the search radius.

Code example

Example response

Route-aware example

Filter to nearby stops served by a specific route. This is useful when you want to find the closest stop on the M23 SBS or the nearest L train station without sorting through every nearby stop yourself.
Pass the id from a result directly into mta.subway.arrivals or mta.bus.arrivals to build a two-step “find stops near me, then show arrivals” flow without any additional configuration.

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
modes
string

Comma-separated transit modes to search, such as subway,bus.

route
string

Optional route filter. For example, L returns nearby stops served by the L train, and M23 returns nearby M23 SBS bus stops.

Minimum string length: 1
includeRoutes
boolean

Include route metadata for each returned stop.

radiusMeters
number

Search radius in meters. Defaults to 500.

Required range: x >= 1
limit
number
Required range: 1 <= x <= 100

Response

200 - application/json

Response for status 200

id
string
required
name
string
required
displayName
string
required
lat
number
required
lon
number
required
distanceMeters
number
required
mode
enum<string>
Available options:
subway,
bus
parentId
string
servedRoutes
object[]
routeMatch
boolean
routeHeadsigns
string[]
directionHeadsigns
object