Get a single trip (one vehicle run) with stop times
Return a single trip (one scheduled vehicle run) as an ordered list of stops with arrival/departure times and GTFS boarding rules (pickupType/dropOffType). Addressed by tripId + regionName from a /nextDepartures or /rawVehiclePositions response.
Boarding rules
A stop can restrict whether passengers may board or alight (GTFS pickup_type / drop_off_type). Two optional fields carry this; each appears on a stop ONLY when that action is forbidden - if a field is absent the action is allowed:
| Field | Meaning when present (=1) |
|---|---|
pickupType | Boarding (pickup) is not allowed at this stop - drop-off only. |
dropOffType | Alighting (drop-off) is not allowed at this stop - boarding only. |
- Absent field = allowed (GTFS value 0, the default); it is omitted from the response rather than sent as 0.
- Both fields present with value 1 means the vehicle passes the stop without picking up or setting down.
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
tripId | string | ✓ | Trip identifier as returned by /nextDepartures (in a departure entry) or /rawVehiclePositions; forwarded to the backend verbatim | 3087978050 |
regionName | string | ✓ | Region name that selects the backend, taken from the same /nextDepartures or /rawVehiclePositions response | germany |
Try It Out
https://capi.busmaps.com:8443Required parameters only
curl -H "capi-key: Bearer YOUR_API_KEY" -H "capi-host: busmaps.com" "https://capi.busmaps.com:8443/trip?tripId=3087978050®ionName=germany"Response Example
HTTP 200 - Success
{
"tripId": "3087978050",
"routeId": "1579968320-1148302324",
"countryIso": "DEU",
"countryUrl": "germany",
"routeShortName": "28",
"urlRouteShortName": "28",
"routeType": "train",
"tripHeadsign": "München Hbf",
"agencyId": "4175707078-180312815",
"agencyName": "DB Fernverkehr Ag",
"urlAgencyName": "DB-Fernverkehr-Ag",
"agencyUrl": "https://www.delfi.de",
"stops": [
{
"stopId": "2816067872220830083",
"countryIso": "DEU",
"countryUrl": "germany",
"stopName": "Hamburg-Altona",
"urlStopName": "Hamburg-Altona",
"stopLat": 53.552695,
"stopLon": 9.935175,
"arrivalTime": "2026-06-09T06:17:00+02:00",
"departureTime": "2026-06-09T06:17:00+02:00"
},
{
"stopId": "1317189768892492088",
"countryIso": "DEU",
"countryUrl": "germany",
"stopName": "Hamburg Dammtor",
"urlStopName": "Hamburg-Dammtor",
"stopLat": 53.560751,
"stopLon": 9.989566,
"arrivalTime": "2026-06-09T06:25:00+02:00",
"departureTime": "2026-06-09T06:27:00+02:00",
"dropOffType": 1
}
],
"polyline": "kozeIyms{@iq@_sI`q@ikB?A|yeEgbnRt{@gp`@ntHtSttuBtjhC|yn@~mbAtdu@qvK|zgAloeGnhpEr`Zj@Mfmz@g|RdAWxi\\m{Nlz}Fwx{A",
"regionName": "germany",
"processingTimeMs": 64.19
}Response Schema
Title: Trip Response View Full JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Trip Response",
"type": "object",
"properties": {
"urlRouteShortName": {
"type": "string",
"description": "URL-safe slug of the route short name"
},
"agencyUrl": {
"type": "string",
"description": "Agency website URL"
},
"routeColor": {
"type": "string",
"description": "Route color as a hex string"
},
"routeShortName": {
"type": "string",
"description": "Short route name shown to passengers"
},
"stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stopLon": {
"type": "number",
"description": "Stop longitude"
},
"stopDesc": {
"type": "string",
"description": "Additional stop description (platform/track hint)"
},
"wheelchairBoarding": {
"type": "integer",
"description": "Wheelchair accessibility flag (GTFS: 0 unknown, 1 yes, 2 no)"
},
"countryUrl": {
"type": "string",
"description": "Country URL slug (e.g. 'uk')"
},
"urlStopName": {
"type": "string",
"description": "URL-safe slug of the stop name"
},
"dropOffType": {
"type": "integer",
"description": "GTFS drop-off rule at this stop: 0 alighting allowed, 1 no alighting. Present only when restricted; absent means allowed"
},
"countryIso": {
"type": "string",
"description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
},
"departureTime": {
"type": "string",
"description": "Scheduled departure time (ISO 8601, route-local with offset)"
},
"stopId": {
"type": "string",
"description": "Internal stop identifier (use with /nextDepartures stopId mode)"
},
"stopLat": {
"type": "number",
"description": "Stop latitude"
},
"arrivalTime": {
"type": "string",
"description": "Scheduled arrival time (ISO 8601, route-local with offset)"
},
"stopName": {
"type": "string",
"description": "Human-readable stop name"
}
},
"required": [
"stopLon",
"departureTime",
"stopId",
"stopLat",
"stopName",
"countryUrl",
"arrivalTime",
"urlStopName",
"countryIso"
]
},
"description": "Ordered stops served by this trip"
},
"processingTimeMs": {
"type": "number",
"description": "Server processing time in milliseconds"
},
"tripId": {
"type": "string",
"description": "Trip identifier (pass it back to re-query this run)"
},
"routeId": {
"type": "string",
"description": "Internal route identifier of the trip"
},
"countryIso": {
"type": "string",
"description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
},
"routeLongName": {
"type": "string",
"description": "Full route name/description"
},
"agencyName": {
"type": "string",
"description": "Operating agency name"
},
"agencyPhone": {
"type": "string",
"description": "Agency contact phone"
},
"regionName": {
"type": "string",
"description": "Transit data region that served the request"
},
"agencyId": {
"type": "string",
"description": "Internal agency identifier"
},
"tripHeadsign": {
"type": "string",
"description": "Destination shown on the vehicle"
},
"countryUrl": {
"type": "string",
"description": "Country URL slug (e.g. 'uk')"
},
"polyline": {
"type": "string",
"description": "Google-encoded geometry of the whole trip"
},
"routeDesc": {
"type": "string",
"description": "Additional route description"
},
"routeType": {
"type": "string",
"description": "Transport type (bus, subway, train, tram, ...)"
},
"urlAgencyName": {
"type": "string",
"description": "URL-safe slug of the agency name"
},
"routeTextColor": {
"type": "string",
"description": "Route text color as a hex string"
}
},
"required": [
"polyline",
"urlRouteShortName",
"agencyUrl",
"routeType",
"countryIso",
"agencyId",
"regionName",
"tripHeadsign",
"urlAgencyName",
"routeShortName",
"stops",
"countryUrl",
"agencyName",
"processingTimeMs",
"tripId",
"routeId"
]
}
Response Codes
Trip with ordered stops and stop times
Invalid or missing parameters / unknown regionName
Trip not found
Internal server error