Developer portal · Reference

API reference

The Trackser Live HTTP API — the endpoints that power the Trackser app, the parameters they take, and the shapes they return.

Conventions

Live snapshots

The primary feed. Each line's Durable Object publishes a pre-built snapshot; these endpoints read the latest one.

GET /live/{lineId}/map/latest.json

Latest map-area snapshot for a line — a superset that includes adjacent services shown on the app's map. gzip-compressed. Use /map/latest-plain.json for an uncompressed body.

GET /live/{lineId}/line/latest.json

Latest single-line snapshot including terminals. /line/latest-plain.json for uncompressed.

GET /live/{lineId}/{map|line}/latest-stats.json

Metadata and stats only — train count, build time, source health. Omits the trains[] array. Ideal for lightweight status polling.

GET /live/{lineId}/{trainNumber}/latest.json

Single-train lookup. ?flavor=map|line selects which snapshot to search (default line).

GET /live/all/line/latest.json

All lines merged into one response. Only the line flavour exists for all.

Response shape

{
  "as_of": "2026-07-07T18:48:49Z",
  "status": { "ok": true, "buildMs": 142 },
  "stats":  { "trainCount": 34 },
  "trains": [ /* Train objects — see the data model below */ ]
}

If no snapshot exists yet, the endpoint returns 202 with a warming body and triggers a build; retry shortly.

Journeys & units

Per-train and per-unit history for a railway day. Requests older than a key's historical window are gated.

EndpointReturns
GET /live/{lineId}/journeysAll journeys for today's railway day.
GET /live/{lineId}/journeys/{trainNumber}One train's journey. ?timetable=true folds in the booked working-timetable trip.
GET /live/{lineId}/journeys/{YYYY-MM-DD}All journeys for a historical railway day.
GET /live/{lineId}/journeys/{YYYY-MM-DD}/{trainNumber}A single historical journey.
GET /live/{lineId}/journeys/{trainNumber}/compareTimetable-vs-live comparison. ?date=YYYY-MM-DD.
GET /live/{lineId}/unitsAll physical units seen on a railway day. ?date=.
GET /live/{lineId}/units/{unitNo}One unit: its journeys[] and gapSightings[].

Journey shape

{
  "trainNumber": "460",
  "railwayDay": "2026-07-07",
  "stops": [
    { "time": "18:41:00", "location": "Baker Street", "platform": "5", "direction": "northbound" }
  ]
}

Stations

{code} is a station registry code (e.g. WPK for Wembley Park).

EndpointReturns
GET /station/{code}Station info: {code, name, lines[], timetableAvailable}.
GET /station/{code}/boardLive departure board across all lines serving the station. ?limit (default 10, max 50).
GET /station/{code}/timetableScheduled departures. ?direction, ?from/?to (HH:MM).
GET /station/{code}/departuresMerged live + scheduled board, with a booked-platform signal.
GET /station/{code}/historyPast sightings. ?date=YYYY-MM-DD (required), ?from/?to.

Board shape

{
  "station": "Wembley Park",
  "code": "WPK",
  "asOf": "2026-07-07T18:48:49Z",
  "departures": [{
    "lineId": "metropolitan",
    "trainNumber": "460",
    "towards": "Aldgate",
    "direction": "southbound",
    "currentLocation": "Approaching Wembley Park",
    "secondsAway": 90,
    "stopsAway": 1,
    "platform": "3",
    "platformInfo": { "number": "3", "source": "confirmed-location", "confidence": "high" },
    "stoppingPattern": "All Stations"
  }]
}

Timetables

Working-timetable data. Currently published for the Metropolitan and Chiltern lines.

EndpointReturns
GET /timetables/{lineId}/{dayType}/{direction}Timetable for a line, day type and direction. ?date= override.
GET /timetables/{lineId}/{timetableId}/{dayType}/{direction}A specific timetable version.
GET /timetables/{lineId}/listAvailable timetable IDs for a line.
GET /timetables/{lineId}/{YYYY-MM-DD}The schedule entry effective for a date.

dayType is one of m-f, sat, sun, current; direction is northbound or southbound.

Replay archive

Archived historical snapshots. Only the map flavour is archived.

EndpointReturns
GET /replay/{lineId}/listArchived snapshot keys for a day. ?day=YYYY-MM-DD, ?flavor=map.
GET /replay/get?objectKey=…Fetch one archived snapshot by object key.

Object keys follow archive/{lineId}/trains/map/{YYYY-MM-DD}/{HH}-{MM}-{SS}.json and are validated to prevent traversal. Snapshots older than a key's window require a pro/admin key.

Release history public

GET /releases

Public component release history — returned as a page, or JSON with ?format=json.

Status & health

EndpointReturns
GET /admin/status{ now, overall: "ok"|"degraded", monitorStatus, lines[] } — per-line up/down, tuned for uptime monitors.
GET /admin/healthAdds deploy version and per-line meta (last build, train count, consecutive failures).
GET /live/{lineId}/{map|line}/latest-stats.jsonPer-line freshness and stats without the train list.

These endpoints power this site's status page, which reports per-line pipeline health.

The Train object

The record emitted in every live snapshot's trains[] array. Selected fields:

FieldTypeMeaning
idstringUnique id, lineId:trainNumber.
lineIdstringLine slug.
trainNumberstringLU train number or NR headcode. trainNumberInferred flags inference.
sourcetrackernet | unifiedWhich upstream feed produced the record.
currentLocationstringLive positional text, e.g. "At Baker Street Platform 5" or "Between X and Y".
directionstringCardinal direction, e.g. northbound.
towards / nextTowardsstringDestination(s).
stoppingPatternstringe.g. All Stations, Semi Fast, Fast, Booked: ….
leadingCarNo / rearCarNostringPhysical unit identifiers.
isMaybeStalledbooleanStall inference; paired with stallDurationSeconds, stallSince.
isReformed / oldTrainNumberReformation tracking.
polledStationNamestringStation whose countdown produced this sighting — not reliably the next stop (see data sources).

Errors & status codes

CodeBodyMeaning
200JSON bodySuccess.
202warmingNo snapshot built yet; a build was triggered. Retry shortly.
404HTML error pageUnknown path (paths are gated by an allow-list).
✉️

Endpoints evolve with the app. If something here doesn't match what you're seeing, or you need access, email [email protected].