Welcome to the Dublin Area Transport API. This API can be used to access various endpoints which provide information on the three major forms of public transport in the Dublin area, Dublin Bus, Luas and DART.
Authentication
To authorize, use this code:
constapi=require('dublintransportjs');
api.authorize('your-key-here');
Make sure to replace your-key-here with your API key.
The Dublin Area Transport API uses API keys to allow higher limits to the API. In the future you will be able to register a new API key at our developer portal.
An API key need not be included in the request but you will be limited to 120 requests per hour without one, you will be able to contact us at the developer portal if you require more requests.
Auth: your-key-here
You must replace your-key-here with your personal API key.
Bus
Get All Stops
constapi=require('dublintransportjs');
api.authorize('your-key-here');
api.bus.get().then(stops=> stops);
The above command returns JSON structured like this:
[
{
"id":6,
"name":"St. Martin's Chapel",
"location":{
"latitude":53.352744,
"longitude":-6.264443
},
"routes":["4"]
},
{
"id":7,
"name":"Parnell Square",
"location":{
"latitude":53.35283611,
"longitude":-6.264561944
},
"routes":["40","140","40D","40B","13"]
}
]
This endpoint retrieves all bus stops.
HTTP Request
GET https://dublintransportapi.herokuapp.com/api/bus/stops
Remember — include your auth token in the header!
Get Real Time Information
constapi=require('dublintransportjs');
api.authorize('your-key-here');
api.bus.get(543).then(stop=> stop);
The above command returns JSON structured like this:
{
"id":543,
"name":"Dublin Rd",
"location":{
"latitude":53.385055,
"longitude":-6.142371111
},
"routes":["31","31A","32","31B"],
"services":[
{
"due":11,
"destination":"Malahide",
"route":"32"
},
{
"due":14,
"destination":"Sheilmartin Rd",
"route":"31A"
},
]
}
This endpoint retrieves the realtime information of a specific bus stop.
Inside HTML code blocks like this one, you can't use Markdown, so use <code> blocks to denote code.
HTTP Request
GET https://dublintransportapi.herokuapp.com/api/bus/stops/<ID>
This endpoint lists all stops of all three transport services within 15 minutes walking distance along with the walking distance specific to each stop.
HTTP Request
GET https://dublintransportapi.herokuapp.com/api/nearby