Get a route's full timetable (route card)
Return a route's full timetable: directions, ordered stops, inline geometry and the schedule as a trips x stops grid. Addressed by routeId + countryIso + regionName from a /stopsInRadius or /nextDepartures response.
Schedule format
The schedule in /line is a trips x stops grid. Each direction's trips is a list of {"<tripId>": [stopTime, ...]} objects - one trip per object, one stopTime per stop in that direction's stops[] (same order). A stopTime is a compact string:
| Value | Meaning |
|---|---|
08:40 | A single time is the departure (HH:MM); the vehicle does not wait, so no separate arrival is given. |
07:00,07:04 | Two times are arrival then departure - the vehicle waits at the stop (arrives 07:00, leaves 07:04). |
07:00,07:04|01 | A trailing |PD adds GTFS boarding rules: P=pickup, D=drop-off, 1=forbidden, 0=allowed. Here drop-off is forbidden, so this is a boarding-only stop. |
- The |PD suffix is present only when the operator restricts boarding or alighting; no suffix means both are allowed.
- |10 = alighting only (no boarding); |11 = neither boarding nor alighting.
- Seconds are dropped. Times after midnight stay in the 24h+ form the operator published (e.g. 25:10).
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
routeId | string | ✓ | Route identifier without the country prefix, taken from the routeId field of a /stopsInRadius or /nextDepartures response | 56535198-1440633859 |
regionName | string | ✓ | Region name that selects the backend, taken from the regionName field of the /stopsInRadius or /nextDepartures response that gave you the routeId | germany |
countryIso | string | ✓ | ISO 3166-1 alpha-3 country code from the same response, used to rebuild the prefixed upstream route id | DEU |
date | string | Service date in YYYY-MM-DD for which the schedule is returned; defaults to today in the route's local timezone | 2026-06-09 |
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/line?routeId=56535198-1440633859®ionName=germany&countryIso=DEU"Response Example
HTTP 200 - Success
{
"routeInfo": {
"inService": true,
"routeShortName": "19",
"routeLongName": null,
"urlRouteShortName": "19",
"urlRouteLongName": null,
"routeColor": null,
"routeTextColor": null,
"routeTimezone": "Europe/Berlin",
"localTime": "2026-06-09T16:02:42+02:00",
"routeTypeName": "Rail",
"routeTypeGroup": "train",
"routeHash2": "56535198-1440633859",
"countryUrl": "germany",
"agencyInfo": {
"agencyName": "DB Fernverkehr Ag",
"agencyHash": "4175707078-180312815",
"urlAgencyName": "DB-Fernverkehr-Ag",
"countryUrl": "germany"
}
},
"directions": [
{
"dirHash": "a9e6ca1c0db4acc6",
"dirName": "S Südkreuz Bhf (Berlin) - Hagen Hbf",
"inService": true,
"polyline": "obh_I_nqpAotHuSu{@fp`@|y]``bTjzbAf}jFNr@tdaC|mpE",
"stops": [
{
"stopHash1": "6400850856925058483",
"countryUrl": "germany",
"stopName": "S Südkreuz Bhf (Berlin)",
"urlStopName": "S-Südkreuz-Bhf-Berlin",
"stopLat": 52.475435,
"stopLon": 13.365603
},
{
"stopHash1": "8159784251691250735",
"countryUrl": "germany",
"stopName": "S+U Berlin Hauptbahnhof",
"urlStopName": "S-U-Berlin-Hauptbahnhof",
"stopLat": 52.524959,
"stopLon": 13.368911
}
],
"trips": [
{
"3087976640": [
"06:52",
"07:00,07:04|01",
"... (4 more items)"
]
},
{
"3087976641": [
"08:52",
"09:00,09:04|01",
"... (4 more items)"
]
}
]
},
{
"dirHash": "947e76f21ba89a7",
"dirName": "Hagen Hbf - S Südkreuz Bhf (Berlin)",
"inService": true,
"polyline": "exnxHqapl@udaC}mpE[cB_zbAw{jF{y]m_bTASt{@gp`@ntHtS",
"stops": [
{
"stopHash1": "13901168931063208394",
"countryUrl": "germany",
"stopName": "Hagen Hbf",
"urlStopName": "Hagen-Hbf",
"stopLat": 51.362747,
"stopLon": 7.460249
},
{
"stopHash1": "4364432131683920676",
"countryUrl": "germany",
"stopName": "Bielefeld Hbf",
"urlStopName": "Bielefeld-Hbf",
"stopLat": 52.029571,
"stopLon": 8.533169
}
],
"trips": [
{
"3087976565": [
"07:31",
"08:25,08:27",
"... (4 more items)"
]
},
{
"3087976551": [
"09:31",
"10:25,10:27",
"... (4 more items)"
]
}
]
}
],
"regionName": "germany",
"processingTimeMs": 72.87
}Response Schema
Title: Line Response View Full JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Line Response",
"type": "object",
"properties": {
"routeInfo": {
"type": "object",
"properties": {
"urlRouteShortName": {
"type": "string",
"description": "URL-safe slug of the route short name"
},
"routeColor": {
"type": [
"null",
"string"
],
"description": "Route color as a hex string"
},
"routeShortName": {
"type": "string",
"description": "Short route name shown to passengers (e.g. '18', 'Bakerloo')"
},
"localTime": {
"type": "string",
"description": "Current wall clock in the route timezone (ISO 8601 with offset)"
},
"countryUrl": {
"type": "string",
"description": "Country URL slug (e.g. 'uk')"
},
"routeTypeName": {
"type": "string",
"description": "Upstream transport category label"
},
"urlRouteLongName": {
"type": [
"string",
"null"
],
"description": "URL-safe slug of the route long name"
},
"routeHash2": {
"type": "string",
"description": "Route identifier (pass as routeId to re-query)"
},
"routeTextColor": {
"type": [
"null",
"string"
],
"description": "Route text color as a hex string"
},
"routeLongName": {
"type": [
"null",
"string"
],
"description": "Full route name/description"
},
"agencyInfo": {
"type": "object",
"properties": {
"urlAgencyName": {
"type": "string",
"description": "URL-safe slug of the agency name"
},
"countryUrl": {
"type": "string",
"description": "Country URL slug (e.g. 'uk')"
},
"agencyHash": {
"type": "string",
"description": "Internal agency identifier"
},
"agencyName": {
"type": "string",
"description": "Agency name"
}
},
"required": [
"urlAgencyName",
"agencyHash",
"agencyName",
"countryUrl"
],
"description": "Operating agency of the route"
},
"inService": {
"type": "boolean",
"description": "Whether the route (or direction) currently operates"
},
"routeTimezone": {
"type": "string",
"description": "IANA timezone of the route (e.g. 'Europe/Berlin')"
},
"routeTypeGroup": {
"type": "string",
"description": "Transport group (bus, subway, train, tram, ...)"
}
},
"required": [
"urlRouteShortName",
"routeShortName",
"localTime",
"routeHash2",
"countryUrl",
"inService",
"agencyInfo",
"routeTypeName",
"routeTimezone",
"routeTypeGroup"
],
"description": "Route header: names, colors, type, timezone and agency"
},
"regionName": {
"type": "string",
"description": "Transit data region that served the request"
},
"directions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"dirHash": {
"type": "string",
"description": "Direction identifier"
},
"polyline": {
"type": "string",
"description": "Google-encoded geometry of the direction"
},
"dirName": {
"type": "string",
"description": "Direction headsign (e.g. 'A - B')"
},
"stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stopLon": {
"type": "number",
"description": "Stop longitude"
},
"stopLat": {
"type": "number",
"description": "Stop latitude"
},
"urlStopName": {
"type": "string",
"description": "URL-safe slug of the stop name"
},
"stopHash1": {
"type": "string",
"description": "Stop identifier"
},
"countryUrl": {
"type": "string",
"description": "Country URL slug (e.g. 'uk')"
},
"stopName": {
"type": "string",
"description": "Human-readable stop name"
}
},
"required": [
"stopLon",
"stopLat",
"urlStopName",
"stopHash1",
"countryUrl",
"stopName"
]
},
"description": "Ordered stops of the direction (same order as each trip's times)"
},
"trips": {
"type": "array",
"items": {
"type": "object",
"description": "Single trip keyed by its tripId; the value is the list of stop times for that trip (one per stop, same order as stops[]).",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Schedule as a list of {\"<tripId>\": [stopTime, ...]} objects, one stopTime per stop (same order as stops[]). A single time 'HH:MM' is the departure; two times 'HH:MM,HH:MM' are arrival then departure (the vehicle waits at the stop). An optional '|PD' suffix flags GTFS boarding rules - P=pickup, D=drop-off, 1=forbidden, 0=allowed (e.g. '07:00,07:04|01' = arrives 07:00, departs 07:04, drop-off forbidden so boarding only). No suffix means both are allowed."
},
"inService": {
"type": "boolean",
"description": "Whether the route (or direction) currently operates"
}
},
"required": [
"dirHash",
"polyline",
"dirName",
"stops",
"trips",
"inService"
]
},
"description": "Directions of the route, each with its stops, geometry and schedule"
},
"processingTimeMs": {
"type": "number",
"description": "Server processing time in milliseconds"
}
},
"required": [
"routeInfo",
"regionName",
"processingTimeMs",
"directions"
]
}
Response Codes
Route card with directions, stops and schedule
Invalid or missing parameters / unknown regionName
Route not found
Internal server error