UK Passenger Transport API documentation

The Phase 1 API provides a consistent national location and identifier layer for UK public transport. Responses are JSON and all protected requests use an API key.

Free accounts include 10,000 requests per calendar month, with a 60 requests-per-minute limit.

Authentication

Send your key in the X-API-Key request header. Create an account to issue, rotate and revoke your own keys from the account dashboard.

curl -H "X-API-Key: ukpt_…" \
  "https://api.ukpt.botric.co.uk/v1/locations/search?q=Preston"

Interactive reference

Explore request parameters, response schemas and status codes in the generated OpenAPI reference.

Open API reference

Data sources, coverage and refresh times

Refresh times use Europe/London time. Live feeds may arrive late during upstream outages; scheduled quality checks monitor freshness and import coverage.

DatasetGathered fromRefreshCoverage
Bus stops and localitiesNaPTAN and NPTG, Department for TransportDaily overnightNames, coordinates, ATCO/NaPTAN codes and locality hierarchy
Rail-replacement stopsDfT NaPTAN Rail Replacement LocationsDaily at 00:45Official replacement-stop locations, ATCO codes and station links
Bus services, routes and calling patternsBus Open Data Service (BODS), TransXChangeOne NOC every hour; full catalogue continuously cyclesEnglish registered bus timetables, route numbers, LineRef and ServiceCode
Bus operators and NOC codesBODS operator catalogueRefreshed during each hourly NOC passOperator identities, NOC codes and dataset import state
Live bus vehicle positionsBus Open Data Service (BODS), SIRI-VMPolled every 15 seconds; positions expire after 10 minutesVehicle references, lines, journeys, GPS coordinates, bearings and destinations where supplied
Rail stations and identifiersNational Rail Knowledgebase and Network Rail CORPUSKnowledgebase daily at 06:00; CORPUS weekly SundayStations, accessibility, CRS, TIPLOC, STANOX, NLC and UIC identifiers
Planned trains and replacement busesNetwork Rail Schedule/CIFDaily at 05:50; rolling horizon up to about 12 weeksPlanned calling patterns, UIDs, TOCs and category BR replacement buses
Near-term rail timetableNational Rail Darwin Timetable FilesChecked daily at 05:40Dated operational timetables and planned station calls
Live trains and replacement servicesNational Rail Darwin realtime KafkaContinuous, normally within secondsRIDs, estimates, actual times, platforms and cancellations
London transportTransport for London Unified APIDaily at 05:00London Underground, bus, tram and other supported TfL lines
Regional tram and metroTraveline National Dataset (TNDS)Weekly Sunday at 05:30Manchester Metrolink, Sheffield Supertram and other available urban networks

Location endpoints

MethodPathPurpose
GET/v1/locationsList and filter transport locations
GET/v1/locations/{id}Fetch one location and all known identifiers
GET/v1/locations/search?q=Search locations by name
GET/v1/locations/near?lat=&lon=&radius=Find locations within a radius in metres
GET/v1/resolve?crs=&naptan=&atco=&tiploc=Resolve a source identifier
GET/v2/locations/{type}List locations by tag, for example RailReplacement
GET/v2/rail/stations/{crs}/nearby-bus-services?distance=500List bus operators, routes, destinations and calling patterns near a 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 with matched operator tags
GET/v1/tfl/stationsList TfL rail and metro stations
GET/v1/tfl/bus-stopsList TfL bus stops
GET/v1/tfl/operatorsList operators safely matched to TfL lines
GET/v1/tfl/search?q=Search TfL lines, locations and operators
GET/v1/tfl/bus/{route_number}Get operators, calling patterns and identified stops for a TfL bus route
GET/v1/tfl/rail/{line_name}Get every calling-pattern variation and stop for a TfL rail line
GET/v1/tfl/rail/statusGet current TfL rail network status, cached for 60 seconds