GStopTime
Extension of the data from GTFS stoptimes.txt file. It contains everything from that file plus bus stop and route information.
GStopTime Schema
Name | Type | Description | From GTFS .txt file |
---|---|---|---|
trip_id | string | The trip id | yes |
arrival_time | string | The arrival time | yes |
departure_time | string | The departure time | yes |
stop_id | string | The stop id | yes |
stop_sequence | number | The stop sequence in this trip | yes |
stop_headsign | string | The headsign | yes |
pickup_type | string (enum) | yes | |
drop_off_type | string (enum) | yes | |
shape_dist_traveled | number | Distance travelled in this trip (meters) | yes |
stop_name | string | The stop name | no |
stop_lon | number | The stop longitude | no |
stop_lat | number | The stop latitude | no |
route_id | string | The route id | no |
service_id | string | The service id | no |
trip_headsign | string | The trip headsign | no |
direction_id | string (enum) | The direction ID of this trip | no |
route_short_name | string | The route short name eg 402 | no |
first_stop_id | string | ID of first stop on this trip | no |
first_stop_name | string | Name of first stop on this trip | no |
last_stop_id | string | ID of last stop on this trip | no |
last_stop_name | string | Name of last stop on this trip | no |
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
Name | Required | Description |
---|---|---|
stopid | true | |
date | false | yyyymmdd |
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
Name | Required | Description |
---|---|---|
stopid | true | |
route | true | |
direction | ~false | Required if date param is used |
date | false | yyyymmdd 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
Name | Required | Description |
---|---|---|
tripid | true |
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]]}