iRail API / scraper
iRail supports digital creativity concerning mobility in Belgium. This is an attempt to make the railway time schedules in Belgium easily available for anyone.
Our main site consists of a very easy mobile website to look up time schedules using our own API.
Native applications using the iRail API and created or supported by the iRail team are named BeTrains and RailerApp.
All information can be found on our blog at hello.iRail.be.
API Documentation can be found at https://docs.irail.be.
note: you'll also need to have nodejs, composer and the PHP extensions listed in composer.json installed on your system
.env
file which will contain your configuration.CACHE_DRIVER
should be set to apc
, an in-memory cache with good performance.NMBS_RIV_API_KEY
should contain a valid API key for the internal NMBS RIV API.GTFS_RANGE_DAYS_BACKWARDS
and GTFS_RANGE_DAYS_FORWARDS
define how long in the past and future GTFS data will beAPP_TIMEZONE
should be set to EUROPE/BRUSSELS
to ensure correct times in the responses, since several date/times
without timezone information are parsed and interpreted at this timezone.
read. This will affect memory usage, and limits the date ranges of some API endpoints.php artisan migrate
A working cache is required for the API to work correctly. Ensure APC is configured correctly when running this outside of the docker environment. Outgoing requests to NMBS servers should always be limited as much as possible!
Stations are updated through the irail/stations composer package. Just perform a composer update
in the root of the project.