Skip to ContentGalway Bus API Docs

GRoute

GTFS routes.txt file are groups "of trips that are displayed to riders as a single service", there are 10 routes relating to Galway City - one each for 401, 402, 404, 405, 407, 409, 410, 411, 412, 414. Instead GRoutes are based on route_short_name - direction_id combinations so there are 20. This means they can also hold information about associated bus stops.

GRoute Schema

GRoute Schema
NameTypeDescriptionFrom GTFS .txt file
route_short_namestringThe route name eg. 405yes
route_long_namestringThe route long name (not always accurrate, use route variations first/last stop).yes
direction_idstringThe route directionno
g_trip_headsignstringThe trip headsignno
g_route_variationsarrayContains objects describing route variations - eg. Early morning/Late night trips covering only half of the bus routeno
g_stopsarrayArray of Stops on the routeno
g_route_idsarrayThe route ids (see note)no

Note

Bus Éireann's GTFS files use at least two route_ids to refer to the same routes. eg 10-401-e19-1 and 10-401-e20-1 both refer to the route with route_short_name 401.

This project disregards route_id s and instead relies on a combination of route_short_name and direction_id for all queries. For convenience the long route_ids are accepted in uris. /api/groutes/10-405-e19-1 will get the same results as /api/groutes/405

GET all GRoutes

Gets all 20 Galway City GRoutes.

Example

Request

/api/groute/

Response

{
"results": [
{
"route_short_name": "401",
"direction_id": "0",
"route_long_name": "Parkmore Industrial Estate - Dr Mannix Rd (Rockbarton Rd)",
"g_trip_headsign": "Parkmore Industrial Estate - Dr Mannix Rd (Rockbarton Rd)",
"g_route_variations": [
{
"route_id": "10-401-e19-1",
"route_short_name": "401",
"direction_id": "0",
"first_stop_id": "8460B6355601",
"last_stop_id": "8460B522301",
"first_stop_name": "Galway Tech Park, stop 635561",
"last_stop_name": "Scoil Éinde Boys NS, stop 522301",
"num_stops": 37
},
{
"route_id": "10-401-e19-1",
"route_short_name": "401",
"direction_id": "0",
"first_stop_id": "8460B6355601",
"last_stop_id": "8460B522331",
"first_stop_name": "Galway Tech Park, stop 635561",
"last_stop_name": "Eyre Square, stop 522331",
"num_stops": 24
}
],
"g_stops": [
{
"stop_id": "8460B6355601",
"stop_name": "Galway Tech Park, stop 635561",
"stop_lat": 53.29902494788,
"stop_lon": -8.98686582677608
}
// ... 36 more g_stops on route (ordered).
],
"g_route_ids": ["10-401-e19-1", "10-401-e20-1"]
}
// ... 19 more g_routes
]
}

GET GRoutes by routeid, directionid

Params

uri parameters
NameRequiredDescription
routefalseAccepts route_id or route_short_name
directionfalseEither '1' or '0'. If not provided the response will include both directions

Example

Request

/api/groute/401/1

Response

{
"results": [
{
"route_id": "10-401-e19-1",
"route_short_name": "401",
"direction_id": "1",
"g_route_ids": ["10-401-e19-1", "10-401-e20-1"],
"route_long_name": "Parkmore Industrial Estate - Dr Mannix Rd (Rockbarton Rd)",
"g_trip_headsign": "Dr Mannix Rd (Rockbarton Rd) - Parkmore Industrial Estate",
"g_route_variations": [
// ... g_route_variations
],
"g_stops": [
// ... g_stops on route (ordered)
]
}
]
}