Transport for Belgium API
Overview
The iRail API gives you free access to Belgian railway timetables, live train positions, and station information. It is an unofficial but well-maintained third-party API that mirrors data from the national rail operator NMBS/SNCB. Beginners will appreciate the simple REST endpoints with no authentication required.
Beginner Tip
No API key is needed — just call the endpoint with your parameters and you get JSON back immediately. Start with the /stations endpoint to get a list of all Belgian train stations.
Available Data
Example Response
{
"route": "Line 1",
"origin": "Station A",
"destination": "Station B",
"departure": "08:30",
"arrival": "09:15",
"status": "On Time",
"delays_min": 0
} Field Reference
id Unique identifier for the station (e.g., "BE.NMBS.008814001") name Official name of the railway station locationX Longitude coordinate of the station locationY Latitude coordinate of the station standardname Standardized station name used in routing queries Implementation Example
const url = "https://docs.irail.be/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →ADS-B Exchange
⭐ Beginner's PickADS-B Exchange is a community-driven API that provides real-time and historical position data for aircraft around the world.
airportsapi
⭐ Beginner's PickThe airportsapi lets you look up airport names and official website URLs by providing an ICAO code.
AviationAPI
AviationAPI provides programmatic access to faa aeronautical charts and publications, airport information, and airport weather via REST API.
BC Ferries
⭐ Beginner's PickThe BC Ferries API is a free, open API providing real-time sailing schedules, capacity, and current conditions for BC Ferries routes in British Columbia, Canada.
Community Transit
⭐ Beginner's PickCommunity Transit (Transitland) is a free, open API that aggregates public transit data from hundreds of agencies worldwide including routes, stops, and schedules.