A trip is an individual run of a route at a specific time. While multiple trips may follow the same stop pattern, a trip is a single instance of that pattern.
API Definitions
Get a trip
Path Parameters
tripId
string
required
The id of a trip. You MUST URL encode this value, as it may contain forward slashes. This is planned to be changed in the future.
Query Parameters
No query parameters.
Response Object
id
string
Stable identifier for this trip.
blockId
string
Stable identifier for the block this trip is part of.
shapeId
string
Stable identifier for this trip's shape.
headsign
string
The headsign displayed on the vehicle for this trip.
direction
object | null
The direction of travel for this trip, if applicable.
id
integer | null
Direction id (0 or 1).
name
string
Direction display name.
shortName
string | null
Short direction code.
route
object | null
Route details associated with this trip.
id
string
Stable identifier for the route.
routeGroupId
string | null
Stable identifier for the route group this route belongs to.
gtfsRouteId
string
Stable GTFS route identifier.
longName
string | null
Long route name.
shortName
string | null
Short route name or number.
color
string | null
Hex route color code without #.
textColor
string | null
Hex text color code without #.
GEThttps://api.mtd.dev/trips/{tripId}
curl -X GET "https://api.mtd.dev/trips/{tripId}" \ -H "X-ApiKey: YOUR_API_KEY"