Get departures for voice agents

GET /compact/v1/nextDepartures
Base URL: https://capi.busmaps.com:8443

For voice models and voice agents, this endpoint reduces response tokens and keeps spoken-answer tool calls focused. Return the same stops and departures as nextDepartures in a normalized compact response. Request parameters and both request modes are unchanged. Field names are declared once in *Fields arrays; rows connect stops, direction-specific services and departures through integer references. scheduledDepartureTime and optional realtimeDepartureTime use ISO 8601. Operator identifiers and alert references preserve each alert's scope. No stops or departure times are truncated.

Voice-ready response: This JSON REST method uses a smaller positional representation so voice models spend fewer tokens on repeated fields and map-only data. It does not accept or process audio.

Need the complete response object?

The standard endpoint returns the complete application and map-oriented response for the same capability.

View the standard endpoint →

Response fields and units

FieldFormat / unitMeaning
*Fields + matching data array columnar JSON Each row uses the field order declared once by its matching *Fields array
localDate, localTime YYYY-MM-DD, HH:MM:SS Request time in the stop's local timezone
stops[].stopServiceRefs array of indexes Indexes into stopServices for services departing from this stop
stopServices[].serviceRef index Index into services with routeId, countryIso, line, headsign and operatorId
stopServices[].departureRefs array of indexes Indexes into departures for this service at this stop
departures[].scheduledDepartureTime ISO 8601 Scheduled departure time
departures[].realtimeDepartureTime ISO 8601 Live departure time; null when unavailable
alerts[].operatorId, countryIso, serviceRefs, stopRefs identifier and indexes Operator identity and references limit each alert to the affected returned services or stops
imperial boolean Optional flag, present as true for US/UK

Parameters

ParameterTypeRequiredDescriptionExample
location string No Coordinates for nearby stops search (Mode 1: by coordinates). Required if stopId is not provided. Cannot be combined with stopId 53.535402,-2.523009
stopId string No Internal stop identifier (Mode 2: by stop ID). Obtain it from /v1/stopsInRadius or /compact/v1/routes. Required if location is not provided. Must be used together with regionName and countryIso on busmaps.com. Cannot be combined with location 8150831397776266088
regionName string No Region name, required when using stopId mode. Obtain it from the response that provided the stopId uk_ireland
countryIso string On busmaps.com ISO 3166-1 alpha-3 country code from the response that provided the stopId. Required on busmaps.com in stopId mode; omit on wikiroutes.info GBR
requestTime string No ISO 8601 time to list departures from. Z for UTC, an offset like +01:00 (encode + as %2B), or no zone for local time at the stop or location. See Time format below. (Default: current time (UTC)) 2025-09-18T09:00:00Z
radius integer No Stop search radius in meters (for location mode only) (Default: 500) 500
results integer No Maximum number of departures to return (Default: 40) 30
barrierMode integer No Wheelchair filter: 0 no filter, 1 require explicitly accessible stops and trips, 2 require explicitly accessible stops only, 3 require explicitly accessible trips only. Unknown accessibility fails each requirement selected by the mode (Default: 0; Range: 0-3) 1
lang string No Language code for translated stop/route names (IETF BCP 47 format) en

Time format

Time parameters use ISO 8601. The zone designator at the end of the value determines its interpretation.

FormExampleMeaning
No zone 2025-09-18T10:00:00 Local time at the queried location: the origin for /compact/v1/routes or the stop or location for /compact/v1/nextDepartures. The caller does not need the location's UTC offset.
UTC 2025-09-18T14:00:00Z A fixed instant. The Z suffix marks UTC.
Explicit offset 2025-09-18T10:00:00-04:00 A fixed instant. Encode + as %2B in the query string.
  • The UTC and offset forms denote the same instant regardless of caller location; only the no-zone form is location-relative. 09:00:00Z and 10:00:00+01:00 are equivalent.
  • If omitted, the current time is used.
  • Seconds are rounded up to the next minute.
  • When present, localDate and localTime report the request time in the resolved region. nextDepartures v1 times use ISO 8601 and may include a UTC offset or omit a zone designator.

Real-time vs scheduled times

Times come in two flavours: the schedule (always present) and the real-time/live value (available only when the operator feeds live data). When a real-time value is available it is the actual expected time - use it instead of the scheduled one. The field names differ per endpoint:

Endpoint Scheduled field Real-time field (live only)
/compact/v1/routes legs columns departureTime / arrivalTime (full ISO 8601) legs columns realtimeDepartureTime / realtimeArrivalTime (live only)
/compact/v1/nextDepartures departures column scheduledDepartureTime (ISO 8601) departures column realtimeDepartureTime (ISO 8601; live only)
  • The fixed-width /compact/v1/nextDepartures row keeps its real-time column and uses null.
  • nextDepartures times use ISO 8601 and may include a UTC offset or omit a zone designator.
  • Delay = real-time minus scheduled (positive = running late). A live/delay badge is the typical UI.
  • Service disruptions come as a top-level alerts[] array (header, description, cause, effect, validFrom/validUntil, and the affected route/stop via informedEntity / sectionIds).

