Speed
STIB: brussels metro, tram and bus operator
- Format
- JSON
- Updates
- Every 20 seconds (computed from vehicle-distance)
- Latest snapshot
- Snapshots stored
- about 3,373,379
curl -H "Authorization: Bearer $MOBILITYTWIN_TOKEN" "https://api.mobilitytwin.brussels/stib/speed"
How fast STIB/MIVB vehicles moved on their last move, per line, stop and direction. STIB refreshes a vehicle's distance about every 40 seconds, and a move is timed from when the previous distance first appeared to when the new one did.
Which days have data
Data from 21 Aug 2024 to 23 Nov 2026, on 820 days. 30 of the last 30 days have data. A typical day holds 3832 snapshots. 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
| Name | Meaning |
|---|---|
timestamp | Return 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
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/speed"
data = requests.get(url, headers={
'Authorization': 'Bearer [MY_API_KEY]'
}, params=params).json()
df = pd.DataFrame(data)
# Average speed per line (km/h)
speed_per_line = df.groupby('lineId')['speed'].mean().sort_values()
print("Average speed per line (km/h):")
print(speed_per_line)
# Find the slowest segments
slowest = df.nsmallest(5, 'speed')[['lineId', 'pointId', 'speed']]
print("\nSlowest segments:")
print(slowest)