Vehicle distance

STIB: brussels metro, tram and bus operator

Format
JSON
Updates
Every 20 seconds
Latest snapshot
Snapshots stored
about 5,093,864
curl -H "Authorization: Bearer $MOBILITYTWIN_TOKEN" "https://api.mobilitytwin.brussels/stib/vehicle-distance"

Raw STIB/MIVB positions as published: each vehicle's distance since its last stop, with no vehicle or trip id. For long time ranges, download Parquet files from /stib/vehicle-distance/parquet.

Which days have data

Data from 24 Feb 2023 to 2 Nov 2026, on 1289 days. 30 of the last 30 days have data. A typical day holds 4110 snapshots. Days are in UTC.

2026
JanFebMarAprMayJunJulAugSepOctNovDec
2025
JanFebMarAprMayJunJulAugSepOctNovDec
2024
JanFebMarAprMayJunJulAugSepOctNovDec
2023
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.

Downloading weeks or months

Do not fetch snapshots one by one for long ranges. /stib/vehicle-distance/parquet gives you ready-made Parquet files, one per day.

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.
start_timestampStart of the range, in Unix seconds or ISO 8601.
end_timestampEnd of the range, in Unix seconds or ISO 8601.
limitMaximum number of snapshots, at most 100.
offsetNumber of snapshots to skip, to page through a range.

Python example

import requests
import pandas as pd

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(),   # ISO accepted; epoch also works
}

url = "https://api.mobilitytwin.brussels/stib/vehicle-distance"

data = requests.get(url, headers={
        'Authorization': 'Bearer [MY_API_KEY]'
}, params=params).json()

# Convert to DataFrame for analysis
df = pd.DataFrame(data)

# Group by line and compute average distance from stop
avg_distance = df.groupby('lineId')['distanceFromPoint'].mean()
print("Average distance from stop per line:")
print(avg_distance.sort_values(ascending=False))