Wheelchair accessibility

wheelchairBoarding: wheelchairBoarding describes a stop.

wheelchairAccessible: wheelchairAccessible describes a trip.

Value Meaning
field absent Unknown (GTFS value 0).
1 Accessible.
2 Not accessible.
Accessibility filtering is strict. In response data, an absent wheelchairBoarding or wheelchairAccessible field means unknown; it does not establish accessibility or inaccessibility. With barrierMode 1-3, unknown values fail each accessibility requirement selected by the mode, so only an explicit value of 1 passes. Use these modes when confirmed accessibility is required, because many networks do not publish this data.

Try It Out

Mode 1: Search by coordinates

curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/compact/v1/nextDepartures?location=53.535402,-2.523009&radius=500&results=30"

Mode 2: Query specific stop by ID

curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/compact/v1/nextDepartures?stopId=8150831397776266088&regionName=uk_ireland&countryIso=GBR&results=30"

Response Example

{
    "regionName": "uk_ireland",
    "serviceFields": [
        "routeId",
        "countryIso",
        "line",
        "headsign",
        "mode",
        "operatorId",
        "operator"
    ],
    "services": [
        [
            "3173742969-2726050097",
            "GBR",
            "Northern",
            "Kennington Station via Charing Cross",
            "subway",
            "2264224218-1585141307",
            "London Underground (TfL)"
        ],
        [
            "3173742969-2726050097",
            "GBR",
            "Northern",
            "Morden via Bank",
            "subway",
            "2264224218-1585141307",
            "London Underground (TfL)"
        ]
    ],
    "departureFields": [
        "tripId",
        "scheduledDepartureTime",
        "realtimeDepartureTime",
        "platform",
        "wheelchairAccessible"
    ],
    "departures": [
        [
            "1-572d23e139a649f28886",
            "2026-08-10T15:31:00+01:00",
            "2026-08-10T15:32:00+01:00",
            "2",
            1
        ],
        [
            "1-f31421995d2da6de4239",
            "2026-08-10T15:34:00+01:00",
            "2026-08-10T15:34:00+01:00",
            "2",
            1
        ],
        [
            "1-e973582d4fd8310d5c92",
            "2026-08-10T15:37:00+01:00",
            "2026-08-10T15:38:00+01:00",
            "2",
            1
        ]
    ],
    "stopServiceFields": [
        "serviceRef",
        "departureRefs"
    ],
    "stopServices": [
        [
            0,
            [
                0,
                2
            ]
        ],
        [
            1,
            [
                1
            ]
        ]
    ],
    "stopFields": [
        "stopId",
        "countryIso",
        "name",
        "code",
        "description",
        "lat",
        "lon",
        "wheelchairBoarding",
        "stopServiceRefs"
    ],
    "stops": [
        [
            "12749834648374944315",
            "GBR",
            "Camden Town Underground Station",
            null,
            null,
            51.539258,
            -0.142972,
            2,
            [
                0,
                1
            ]
        ]
    ],
    "localDate": "2026-08-10",
    "localTime": "15:30:00",
    "imperial": true
}

Response Schema

