Issue1
Chelsea
Flatiron
Stuy Town
May 28, 2026 / Gary Tokman
Build a Realtime NYC Transit Map with MapKit JS
A practical walkthrough for plotting live MTA vehicle locations on a New York City map using the mtaapi.dev API and SDK.
Put your city in motion. Build live transit maps, station countdowns, and service alerts that help riders catch their next ride.
Fetch realtime arrivals, alerts, stops, and vehicle locations with clean SDK or HTTP calls.
import { MTA } from 'mta-js'const mta = new MTA({apiKey: process.env.MTA_API_KEY})// Display-ready subway arrivalsconst arrivals = await mta.subway.arrivals({stopId: 'L06',route: 'L'})// Nearby subway and bus stopsconst stops = await mta.stops.near({lat: 40.7356,lon: -73.9804,modes: ['subway', 'bus'],limit: 10})// Live bus positions on a routeconst vehicles = await mta.bus.vehicles({route: 'M23',limit: 5})// Same client for PATH, NJ Transit, NYC Ferry, Citi Bike, plus 22 more US transit agencies and 7 more bike sharesconst path = await mta.path.arrivals({station: 'JSQ',direction: 'to-ny'})
Give Claude, ChatGPT, Cursor, Codex, v0, and Devin live NYC transit data over MCP.
claude mcp add --transport http mta https://www.mtaapi.dev/mcp \--header "Authorization: Bearer $MTA_API_KEY"
Simple, reliable access to real-time transit information.
Self-host for free, or use hosted keys with limits sized for real apps.
View our blog for examples on how to build apps with the API.
May 28, 2026 / Gary Tokman
A practical walkthrough for plotting live MTA vehicle locations on a New York City map using the mtaapi.dev API and SDK.