openapi: 3.0.3 info: title: Transit Locations Stop Departures API description: 'The Transit API delivers real-time public transit data - nearby routes and stops, stop departures, route details, multimodal trip planning, and service alerts - across 1,100+ cities in 37 countries, plus shared-mobility availability for bikes, scooters, and carshare. The API is publicly documented at https://api-doc.transitapp.com/ but access is key-gated: developers request an access key (free tier of 5 requests/minute and 1,500 requests/month) via Transit''s request form, and higher volumes are arranged with the partnerships team. Requests are made against https://external.transitapp.com/v3 and authenticated with an `apiKey` request header. An `Accept-Language` header selects the response language. Grounding note: the `apiKey` header, the `https://external.transitapp.com/v3` base URL, and the `GET /public/nearby_stops` endpoint (with `lat`, `lon`, and `max_distance` parameters) are confirmed from Transit''s public documentation and working integrations. The remaining endpoints (`nearby_routes`, `stop_departures`, `route_details`, `otp/plan`, `service_alerts`, `available_networks`) and their request/response shapes are modeled honestly from Transit''s documented v3 API surface, GTFS / GTFS-realtime conventions, and Transit''s public capability descriptions; they are marked with `x-modeled: true`. Confirm exact field names against the live docs once an access key is issued.' version: '3.0' contact: name: Transit Partnerships url: https://transitapp.com/partners/apis email: partners@transit.app x-logo: url: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg servers: - url: https://external.transitapp.com/v3 description: Transit public API v3 security: - apiKeyAuth: [] tags: - name: Stop Departures description: Upcoming departures for a specific stop. paths: /public/stop_departures: get: operationId: getStopDepartures tags: - Stop Departures summary: Get stop departures description: Returns the upcoming departures for a specific stop identified by its global_stop_id, grouped by route and direction, blending real-time predictions with scheduled times. x-modeled: true parameters: - name: global_stop_id in: query required: true description: The stable global stop identifier returned by nearby_stops. schema: type: string example: BMTC:stop:12345 - name: should_update_realtime in: query required: false description: When true, include live real-time predictions. schema: type: boolean default: true - name: Accept-Language in: header required: false description: Preferred response language (BCP 47). schema: type: string example: en responses: '200': description: Upcoming departures for the stop. content: application/json: schema: type: object properties: route_departures: type: array items: $ref: '#/components/schemas/RouteDepartures' '401': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/RateLimited' components: responses: RateLimited: description: Rate limit exceeded (free tier is 5 requests/minute, 1,500/month). content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid API key. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Departure: type: object properties: departure_time: type: integer description: Unix epoch seconds of the departure. example: 1751558400 is_real_time: type: boolean example: true is_cancelled: type: boolean example: false headsign: type: string example: Centre-ville Error: type: object properties: status: type: integer example: 401 message: type: string example: Invalid API key. RouteDepartures: type: object properties: global_route_id: type: string example: STM:route:747 route_short_name: type: string example: '747' direction_headsign: type: string example: Centre-ville departures: type: array items: $ref: '#/components/schemas/Departure' securitySchemes: apiKeyAuth: type: apiKey in: header name: apiKey description: Transit access key requested via Transit's API request form. Sent as the `apiKey` request header on every call.