Public Transit API

Transit routing, real-time vehicle data, timetables, geocoding across 90+ countries

Base URL: https://capi.busmaps.com:8443 Machine-readable v1 contract (JSON)
Current contract: v1

Current API contract for new integrations. This documentation, its examples, and its response schemas are stored independently from every other API version.

Building a voice model or voice agent?

Voice Model-Ready endpoints provide smaller, answer-focused versions of routes, departures, nearby stops, timetables, walking directions, and place search.

Open the Voice Model-Ready endpoint documentation
Explore this API with an AI agent

The public MCP server exposes schemas, examples, and limited live requests without an API key. Production applications call the REST API with their own key.

Open the MCP explorer

Authentication

All API requests require authentication using API key and host headers

Tell us about your project, required coverage and expected usage. After email confirmation, eligible accounts receive London Demo access while we review the requested commercial scope. Your key and current access are shown in your account.

All API use requires attribution to busmaps.com and confidential handling of credentials. The standard terms prohibit scraping, bulk collection, persistent storage and resale of API data. Additional usage rights require an individual written API agreement. Read the API usage terms.

An inactive key returns HTTP 403 with detail: "api_key_inactive", a readable message and an activation_url. Requests rejected for inactive access do not consume your quota. Confirm your email if required, or review the access status in your account. A disabled key remains disabled until its access is restored. An unknown key continues to return HTTP 401 with detail: "invalid_token".

Required Headers

capi-key Required

Bearer token with your API key

Format: Bearer YOUR_API_KEY
capi-host Required

Platform host for data source

Options: busmaps.com wikiroutes.info

Platform Hosts

busmaps.com

Global transit data coverage (official data from busmaps.com)

wikiroutes.info

Coverage provided by wikiroutes.info crowdsourcing project

London Demo access

Demo access has no expiry date. Use it to evaluate London examples while we discuss your project's coverage, volume and commercial terms. It does not include paid enhanced dataset delivery, custom bulk export services or permission to collect and store API responses in bulk. Original-source GTFS catalog links remain available subject to each publisher's source license; they do not grant a BusMaps dataset subscription.

Demo includes 5,000 API requests per month. Quotas reset at the start of each calendar month in UTC. An exceeded limit returns HTTP 429.

Coordinate-based requests are checked against the London access area, with a 2 km boundary buffer. Route endpoints, search areas and vehicle bounding boxes must fit their geographic checks. ID-based requests and other methods without a geographic check retain their current behavior; responses are not clipped to London.

A checked request outside the allowed area returns HTTP 403 with geographic_access_denied and consumes no quota. Use the London presets below or contact our team to discuss access for another region. An unavailable method returns endpoint_not_available.

Paid and individually agreed access retain their own coverage and limits. Request API access for your project; your effective policy is shown in your account.

Example Request

curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/v1/routes?origin=51.537511,-0.152208&destination=51.531921,-0.082569"

Available endpoints

/v1/routes

Calculate optimal public transport routes with real-time data integration

/v1/nextDepartures

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)

/v1/stopsInRadius

Search for all public transport stops within a given radius of coordinates

/v1/line

Return a route's full timetable: directions, ordered stops, inline geometry and the schedule as a trips x stops grid. Addressed by routeId + regionName from a /v1/stopsInRadius or /v1/nextDepartures response. countryIso is required on the busmaps.com host and must be omitted on wikiroutes.info. The embedded alerts[] block is a busmaps.com feature only - wikiroutes.info responses never include it.

/v1/alerts

Return current service alerts (disruptions) filtered to a single route or a single operator. Lightweight alternative to fetching the whole /v1/line card just for its alerts: call it in parallel with the route/operator screen. Pass exactly one of routeId or operatorId. Alerts are a busmaps.com feature only - wikiroutes.info has none, so there is no reason to call this endpoint there. The alert objects are identical to the alerts[] embedded in /v1/line and /v1/nextDepartures.

/v1/trip

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 /v1/nextDepartures or /v1/rawVehiclePositions response.

/v1/rawVehiclePositions

Retrieve raw real-time vehicle positions within specified geographic bounds. positionType: 'gps' - real position, 'estimated' - derived from trip updates. Can be filtered by route (routeId + countryIso) or trip (tripId). Real-time vehicle positions are a busmaps.com feature only - wikiroutes.info has none, so there is no reason to call this endpoint there.

/v1/transit/isochrone

Calculate public transport and walking reachability. Contours are cumulative, not separate bands. Region selection follows the point or shape unless regionName is supplied. Walking follows the barrier data available in that region. Only documented parameters are accepted. Stop lists and the internal walking-grid controls are not exposed. Errors use HTTP error statuses and a JSON cause; no-coverage and no-route results use HTTP 200 with notices. By default each polygon ring is encoded as a separate polyline with 6 decimal places. The first ring is the exterior and following rings are holes. Use geometry=geojson for coordinate arrays.

/v1/transit/isochroneFromShape

Calculate public transport and walking reachability. Contours are cumulative, not separate bands. Region selection follows the point or shape unless regionName is supplied. Walking follows the barrier data available in that region. Only documented parameters are accepted. Stop lists and the internal walking-grid controls are not exposed. Errors use HTTP error statuses and a JSON cause; no-coverage and no-route results use HTTP 200 with notices. By default each polygon ring is encoded as a separate polyline with 6 decimal places. The first ring is the exterior and following rings are holes. Use geometry=geojson for coordinate arrays.

/v1/car/route/{coordinates}

Calculate driving routes between coordinates through the full-planet OSRM car service. This shared service is independent of the selected BusMaps or WikiRoutes transit data host and is available with either capi-host value. Query parameters are forwarded to the OSRM route service without changing the response contract.

/v1/car/matrix/{coordinates}

Calculate driving distance and duration matrices through the full-planet OSRM car service. This shared service is independent of the selected BusMaps or WikiRoutes transit data host and is available with either capi-host value. Query parameters are forwarded to the OSRM table service without changing the response contract.

/v1/pedestrian/route/{coordinates}

Calculate optimal walking routes between coordinates using OSRM pedestrian routing. This shared service is independent of the selected BusMaps or WikiRoutes transit data host and is available with either capi-host value. Prioritizes pedestrian infrastructure like sidewalks and footpaths. Compatible with OSRM API specification.

/v1/pedestrian/matrix/{coordinates}

Calculate distance and duration matrices between multiple coordinates for pedestrian routing. This shared service is independent of the selected BusMaps or WikiRoutes transit data host and is available with either capi-host value. Compatible with OSRM matrix API.

/v1/nominatim/reverse

Convert geographic coordinates into an address using OpenStreetMap Nominatim. The included example and response schema describe the default jsonv2 format. Other response formats and the complete parameter reference are documented by Nominatim: https://nominatim.org/release-docs/latest/api/Reverse/. This proxy removes the top-level licence field.

/v1/nominatim/search

Search for locations by name, address, or place using OpenStreetMap Nominatim. The included example and response schema describe the default jsonv2 format. Other response formats and the complete parameter reference are documented by Nominatim: https://nominatim.org/release-docs/latest/api/Search/. Results are unique: each place is returned once. The top-level licence field is removed.

Common Response Fields

processingTimeMs

number

Processing time in milliseconds

HTTP Status Codes

200

Success

400

Bad Request (invalid parameters)

500

Internal Server Error

502

Bad Gateway (service temporarily unavailable)