BYTETOOLS

iRail (Belgium) API

Free Belgian rail API with no key: stations, live departures, connections and vehicle tracking for NMBS/SNCB trains, with real-time delays. Tested example.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 20 Aug 2026

What is the iRail (Belgium) API?

iRail is a free, key-free API for Belgian railways, providing station lists, live departure boards, journey connections and individual train tracking for the NMBS/SNCB network, including real-time delay information.

iRail has been running as an open project for well over a decade, wrapping the Belgian railway operator's data in a clean REST interface with real-time delays rather than just scheduled times.

The maintainers ask that you send a descriptive User-Agent identifying your application. This is a volunteer-run service in front of an operator's system, so identifying yourself and caching are genuine courtesies rather than formalities.

Quick facts

Base URL
https://api.irail.be
Authentication
No API key, but a descriptive User-Agent identifying your application is requested.
Rate limit
No published hard limit; the project asks for reasonable use and caching.
Pricing
Free and open source.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the iRail (Belgium) API

Every request below was executed against the live API on 20 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. List Belgian railway stations

GET https://api.irail.be/v1/stations?format=json

curl
curl 'https://api.irail.be/v1/stations?format=json'
JavaScript (fetch)
const res = await fetch("https://api.irail.be/v1/stations?format=json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.irail.be/v1/stations?format=json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "version": "1.4",
  "timestamp": "1787176810",
  "station": [
    {
      "@id": "http://irail.be/stations/NMBS/008400319",
      "id": "BE.NMBS.008400319",
      "name": "'s Hertogenbosch",
      "locationX": "5.294278",
      "locationY": "51.69042",
      "standardname": "'s Hertogenbosch"
    },
    {
      "@id": "http://irail.be/stations/NMBS/008015345",
      "id": "BE.NMBS.008015345",
      "name": "Aachen Hbf",
      "locationX": "6.105275",
      "locationY": "50.770832",
      "standardname": "Aachen Hbf"
    },
    {
      "@id": "http://irail.be/stations/NMBS/008015199",
      "id": "BE.NMBS.008015199",
      "name": "Aachen West",
      "locationX": "6.07055",
      "locationY": "50.78078",
      "standardname": "Aachen West"
    },
    {
      "@id": "http://irail.be/stations/NMBS/008895000",
      "id": "BE.NMBS.008895000",
      "name": "Aalst",
      "locationX": "4.039653",
      "locationY": "50.942813",
      "standardname": "Aalst"
    },
    {
      "@id": "http://irail.be/stations/NMBS/008895125",
      "id": "BE.NMBS.008895125",
      "name": "Aalst-Kerrebroek",
      "locationX": "4.024407",
      "locationY": "50.948377",
      "standardname": "Aalst-Kerrebroek"
    },
    {
      "@id": "http://irail.be/stations/NMBS/008891140",
      "id": "BE.NMBS.008891140",
      "name": "Aalter",
      "locationX": "3.447848",
      "locationY": "51.092295",
      "standardname": "Aalter"
    },
    {
      "@id": "http://irail.be/stations/NMBS/008833209",
      "id": "BE.NMBS.008833209",
      "name": "Aarschot",
      "locationX": "4.824043",
      "lo

Parameters

ParameterTypeRequiredDescription
v1/stationspathOptionalAll stations on the network. v1/stations
v1/liveboardpathOptionalLive departures for a station. v1/liveboard?station=Brussels-Central
v1/connectionspathOptionalJourney planning between two stations. v1/connections?from=X&to=Y
formatstringOptionaljson or xml. Default is XML. json
langstringOptionalnl, fr, en or de. en

Response fields

versionstring
API version.
timestampstring
Unix timestamp of the response.
stationarray
Stations with id, name and coordinates.
station[].@idstring
Linked-data URI identifying the station.
station[].locationX / locationYstring
Longitude and latitude, as strings.
(liveboard) departures.departure[].delaystring
Delay in seconds.
(liveboard) departures.departure[].timestring
Scheduled departure as a Unix timestamp.

What you can build with the iRail (Belgium) API

  • Build a Belgian train departure board
  • Add journey planning to a travel app
  • Alert commuters to delays on a specific route
  • Analyse punctuality across the Belgian network

Common errors and how to fix them

XML instead of JSON

XML is the default format.

Fix: Always pass format=json.

Station name not recognised

Names vary by language.

Fix: Fetch /v1/stations first and use the exact name or the station id.

Coordinates as strings

locationX and locationY are strings.

Fix: Parse before plotting; note locationX is longitude.

iRail (Belgium) API — frequently asked questions

Is the iRail API free?

Yes, free with no API key. The maintainers ask that you send a descriptive User-Agent identifying your application and that you cache responses.

Does it include real-time delays?

Yes, liveboard departures include a delay field in seconds alongside the scheduled time, so it is genuine real-time data.

Why am I getting XML?

XML is the default. Pass format=json on every request.

Which languages are supported?

Dutch, French, English and German, matching Belgium's official languages. Station names differ between them, so specify `lang` consistently.

Tools that pair with this API

Alternatives to iRail (Belgium) API

If iRail (Belgium) does not fit, these transport & vehicle apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
NHTSA vPICFree NHTSA vPIC API with no key: decode any VIN, list vehicle makes and models, and get manufacturer and specification data. Tested curl example.No keyNo19 Aug 2026
NHTSA RecallsFree NHTSA recalls API with no key: look up open safety recalls by make, model and year, with remedy details and Park It warnings. Tested curl example.No keyNo19 Aug 2026
Transport for LondonFree Transport for London API: live tube line status, arrivals, journey planning, bike hire and stop points across London. No key for light use. Tested example.No keyYes19 Aug 2026
OpenSky NetworkFree OpenSky Network API: live aircraft positions, altitude, velocity and callsigns worldwide from crowd-sourced ADS-B receivers. Tested curl example.No keyNo19 Aug 2026
Konkan RailwayFree Konkan Railway API with no key: live train running positions, all 71 stations with distances, and route details for India's western coastal railway. Tested example included.No keyYes21 Aug 2026
LA MetroFree Los Angeles Metro API with no key: bus and rail route details, terminals, directions, official colours and timetable PDF links. Tested example and live response.No keyYes21 Aug 2026
All Transport & Vehicle APIs

iRail (Belgium) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.