Get next departures from transit stops

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

Retrieve scheduled and real-time departure information from public transport stops. Two modes: search by coordinates (location) or query a specific stop (stopId + regionName from /v1/stopsInRadius response)

Using this data in a voice model?

The Voice Model-Ready endpoint preserves answer-critical transit facts while reducing response tokens and map-only data.

View the Voice Model-Ready endpoint →

Response fields and units

FieldFormat / unitMeaning
requestTime Unix epoch seconds The request instant
localDate, localTime YYYY-MM-DD, HH:MM:SS Request time in the stop's local timezone
stopDepartures[].departureList[].scheduledDepartureTime ISO 8601 Scheduled departure time
stopDepartures[].departureList[].realtimeDepartureTime ISO 8601 Live departure time; absent when live data is unavailable
countryIso, countryUrl string or null Null for WikiRoutes stop, route and agency identifiers, which do not carry an ISO3 prefix
stopDepartures[].stopLat, stopDepartures[].stopLon WGS 84 decimal degrees Stop coordinates
imperial boolean Optional flag, present as true for US/UK; numeric distance fields remain in meters
processingTimeMs milliseconds Server processing time

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). This is an API-specific ID, not an external code (e.g. not NaPTAN/ATCO). Obtain it from the stopId field in /v1/stopsInRadius response. Required if location is not provided. Must be used together with regionName and countryIso. Cannot be combined with location 8150831397776266088
regionName string No Region name, required when using stopId mode. Obtain from the regionName field in /v1/stopsInRadius response uk_ireland
countryIso string On busmaps.com ISO 3166-1 alpha-3 country code from /v1/stopsInRadius response. Required on the busmaps.com host (stopId mode); must be omitted 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 /v1/routes or the stop or location for /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)
/v1/nextDepartures scheduledDepartureTime (ISO 8601) realtimeDepartureTime (ISO 8601; live only)
/v1/routes section departure.time / arrival.time (full ISO 8601) section departure.rtDeparture / arrival.rtArrival (full ISO 8601); same on intermediateStops[]
  • When no live data exists, object responses omit their real-time field. Fall back to the scheduled value.
  • 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/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/v1/nextDepartures?stopId=8150831397776266088&regionName=uk_ireland&countryIso=GBR&results=30"

Response Example

{
    "requestTime": 1786652400,
    "stopDepartures": [
        {
            "stopId": "12749834648374944315",
            "countryIso": "GBR",
            "countryUrl": "uk",
            "stopName": "Camden Town Underground Station",
            "urlStopName": "Camden-Town-Underground-Station",
            "stopLat": 51.539258,
            "stopLon": -0.142972,
            "stopDesc": "",
            "wheelchairBoarding": 2,
            "departureList": [
                {
                    "tripId": "1-430b49e3dd4e20ccdfe3",
                    "platformCode": "2",
                    "routeId": "3173742969-2726050097",
                    "countryIso": "GBR",
                    "countryUrl": "uk",
                    "routeShortName": "Northern",
                    "routeLongName": "Morden/Battersea Power Station - Bank/Charing Cross - Camden Town - Edgware/High Barnet/Mill Hill East",
                    "urlRouteShortName": "Northern",
                    "routeDesc": null,
                    "routeColor": "000000",
                    "routeTextColor": "FFFFFF",
                    "routeType": "subway",
                    "tripHeadsign": "Morden via Bank",
                    "scheduledDepartureTime": "2026-08-13T21:22:00+01:00",
                    "wheelchairAccessible": 1,
                    "agencyId": "2264224218-1585141307"
                },
                {
                    "tripId": "1-3a5cfbc22292f4da5c4a",
                    "platformCode": "2",
                    "routeId": "3173742969-2726050097",
                    "countryIso": "GBR",
                    "countryUrl": "uk",
                    "routeShortName": "Northern",
                    "routeLongName": "Morden/Battersea Power Station - Bank/Charing Cross - Camden Town - Edgware/High Barnet/Mill Hill East",
                    "urlRouteShortName": "Northern",
                    "routeDesc": null,
                    "routeColor": "000000",
                    "routeTextColor": "FFFFFF",
                    "routeType": "subway",
                    "tripHeadsign": "Kennington Station via Charing Cross",
                    "scheduledDepartureTime": "2026-08-13T21:25:00+01:00",
                    "wheelchairAccessible": 1,
                    "realtimeDepartureTime": "2026-08-13T21:26:00+01:00",
                    "agencyId": "2264224218-1585141307"
                }
            ],
            "agencies": [
                {
                    "agencyId": "2264224218-1585141307",
                    "countryIso": "GBR",
                    "countryUrl": "uk",
                    "agencyName": "London Underground (TfL)",
                    "urlAgencyName": "London-Underground-TfL",
                    "agencyUrl": "https://www.traveline.info",
                    "agencyPhone": "03432221234"
                }
            ]
        }
    ],
    "localDate": "2026-08-13",
    "localTime": "21:20:00",
    "regionName": "uk_ireland",
    "imperial": true,
    "processingTimeMs": 59.65
}

