If you are not yet familiar with GraphQL and GraphiQL it is highly recommended to review those pages at first.
FeedId:StopId
formatgtfsId
(note that field gtfsId
also contains the feed ID)Note: For more details about the query types related to stops you can use the Documentation Explorer provided in GraphiQL.
Note: If the examples provided with an ID do not return what is expected then the ID in question may not be in use any more and you should try again with an existing ID.
zoneId
tells which zone the stop is located in{
stops {
gtfsId
name
lat
lon
zoneId
}
}
{
stop(id: "stpt:2987") {
name
wheelchairBoarding
}
}
{
stop(id: "stpt:2987") {
gtfsId
name
lat
lon
patterns {
code
directionId
headsign
route {
gtfsId
shortName
longName
mode
}
}
}
}
name
can either be a part of the stop name (e.g. "complex"
or "iulius"
) or a stop number (e.g. "4040"
){
stops(name: "complex") {
gtfsId
name
code
lat
lon
}
}
{
stations {
gtfsId
name
lat
lon
stops {
gtfsId
name
code
platformCode
}
}
}
{
stations(name: "Pantelimon") {
gtfsId
name
lat
lon
stops {
gtfsId
name
code
platformCode
}
}
}
first
is not used in the query, all results will be on one page.radius
is the maximum walking distance along streets and paths to the stop{
stopsByRadius(lat:60.199, lon:24.938, radius:500) {
edges {
node {
stop {
gtfsId
name
}
distance
}
}
}
}
serviceDay
in the response is Unix timestamp (local timezone) of the departure dateValues scheduledArrival
, realtimeArrival
, scheduledDeparture
and realtimeDeparture
in the response are seconds since midnight of the departure date
serviceDay
{
stop(id: "stpt:2987") {
name
stoptimesWithoutPatterns {
scheduledArrival
realtimeArrival
arrivalDelay
scheduledDeparture
realtimeDeparture
departureDelay
realtime
realtimeState
serviceDay
headsign
}
}
}
Use argument startTime
in stoptimes query
startTime
is Unix timestamp (UTC timezone) in seconds{
stop(id: "stpt:2987") {
name
stoptimesWithoutPatterns(startTime: 1528633800) {
scheduledArrival
realtimeArrival
arrivalDelay
scheduledDeparture
realtimeDeparture
departureDelay
realtime
realtimeState
serviceDay
headsign
}
}
}
startTime
.platformCode
contains the platform code used by the vehicle{
station(id: "stpt:1000202") {
name
stoptimesWithoutPatterns(numberOfDepartures: 10) {
stop {
platformCode
}
serviceDay
scheduledArrival
scheduledDeparture
trip {
route {
shortName
}
}
headsign
}
}
}
{
nearest(lat: 45.7410432, lon: 21.14655, maxDistance: 500, filterByPlaceTypes: DEPARTURE_ROW) {
edges {
node {
place {
...on DepartureRow {
stop {
lat
lon
name
}
stoptimes {
serviceDay
scheduledDeparture
realtimeDeparture
trip {
route {
shortName
longName
}
}
headsign
}
}
}
distance
}
}
}
}