railinfo

Developers

The same live data behind this site, free to use — a REST API for your code and an MCP server for your AI agents.

REST API

Base URL: https://api.railinfo.uk — JSON, no key required.

EndpointWhat it returns
GET /stations?q=readingStation search (name or CRS code)
GET /stations/allEvery GB station with its CRS code
GET /boards/RDG/departuresLive departures: platform, expected time, delay, cancellations
GET /boards/RDG/arrivalsLive arrivals
GET /journeys?from=RDG&to=OXFJourney plan (direct + one change) with live status; optional date, time, direct
GET /map/trainsEstimated live positions of every tracked train
GET /stats/summaryCurrent network stats (punctuality, cancellations…)

Full interactive reference: api.railinfo.uk/docs

curl "https://api.railinfo.uk/boards/PAD/departures?limit=5"

MCP server (for AI agents)

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 code
  • get_departures / get_arrivals — live boards
  • plan_journey — routes between two stations with live status

Example — 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" }
  }
}

Fair use

  • REST API: 240 requests/minute per IP
  • MCP: 60 requests/minute per IP

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.