API Docs
Real-time NYC subway arrival times. No authentication required.
Quick Start
- Search for a station:
GET /api/search?q=72+st+q - Get arrivals using the returned slug:
GET /api/stops/72-st-n-q-r/lines/q
REST Endpoints
/apiDiscovery endpoint. Lists all available endpoints and tips.
/api/search?q={query}Search stations and routes by name. Returns matching stations with slugs, route lists, and a suggested arrivals URL when both a station and route match.
q — Search query (required)
Example: /api/search?q=union+square
/api/stopsList all stations, optionally filtered by route.
route — Filter by route slug, e.g. q (optional)
/api/stops/{stationSlug}realtimeRealtime arrivals for all routes at a station. Returns uptown/downtown arrivals and a per-route breakdown.
Example: /api/stops/14-st-union-sq
/api/stops/{stationSlug}/lines/{routeSlug}realtimeRealtime arrivals for a specific route at a station. The most precise endpoint.
Example: /api/stops/72-st-n-q-r/lines/q
/api/linesList all subway routes with station counts and colors.
/api/lines/{routeSlug}realtimeNext arrival at every station on a route. Each station includes next_uptown and next_downtown with minutes_away.
Example: /api/lines/q
/api/trips/{tripId}?route={routeSlug}realtimeTrack a specific train. Returns every stop on the trip with arrival times, station names, and minutes_away. Get trip IDs from any arrivals endpoint.
route — Route slug (required), e.g. q
Example: /api/trips/051800_Q..N03R?route=q
Response Format
All JSON responses use this envelope:
{
"ok": true,
"data": { ... },
"_meta": {
"timestamp": "2025-01-01T00:00:00.000Z",
"endpoint": "/api/...",
"realtime": true
}
}Errors return:
{
"ok": false,
"error": { "code": "NOT_FOUND", "message": "..." },
"_meta": { ... }
}Slugs
Use /api/search to find slugs — don't guess them.
Stations: 14-st-union-sq, 72-st-n-q-r, times-sq-42-st, fulton-st
Routes: a, q, 7, si, gs (always lowercase)
MCP Server
For AI agents that support the Model Context Protocol, connect directly via Streamable HTTP:
POST https://nyc-subway-status.com/mcp
Tools
search_subwaySearch stations and routes by name. Start here.
Input: { "query": "72 st q" }
get_arrivalsRealtime arrivals for a route at a station.
Input: { "station_slug": "72-st-n-q-r", "route_slug": "q" }
get_station_arrivalsRealtime arrivals for all routes at a station.
Input: { "station_slug": "14-st-union-sq" }
list_stationsList all stations. Optional route filter.
Input: { "route_slug": "q" }
list_routesList all 29 subway routes.
Input: {}
get_tripTrack a specific train by trip ID. Returns every stop with arrival times.
Input: { "trip_id": "051800_Q..N03R", "route_slug": "q" }
Client Configuration
Claude Desktop, Cursor, Windsurf, and other MCP-compatible clients:
{
"mcpServers": {
"nyc-subway": {
"url": "https://nyc-subway-status.com/mcp"
}
}
}For stdio-only clients, use the mcp-remote bridge:
{
"mcpServers": {
"nyc-subway": {
"command": "npx",
"args": ["-y", "mcp-remote",
"https://nyc-subway-status.com/mcp"]
}
}
}Tips
- Always search first — don't guess station slugs.
minutes_awayis pre-computed server-side. No client math needed.- Directions: uptown = northbound, downtown = southbound.
- Arrival times include both a Unix timestamp and an ISO 8601 string.
- Realtime endpoints fetch fresh data from the MTA on every request — nothing is cached.