Regional transit REST
Get ordered PATH stations for a route
Get ordered NJ PATH station patterns from the static PATH catalog.
GET
https://www.mtaapi.dev
/
api
/
v1
/
path
/
routes
/
{route}
/
stations
mta-js
import { MTA } from "mta-js";
const mta = new MTA({ apiKey: process.env.MTA_API_KEY });
const data = await mta.path.routeStations({ route: "JSQ-33", direction: "east" });{
"route": {
"id": "<string>",
"gtfsId": "<string>",
"shortName": "<string>",
"longName": "<string>",
"type": 123,
"color": "<string>",
"textColor": "<string>"
},
"mode": "subway",
"directions": [
{
"direction": "<string>",
"stops": [
{
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"lat": 123,
"lon": 123,
"mode": "subway",
"parentId": "<string>",
"arrivals": [
{
"mode": "subway",
"route": {
"id": "<string>",
"gtfsId": "<string>",
"shortName": "<string>",
"longName": "<string>",
"type": 123,
"color": "<string>",
"textColor": "<string>"
},
"stop": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"lat": 123,
"lon": 123,
"mode": "subway",
"parentId": "<string>"
},
"direction": "north",
"arrivalTime": "<string>",
"minutes": 123,
"realtime": true,
"source": "<string>",
"destination": "<string>",
"displayDirection": "<string>",
"headsign": "<string>",
"departureTime": "<string>",
"tripId": "<string>",
"raw": "<unknown>"
}
]
}
],
"headsigns": [
"<string>"
]
}
]
}Authorizations
bearerAuthapiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Query Parameters
Available options:
east, west Response
200 - application/json
Response for status 200
Available options:
subway, bus, path, nj-transit-rail, nyc-ferry, lirr, metro-north Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Available options:
subway, bus, path, nj-transit-rail, nyc-ferry, lirr, metro-north Hide child attributes
Hide child attributes
Available options:
subway, bus, path, nj-transit-rail, lirr, metro-north Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Available options:
subway, bus, path, nj-transit-rail, nyc-ferry, lirr, metro-north Available options:
north, south, east, west, unknown, uptown, downtown ⌘I
mta-js
import { MTA } from "mta-js";
const mta = new MTA({ apiKey: process.env.MTA_API_KEY });
const data = await mta.path.routeStations({ route: "JSQ-33", direction: "east" });{
"route": {
"id": "<string>",
"gtfsId": "<string>",
"shortName": "<string>",
"longName": "<string>",
"type": 123,
"color": "<string>",
"textColor": "<string>"
},
"mode": "subway",
"directions": [
{
"direction": "<string>",
"stops": [
{
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"lat": 123,
"lon": 123,
"mode": "subway",
"parentId": "<string>",
"arrivals": [
{
"mode": "subway",
"route": {
"id": "<string>",
"gtfsId": "<string>",
"shortName": "<string>",
"longName": "<string>",
"type": 123,
"color": "<string>",
"textColor": "<string>"
},
"stop": {
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"lat": 123,
"lon": 123,
"mode": "subway",
"parentId": "<string>"
},
"direction": "north",
"arrivalTime": "<string>",
"minutes": 123,
"realtime": true,
"source": "<string>",
"destination": "<string>",
"displayDirection": "<string>",
"headsign": "<string>",
"departureTime": "<string>",
"tripId": "<string>",
"raw": "<unknown>"
}
]
}
],
"headsigns": [
"<string>"
]
}
]
}