Rail

Rail station and scheduled service data covers the whole of Great Britain (~2,600 stations, all national operators). Stations are identified by their 3-letter CRS code (e.g. LDS for Leeds, PAD for London Paddington, EDB for Edinburgh).

Find stations

GET /v1/rail/stations.json?lat={lat}&lon={lon}&radius={metres}

Or by bounding box: min_lat/min_lon/max_lat/max_lon.

Departures

GET /v1/rail/station_timetables/{crs_code}.json

Returns scheduled departures — operator, destination and aimed departure time — for the requested station within a time window (from_offset/to_offset minutes, default the next 60 minutes). This is currently scheduled-timetable data only; there is no real-time/live rail feed integrated yet (unlike bus, which has live BODS SIRI-VM matching), so there's no live parameter on this endpoint.

Example:

curl "https://api.transcapi.com/v1/rail/station_timetables/LDS.json?to_offset=120" \
  -H "X-Api-Key: YOUR_API_KEY"

Check the changelog for updates as coverage expands.