Overview
Products
Reference
Documentation
TransCAPI is a REST API for public transport across Great Britain: stops and places, bus and rail departures and arrivals, routes and services, live vehicles, disruptions, journey planning, reachable areas and travel times, bus punctuality, and push alerts that tell your server when something happens. One key, plain JSON.
New here? Getting started has a working request in each area, and Authentication covers the key.
What to know before you build
A few things work differently from other transport data, and they're the things that matter once real passengers use your app.
| Every time says where it came from | Departures carry source: darwin for live rail, avl or siri_vm for a tracked bus, gtfs_scheduled for the timetable. Show a live time as live and a timetabled one as timetabled. See rail and bus. |
| Disruptions can be matched to a route | Pass a journey's path as path and only disruptions touching it come back. Line numbers repeat across towns, so this is the reliable way to ask "what affects this journey". See matching a disruption to a route. |
| Buses link to their exact trip | A live vehicle, a departure and a service share one trip_id, so "where is my bus" is a lookup, not a guess. The timetable is refreshed daily so those ids match the buses on the road. See live vehicles. |
| You don't have to poll | Instead of asking every minute, register a push alert and TransCAPI posts to your server when a bus is minutes away or a disruption matches your filters. It's kinder to your rate limit and quicker for your users. |
| Stops say which way | Stops sharing a name, usually on opposite sides of a road, are told apart by towards, derived from the journeys that call there. Put it next to the name. |
Missing data is null, not a guess |
A route with no published geometry has shape: null. A bus outside tracked areas has delay_seconds: null. Journey planning outside its coverage returns 422 outside_coverage rather than an empty list. Design for the null. |
| Attribution is required | The open data licences behind TransCAPI apply to your app too. Data sources & attribution has the line to show. |
Coverage
England, Scotland and Wales. Journey planning covers Great Britain; live bus delays and punctuality cover wherever operators report bus positions to the Bus Open Data Service: most of England, some of Wales and little of Scotland. The full picture, and what isn't covered, is on Data sources.
Tools
- Swagger reference and OpenAPI spec, generated from the live API.
- Postman collection: every endpoint with working example values. Import it, set
api_key, and send. - Building with an AI assistant? Point it at llms.txt (or llms-full.txt for every parameter) and it will write correct requests.
- MCP server: lets assistants such as Claude answer "when's the next train from Leeds?" with live data, using your key.