Introducing the IÉ REST API

Date Published: 28-10-2025

What is the Irish Rail REST API?

The Irish Rail REST API is a reworked version of Irish Rai's Realtime API that's produced in XML format, put together using Express.js which some additional little add-ons.

How does this API work?

Simply, a request is made to api.irishrail.ie to fetch, say "current trains" on getCurrentTrainsXML, which when the data is recieved it is converted from XML to JSON and sent back to the client. Which effectively elimates the difficult to read value names and providing them in a more easier to intergrate format.

What feature(s) does it have?

In the first ever version of this API, it comes loaded with useful add-ons such as route determination.

Route Determination

Route Determination is a simple five-liner piece of code that compares where the train orginates from to where it'll terminate to a list of routes, and best matches it to a route name such as Commuter. This feature is mostly accurate and is continuing fact-checking as there is tendincies of Irish Rail switching routes around.

Nearby Detection

Nearby Detection takes a users location (latitude + longitude) and uses it to locate nearby stations & trains within a 7.5 km radius. However, per testing this is not yet implemented into the API but should be implemented at some stage.

Swagger Documentation

Swagger Docs make it easy to play-around with the API or help developers intergrate the API into their own website or application, with extensively documented response models & enum types. This documentation can be found at /docs.

What about future updates?

At the moment, it is very likely if there's any more features or patches that can be implemented. Other than that, not really unless Irish Rail implements a big change themselves.

To see more information regarding this API, feel free to check out the repository on GitHub!