Response Schema

View JSON Schema
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Next Departures v1 Response",
    "type": "object",
    "properties": {
        "stopDepartures": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "departureList": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "countryIso": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
                                },
                                "scheduledDepartureTime": {
                                    "type": "string",
                                    "description": "Scheduled departure time (ISO 8601)"
                                },
                                "realtimeDepartureTime": {
                                    "type": "string",
                                    "description": "Live departure time (ISO 8601); present only when available"
                                },
                                "tripId": {
                                    "type": "string",
                                    "description": "Internal trip identifier"
                                },
                                "routeShortName": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Route short name (e.g., '906')"
                                },
                                "routeColor": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Route color as a hex string"
                                },
                                "tripHeadsign": {
                                    "type": "string",
                                    "description": "Destination/headsign"
                                },
                                "wheelchairAccessible": {
                                    "type": "integer",
                                    "description": "Wheelchair accessibility of the trip",
                                    "enum": [
                                        1,
                                        2
                                    ]
                                },
                                "agencyId": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Internal agency identifier"
                                },
                                "routeTextColor": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Route text color as a hex string"
                                },
                                "routeDesc": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Additional route description"
                                },
                                "urlRouteShortName": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "URL-safe slug of the route short name"
                                },
                                "countryUrl": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Country URL slug (e.g. 'uk')"
                                },
                                "routeId": {
                                    "type": "string",
                                    "description": "Internal route identifier"
                                },
                                "routeType": {
                                    "type": "string",
                                    "description": "Type of transport (bus, subway, train, tram)"
                                },
                                "platformCode": {
                                    "type": "string",
                                    "description": "Platform or stand code"
                                },
                                "routeLongName": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Full route description"
                                },
                                "urlRouteLongName": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "URL-safe slug of the route long name"
                                }
                            },
                            "required": [
                                "tripHeadsign",
                                "countryIso",
                                "scheduledDepartureTime",
                                "agencyId",
                                "urlRouteShortName",
                                "countryUrl",
                                "routeId",
                                "routeShortName",
                                "routeType"
                            ]
                        },
                        "description": "List of departures from this stop"
                    },
                    "countryIso": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
                    },
                    "stopId": {
                        "type": "string",
                        "description": "Unique stop identifier"
                    },
                    "stopLon": {
                        "type": "number",
                        "description": "Stop longitude in decimal degrees"
                    },
                    "stopName": {
                        "type": "string",
                        "description": "Human-readable stop name"
                    },
                    "stopLat": {
                        "type": "number",
                        "description": "Stop latitude in decimal degrees"
                    },
                    "countryUrl": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "Country URL slug (e.g. 'uk')"
                    },
                    "wheelchairBoarding": {
                        "type": "integer",
                        "description": "Wheelchair accessibility of the stop",
                        "enum": [
                            1,
                            2
                        ]
                    },
                    "stopCode": {
                        "type": "string",
                        "description": "Public stop code shown to passengers"
                    },
                    "stopDesc": {
                        "type": "string",
                        "description": "Additional stop description (direction, platform hint)"
                    },
                    "urlStopName": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "URL-safe slug of the stop name"
                    },
                    "agencies": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "agencyUrl": {
                                    "type": "string",
                                    "description": "Agency website URL"
                                },
                                "countryIso": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
                                },
                                "agencyId": {
                                    "type": "string",
                                    "description": "Internal agency identifier"
                                },
                                "urlAgencyName": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "URL-safe slug of the agency name"
                                },
                                "countryUrl": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Country URL slug (e.g. 'uk')"
                                },
                                "agencyPhone": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Agency contact phone"
                                },
                                "agencyName": {
                                    "type": "string",
                                    "description": "Agency name"
                                }
                            },
                            "required": [
                                "agencyUrl",
                                "countryIso",
                                "agencyId",
                                "urlAgencyName",
                                "countryUrl",
                                "agencyName"
                            ]
                        },
                        "description": "Agencies operating departures from this stop"
                    }
                },
                "required": [
                    "departureList",
                    "countryIso",
                    "stopId",
                    "countryUrl",
                    "stopLon",
                    "stopName",
                    "stopLat",
                    "urlStopName",
                    "agencies"
                ]
            },
            "description": "Array of stop departures"
        },
        "imperial": {
            "type": "boolean",
            "description": "Optional flag, present as true for US/UK; numeric distance fields remain in meters"
        },
        "localDate": {
            "type": "string",
            "description": "Local date in YYYY-MM-DD format"
        },
        "regionName": {
            "type": "string",
            "description": "Transit data region that served the request"
        },
        "alerts": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "countryIso": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
                    },
                    "operator": {
                        "type": "string",
                        "description": "Operator identifier of the alert"
                    },
                    "informedEntity": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "routeId": {
                                    "type": "string",
                                    "description": "Internal route identifier"
                                },
                                "countryIso": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
                                },
                                "countryUrl": {
                                    "type": [
                                        "null",
                                        "string"
                                    ],
                                    "description": "Country URL slug (e.g. 'uk')"
                                },
                                "stopId": {
                                    "type": "string",
                                    "description": "Unique stop identifier"
                                }
                            }
                        },
                        "description": "Entities (route/stop) the alert applies to"
                    },
                    "id": {
                        "type": "string",
                        "description": "Identifier"
                    },
                    "header": {
                        "type": "string",
                        "description": "Short alert headline"
                    },
                    "effect": {
                        "type": "string",
                        "description": "GTFS-RT alert effect"
                    },
                    "validFrom": {
                        "type": "string",
                        "description": "Alert start time (ISO 8601)"
                    },
                    "countryUrl": {
                        "type": [
                            "null",
                            "string"
                        ],
                        "description": "Country URL slug (e.g. 'uk')"
                    },
                    "cause": {
                        "type": "string",
                        "description": "GTFS-RT alert cause"
                    },
                    "description": {
                        "type": "string",
                        "description": "Full alert text"
                    },
                    "validUntil": {
                        "type": "string",
                        "description": "Alert end time (ISO 8601)"
                    },
                    "origin": {
                        "type": "string",
                        "description": "Source/origin of the alert"
                    },
                    "url": {
                        "type": "string",
                        "description": "Link with more information"
                    }
                },
                "required": [
                    "countryIso",
                    "id",
                    "operator",
                    "header",
                    "effect",
                    "countryUrl",
                    "cause",
                    "description",
                    "informedEntity",
                    "origin"
                ]
            },
            "description": "Service alerts/disruptions affecting the result"
        },
        "message": {
            "type": "string",
            "description": "Human-readable message when no result data is available"
        },
        "notices": {
            "type": "array",
            "description": "Informational notices such as noCoverage",
            "items": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "description": "Notice code"
                    },
                    "title": {
                        "type": "string",
                        "description": "Human-readable notice title"
                    },
                    "regionOrigin": {
                        "type": "string",
                        "description": "Origin region"
                    },
                    "regionDestination": {
                        "type": "string",
                        "description": "Destination region"
                    }
                },
                "required": [
                    "code",
                    "title"
                ]
            }
        },
        "requestTime": {
            "type": "integer",
            "description": "Request time as a Unix timestamp in seconds"
        },
        "processingTimeMs": {
            "type": "number",
            "description": "Processing time in milliseconds"
        },
        "localTime": {
            "type": "string",
            "description": "Local time in HH:MM:SS format"
        }
    },
    "oneOf": [
        {
            "required": [
                "stopDepartures"
            ],
            "not": {
                "required": [
                    "message"
                ]
            }
        },
        {
            "required": [
                "message"
            ],
            "not": {
                "required": [
                    "stopDepartures"
                ]
            }
        }
    ]
}

Response Codes

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