Developer documentation

UK public transport data in one API

Search national stops and stations, resolve source identifiers, and explore operators, routes and ordered calling patterns across bus, rail, tram and metro datasets.

1. Create an account

Verify your email and open the account dashboard.

Sign up

2. Create a key

Name the key and copy it when shown. Plaintext is displayed once.

3. Send requests

Include the key in the X-API-Key header.

Quick start

curl -H "X-API-Key: ukpt_your_key" \
+  "https://api.ukpt.botric.co.uk/v1/locations/search?q=Manchester%20Piccadilly"

Endpoints

MethodPathPurpose
GET/v1/locationsList and filter transport locations
GET/v1/locations/search?q=PiccadillySearch locations by name
GET/v1/locations/near?lat=&lon=&radius=Find nearby locations
GET/v1/operators?mode=tramList operators by mode
GET/v1/operators/{id}/routesList routes for one operator
GET/v1/routes?mode=metroList routes by mode
GET/v1/routes/{id}/stopsGet a route’s ordered stops
GET/v1/resolve?crs=&naptan=&atco=&tiploc=Resolve source identifiers
GET/v2/locations/RailReplacementList tagged rail-replacement stops
GET/v2/rail/stations/{crs}/nearby-bus-services?distance=500Find bus operators and routes near a rail station
GET/v1/rail/railreplacement?date=YYYY-MM-DD&toc=XXList live and 12-week planned replacements; TOC is optional
GET/v1/rail/railreplacement/{rid}Get a replacement journey and linked ATCO stops
GET/v1/rail/railreplacement/{uid}/{date}Get a future or live replacement by UID and date
GET/v1/rail/train/{rid}Get an ordered rail journey by RID
GET/v1/tfl/railList TfL rail, Tube, DLR and tram lines
GET/v1/tfl/busList TfL bus lines and matched operating-company tags
GET/v1/tfl/stationsList TfL stations
GET/v1/tfl/bus-stopsList TfL bus stops
GET/v1/tfl/operatorsList operators matched to TfL lines
GET/v1/tfl/search?q=FirstLondonSearch TfL lines, stops, stations and operators
GET/v1/tfl/bus/{route_number}Get a TfL bus route with operators, patterns and identified stops
GET/v1/tfl/rail/{line_name}Get all calling patterns and stops for a TfL rail line
GET/v1/tfl/rail/statusGet current TfL rail network status

Authentication and limits

Keys are scoped to your account and can be rotated or revoked immediately. Free keys include 10,000 requests per calendar month and allow 60 requests per minute. Responses include quota headers.

Coverage

NaPTAN/NPTG supplies national locations, BODS supplies English bus timetables, TfL supplies London modes, TNDS supplies selected tram and metro timetables, and DfT supplies rail-replacement locations. Network Rail and National Rail feeds supply rail identifiers, schedules, live running updates, incidents, accessibility and operator status.

Open interactive API reference