API Documentation
Tiers
Choose the tier that fits your needs. You can start without any key and upgrade at any time.
| Tier | Auth | Rate Limit | Daily Limit | How to Get |
|---|---|---|---|---|
| No key | None | 3 req/s | Unlimited | Existing behavior |
| Anonymous | None | 10 req/s | 3,000/day | Generate instantly |
| Identified | Email + password | 30 req/s | 10,000/day | Create an account |
| Commercial | Contact | Custom | Custom | Contact us |
Upgrading from Anonymous to Identified
Anonymous keys are great for quick prototyping. When you need higher limits, create an account to get an Identified key. Your anonymous key will continue to work — you don't need to migrate.
Authentication
Pass your API key using one of these methods:
HTTP Header (recommended)
curl -H "X-API-Key: your_api_key_here" https://api.okbe.dev/irail/liveboard?station=Brussel-Zuid&format=jsonQuery Parameter
curl "https://api.okbe.dev/irail/liveboard?station=Brussel-Zuid&format=json&apikey=your_api_key_here"Available APIs
iRail
Belgian railway data — liveboards, connections, vehicle info, and more. See the full iRail documentation for all available endpoints.
| Endpoint | Description |
|---|---|
/irail/stations | List all Belgian railway stations |
/irail/liveboard | Real-time departures/arrivals for a station |
/irail/connections | Route planning between two stations |
/irail/vehicle | Info and stops for a specific train |
/irail/composition | Train composition (carriages) |
/irail/disturbances | Current service disruptions |
Response Format
Add format=json to get JSON responses (default is XML). JSONP is also supported via the format=jsonp parameter.