View JSON Schema
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Compact Next Departures Response",
    "type": "object",
    "properties": {
        "regionName": {
            "type": "string",
            "description": "Transit data region that served the request"
        },
        "imperial": {
            "type": "boolean",
            "description": "Optional flag, present as true for US/UK; numeric distance fields remain in meters"
        },
        "serviceFields": {
            "type": "array",
            "items": [
                {
                    "const": "routeId"
                },
                {
                    "const": "countryIso"
                },
                {
                    "const": "line"
                },
                {
                    "const": "headsign"
                },
                {
                    "const": "mode"
                },
                {
                    "const": "operatorId"
                },
                {
                    "const": "operator"
                }
            ],
            "additionalItems": false,
            "minItems": 7,
            "maxItems": 7,
            "description": "Column order for services rows"
        },
        "services": {
            "type": "array",
            "items": {
                "type": "array",
                "items": [
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Route identifier for /line and departure matching"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 3166-1 alpha-3 country code"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Public-facing route name"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Destination shown on the vehicle"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Transport type"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Operator identifier for alert matching"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Operating agency name"
                    }
                ],
                "additionalItems": false,
                "minItems": 7,
                "maxItems": 7
            },
            "description": "Globally deduplicated route and direction metadata"
        },
        "departureFields": {
            "type": "array",
            "items": [
                {
                    "const": "tripId"
                },
                {
                    "const": "scheduledDepartureTime"
                },
                {
                    "const": "realtimeDepartureTime"
                },
                {
                    "const": "platform"
                },
                {
                    "const": "wheelchairAccessible"
                }
            ],
            "additionalItems": false,
            "minItems": 5,
            "maxItems": 5,
            "description": "Column order for departures rows"
        },
        "departures": {
            "type": "array",
            "items": {
                "type": "array",
                "items": [
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Trip identifier for an exact follow-up request"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Scheduled departure time (ISO 8601)"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Live departure time (ISO 8601); null when unavailable"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Departure platform or stand"
                    },
                    {
                        "enum": [
                            1,
                            2,
                            null
                        ],
                        "description": "Wheelchair accessibility of the trip"
                    }
                ],
                "additionalItems": false,
                "minItems": 5,
                "maxItems": 5
            },
            "description": "All departures returned by the original endpoint"
        },
        "stopServiceFields": {
            "type": "array",
            "items": [
                {
                    "const": "serviceRef"
                },
                {
                    "const": "departureRefs"
                }
            ],
            "additionalItems": false,
            "minItems": 2,
            "maxItems": 2,
            "description": "Column order for stopServices rows"
        },
        "stopServices": {
            "type": "array",
            "items": {
                "type": "array",
                "items": [
                    {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "description": "Index into services"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "description": "Indexes into departures for this service at one stop"
                    }
                ],
                "additionalItems": false,
                "minItems": 2,
                "maxItems": 2
            },
            "description": "Associations between one stop, one direction-specific service and its departures"
        },
        "stopFields": {
            "type": "array",
            "items": [
                {
                    "const": "stopId"
                },
                {
                    "const": "countryIso"
                },
                {
                    "const": "name"
                },
                {
                    "const": "code"
                },
                {
                    "const": "description"
                },
                {
                    "const": "lat"
                },
                {
                    "const": "lon"
                },
                {
                    "const": "wheelchairBoarding"
                },
                {
                    "const": "stopServiceRefs"
                }
            ],
            "additionalItems": false,
            "minItems": 9,
            "maxItems": 9,
            "description": "Column order for stops rows"
        },
        "stops": {
            "type": "array",
            "items": {
                "type": "array",
                "items": [
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Stop identifier for an exact follow-up request"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 3166-1 alpha-3 country code"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Stop name"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Public stop code"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Additional stop description"
                    },
                    {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Latitude in decimal degrees"
                    },
                    {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Longitude in decimal degrees"
                    },
                    {
                        "enum": [
                            1,
                            2,
                            null
                        ],
                        "description": "Wheelchair accessibility of the stop"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "description": "Indexes into stopServices"
                    }
                ],
                "additionalItems": false,
                "minItems": 9,
                "maxItems": 9
            },
            "description": "Stops with upcoming departures; no stops are removed"
        },
        "noticeFields": {
            "type": "array",
            "items": [
                {
                    "const": "code"
                },
                {
                    "const": "title"
                }
            ],
            "additionalItems": false,
            "minItems": 2,
            "maxItems": 2,
            "description": "Column order for notices rows"
        },
        "notices": {
            "type": "array",
            "items": {
                "type": "array",
                "items": [
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Status code"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Notice title"
                    }
                ],
                "additionalItems": false,
                "minItems": 2,
                "maxItems": 2
            },
            "description": "Informational notices (e.g. noRouteFound, noCoverage)"
        },
        "alertFields": {
            "type": "array",
            "items": [
                {
                    "const": "id"
                },
                {
                    "const": "cause"
                },
                {
                    "const": "effect"
                },
                {
                    "const": "header"
                },
                {
                    "const": "description"
                },
                {
                    "const": "validFrom"
                },
                {
                    "const": "validUntil"
                },
                {
                    "const": "operatorId"
                },
                {
                    "const": "countryIso"
                },
                {
                    "const": "serviceRefs"
                },
                {
                    "const": "stopRefs"
                }
            ],
            "additionalItems": false,
            "minItems": 11,
            "maxItems": 11,
            "description": "Column order for alerts rows"
        },
        "alerts": {
            "type": "array",
            "items": {
                "type": "array",
                "items": [
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Alert identifier"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "GTFS-RT alert cause"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "GTFS-RT alert effect"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Short alert headline"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Full alert text"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Alert start time"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Alert end time"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Operator identifier when the alert is operator-scoped"
                    },
                    {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 3166-1 alpha-3 country code for the operator"
                    },
                    {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "description": "Indexes into services affected by the alert"
                    },
                    {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "description": "Indexes into stops affected by the alert"
                    }
                ],
                "additionalItems": false,
                "minItems": 11,
                "maxItems": 11
            },
            "description": "Service alerts/disruptions affecting the result"
        },
        "localDate": {
            "type": "string",
            "description": "Local date in YYYY-MM-DD format"
        },
        "localTime": {
            "type": "string",
            "description": "Local time in HH:MM:SS format"
        }
    },
    "required": [
        "regionName",
        "serviceFields",
        "services",
        "departureFields",
        "departures",
        "stopServiceFields",
        "stopServices",
        "stopFields",
        "stops"
    ]
}

Response Codes

200 Compact departures retrieved successfully (or noCoverage notice if region not supported)
400 Invalid parameters or missing required fields
500 Internal server error