Skip to ContentGalway Bus API Docs

GStopTime

Extension of the data from GTFS stoptimes.txt file. It contains everything from that file plus bus stop and route information.

GStopTime Schema

GStopTimes Schema
NameTypeDescriptionFrom GTFS .txt file
trip_idstringThe trip idyes
arrival_timestringThe arrival timeyes
departure_timestringThe departure timeyes
stop_idstringThe stop idyes
stop_sequencenumberThe stop sequence in this tripyes
stop_headsignstringThe headsignyes
pickup_typestring (enum)yes
drop_off_typestring (enum)yes
shape_dist_travelednumberDistance travelled in this trip (meters)yes
stop_namestringThe stop nameno
stop_lonnumberThe stop longitudeno
stop_latnumberThe stop latitudeno
route_idstringThe route idno
service_idstringThe service idno
trip_headsignstringThe trip headsignno
direction_idstring (enum)The direction ID of this tripno
route_short_namestringThe route short name eg 402no
first_stop_idstringID of first stop on this tripno
first_stop_namestringName of first stop on this tripno
last_stop_idstringID of last stop on this tripno
last_stop_namestringName of last stop on this tripno

GET GStopTime by stopid

Gets a GStopTime for each scheduled departarture on the date specified. Defaults to current date and includes all bus routes.

Params

uri parameters
NameRequiredDescription
stopidtrue
datefalseyyyymmdd

Example

Request

/api/gstoptimes/bystopid/8460B5255401/20220212

Response

{
"results": {
"date": "Sat, 12 Feb 2022 00:00:00 GMT",
"stop_times": [
{
"trip_id": "3774175.y104g.10-404-e20-1.1546.O",
"arrival_time": "06:29:45",
"departure_time": "06:29:45",
"stop_id": "8460B5255401",
"stop_name": "Westside Centre, stop 525541",
"stop_lon": -9.07760775113074,
"stop_lat": 53.2761484354635,
"stop_sequence": 20,
"route_short_name": "404",
"direction_id": "0",
"trip_headsign": "Oranmore (Opp Oran Town Centre) - Westside (Shopping Centre)",
"first_stop_id": "8460B5243701",
"first_stop_name": "Eyre Square, stop 524371",
"last_stop_id": "8460B5255401",
"last_stop_name": "Westside Centre, stop 525541",
"shape_dist_traveled": 6725.97,
"service_id": "y104g",
"route_id": "10-404-e20-1"
},
// ... more GStopTimes
{
"trip_id": "3714814.60.10-404-e19-1.1543.I",
"arrival_time": "23:40:00",
"departure_time": "23:40:00",
"stop_id": "8460B5255401",
"stop_name": "Westside Centre, stop 525541",
"stop_lon": -9.07760775113074,
"stop_lat": 53.2761484354635,
"stop_sequence": 1,
"route_short_name": "404",
"direction_id": "1",
"trip_headsign": "Westside (Shopping Centre)...",
"first_stop_id": "8460B5255401",
"first_stop_name": "Westside Centre, stop 525541",
"last_stop_id": "8460B5226101",
"last_stop_name": "Eyre Square, stop 522611",
"shape_dist_traveled": 0,
"service_id": "60",
"route_id": "10-404-e19-1"
}
]
}
}

GET GStopTimes by stopid & routeid

Params

uri parameters
NameRequiredDescription
stopidtrue
routetrue
direction~falseRequired if date param is used
datefalseyyyymmdd Default is current date

A small number of bus stops have buses travelling in both directions on a route - use 0 or 1 to specify :directionid.

api/gstoptimes/bystopidrouteid/8460B5255401/404/0/20220215

Otherwise use 'directionid' to get each direction that applies. api/gstoptimes/bystopidrouteid/8460B5255401/404/directionid/20220215

Example

Request

/api/gstoptimes/bystopidrouteid/8460B5255401/404/0/20220215

Response

{
"results": {
"date": "Tue, 15 Feb 2022 00:00:00 GMT",
"g_stop_times": [
{
"trip_id": "3741557.y104h.10-404-e20-1.1546.O",
"arrival_time": "06:32:15",
"departure_time": "06:32:15",
"stop_id": "8460B5255401",
"stop_name": "Westside Centre, stop 525541",
"stop_lon": -9.07760775113074,
"stop_lat": 53.2761484354635,
"stop_sequence": 20,
"route_short_name": "404",
"direction_id": "0",
"trip_headsign": "Oranmore (Opp Oran Town Centre) - Westside (Shopping Centre)",
"first_stop_id": "8460B5243701",
"first_stop_name": "Eyre Square, stop 524371",
"last_stop_id": "8460B5255401",
"last_stop_name": "Westside Centre, stop 525541",
"shape_dist_traveled": 6725.97,
"service_id": "y104h",
"route_id": "10-404-e20-1"
}
// ...
// All other gStopTimes
]
}
}

Get GStopTimes by tripid

Params

uri parameters
NameRequiredDescription
tripidtrue

Example

Request

/api/gstoptimes/bytripid/3714818.60.10-404-e19-1.1544.I

Response

{
"results": [
"stop_times": [
{
"trip_id":"3714818.60.10-404-e19-1.1544.I",
"arrival_time":"06:40:45",
"departure_time":"06:40:45",
"stop_id":"8460B5255601",
"stop_sequence":2,
"shape_dist_traveled":398.11,
"service_id":"60",
"shape_id":"10-404-e19-1.1544.I",
"trip_headsign":"Westside (Shopping Centre)...",
"route_id":"10-404-e19-1",
"direction_id":"1",
"first_stop_name":"Westside Centre, stop 525541",
"first_stop_id":"8460B5255401",
"last_stop_id":"8470B556161",
"last_stop_name":"Oranmore Centre, stop 556161",
"stop_name":"Gaelcarrig Park, stop 525561",
"stop_lon":-9.07773025560116,
"stop_lat":53.2792300347869
},
// ...
// All other gStopTimes on this trip
]
]
}