The same live data behind this site, free to use — a REST API for your code and an MCP server for your AI agents.
Base URL: https://api.railinfo.uk — JSON, no key required.
| Endpoint | What it returns |
|---|---|
GET /stations?q=reading | Station search (name or CRS code) |
GET /stations/all | Every GB station with its CRS code |
GET /boards/RDG/departures | Live departures: platform, expected time, delay, cancellations |
GET /boards/RDG/arrivals | Live arrivals |
GET /journeys?from=RDG&to=OXF | Journey plan (direct + one change) with live status; optional date, time, direct |
GET /map/trains | Estimated live positions of every tracked train |
GET /stats/summary | Current network stats (punctuality, cancellations…) |
Full interactive reference: api.railinfo.uk/docs
curl "https://api.railinfo.uk/boards/PAD/departures?limit=5"
Point any MCP-capable agent (Claude, and others) at our Model Context Protocol endpoint and it can search stations, read live boards and plan journeys:
https://api.railinfo.uk/mcp
Streamable HTTP transport, stateless, no authentication. Tools provided:
search_stations — resolve a station name to its CRS codeget_departures / get_arrivals — live boardsplan_journey — routes between two stations with live statusExample — add it to Claude Code:
claude mcp add --transport http railinfo https://api.railinfo.uk/mcp
Or in a JSON MCP config:
{
"mcpServers": {
"railinfo": { "type": "http", "url": "https://api.railinfo.uk/mcp" }
}
}Over the limit you'll get 429 with a Retry-After header. Be
kind: cache what you can. Data derives from Network Rail & National Rail (Darwin)
open feeds and comes with no warranty — don't run your railway on it.