Prerequisites
- Install
mta-jswithnpm install mta-js. - Set
MTA_API_KEYin your environment. - Requires
mta-js2.4.0 or later.
1
Choose a New Jersey station
The PATH API includes these New Jersey stations: Newark (
NWK), Harrison (HAR), Journal Square (JSQ), Grove Street (GRV), Newport (NEW), Exchange Place (EXP), and Hoboken (HOB). New York stations are not included.2
Request live arrivals
Use a station code, route, and direction to filter the realtime arrival feed. Directions accept Each arrival includes its route and stop, direction, estimated arrival time, minutes until arrival, and data source. The response is refreshed from the live RidePATH feed.
to-ny/east and to-nj/west.3
Explore route patterns
List PATH routes and retrieve the ordered New Jersey stations served by a route:The route-stations response includes eastbound and westbound station sequences. Add
?direction=east or ?direction=west to return one direction.