Punctuality

SNCB: belgium's national train operator

Format
Parquet
Updates
Daily (one file per Brussels-day, anchored to 00:00 Europe/Brussels)
Latest snapshot
Snapshots stored
about 687
curl -H "Authorization: Bearer $MOBILITYTWIN_TOKEN" -o punctuality.parquet "https://api.mobilitytwin.brussels/sncb/punctuality"

Daily punctuality table derived from SNCB/NMBS's GTFS-RT trip-update stream over a full Brussels-day window.

Each row represents one (trip, stop) observation with the latest known arrival/departure times, delays, and schedule_relationship — plus a synthetic row per cancelled trip when the feed signals cancellation without stop-time entries.

Single Parquet file (zstd-compressed). Read with Polars, DuckDB or PyArrow. Trip ids are the realtime feed's: they lack the gt:nmbssncb: prefix of the published GTFS and often end with a different validity date, so join on the id without the prefix and without its last : component. From 2026-09-30, route_id is filled from the timetable where the trip matches (about 90%). direction_id and stop_sequence are always null: SNCB publishes neither, in realtime or in its timetable.

A single Parquet file. Read it with Polars, DuckDB or PyArrow.

Which days have data

Data from 21 Aug 2024 to 1 Nov 2026, on 795 days. 30 of the last 30 days have data. A typical day holds 1 snapshot. Days are in UTC.

2026
JanFebMarAprMayJunJulAugSepOctNovDec
2025
JanFebMarAprMayJunJulAugSepOctNovDec
2024
JanFebMarAprMayJunJulAugSepOctNovDec
  • Full day
  • Partial, 50–90% of a typical day
  • Low, under 50%
  • No snapshot
  • Not expected

Click a day above, or pick a date, to get its requests.

Parameters

NameMeaning
timestampReturn the last snapshot at or before this moment, in Unix seconds or ISO 8601 (e.g. 2026-05-06T12:00:00Z). Without it, the latest snapshot is returned.

Python example

# pip install polars requests
import io
import requests
import polars as pl

from datetime import datetime, timedelta, timezone

yesterday_noon = (datetime.now(timezone.utc) - timedelta(days=1)).replace(
    hour=12, minute=0, second=0, microsecond=0
)
params = {"timestamp": yesterday_noon.isoformat()}

url = "https://api.mobilitytwin.brussels/sncb/punctuality"
data = requests.get(url, headers={
    "Authorization": "Bearer [MY_API_KEY]"
}, params=params).content

df = pl.read_parquet(io.BytesIO(data))
print(f"rows: {df.height:,}")

# Note: SNCB's GTFS-RT feed does not populate stop_sequence (always null).
# Join to static GTFS on stop_id when needed.
not_cancelled = df.filter(~pl.col("cancelled") & pl.col("arrival_delay").is_not_null())

# Trains with the largest arrival delays, and where they were observed.
print("\nTop 20 worst delays of the day:")
print(not_cancelled.sort("arrival_delay", descending=True)
      .select(["trip_id", "stop_id", "arrival_time", "arrival_delay"])
      .head(20))

# Cancellation rate per route (one row per cancelled trip).
cancelled = df.filter(pl.col("cancelled"))
print(f"\ncancelled trip-instances: "
      f"{cancelled.select(['trip_id', 'start_date', 'start_time']).unique().height}")
print("\nMost-cancelled routes:")
print(cancelled.group_by("route_id").len()
      .sort("len", descending=True).head(10))