Close Stop Call

The Close Stop call allows the developer to request the closest stops to a given latitude and longitude. The call can be supplied with a number of stops to be returned and filtered by route.

Close Stop Request

http://api.rideuta.com/SIRI/SIRI.svc/CloseStopmonitor?latitude={latitude}&longitude={longitude}&route={routeID}&numberToReturn={numbertoreturn}&usertoken={usertoken}

  • Latitude – The Latitude to query
  • Longitude – The Longitude to query
  • routeID – (optional) The route to filter by (E.g. 2 for route 2, 35M for route 35M)
  • numbertoreturn - The number of stops to return. (E.g. 5 will return the 5 closest stops.)
  • ustertoken your UTA developer API key. Go here to get one.

For Example

Request URI:
http://api.rideuta.com/SIRITEST/SIRI.svc/CloseStopmonitor?latitude=40.696629000&longitude=-112.044376000&route=&numberToReturn=5&usertoken=XXXXXXXX

This request URI is asking for 5 of the closest stops without filtering for a particular route. The request results can be found below.

The response payload is made up of MonitoredCloseStop items MonitoredCloseStop is made up of the following tags

  • StopName: The name of the stop.
  • StopID: The identifier of the stop that can be used with the StopMonitoring service
  • StopDirection: The direction the next vehicle to arrive there is running.
  • DistanceToStop: The distance to the stop from the requested Latitude and Longitude. Expressed in Feet.
  • Route: The route that the stop serves.
  • StopLocation: This tag has sub tags for the stops Latitude and longitude.

Response Example
<Siri version="1.3">
   <ResponseTimestamp>2012-02-02T12:37:14.759-07:00</ResponseTimestamp>
   <CloseStopMonitoringDelivery version="1.3">
   <ResponseTimestamp>2012-02-02T12:37:14.759-07:00</ResponseTimestamp>
   <ValidUntil>2012-02-02T12:37:24.759-07:00</ValidUntil>
   <MonitoredClosestStops>
      <RecordedAtTime>2012-02-02T12:37:14.759-07:00</RecordedAtTime>
      <MonitoredCloseStop>
         <StopName>3500 S @ 6450 W</StopName>
         <StopID>133054</StopID>
         <StopDirection>TO MAGNA</StopDirection>
         <DistanceToStop>0</DistanceToStop>
         <Route>35M</Route>
         <StopLocation>
            <Longitude>-112.044376</Longitude>
            <Latitude>40.696629</Latitude>
         </StopLocation>
      </MonitoredCloseStop>
      <MonitoredCloseStop>
         <StopName>3500 S @ 6450 W</StopName>
         <StopID>133054</StopID>
         <StopDirection>TO MAGNA</StopDirection>
         <DistanceToStop>0</DistanceToStop>
         <Route>35</Route>
         <StopLocation>
            <Longitude>-112.044376</Longitude>
            <Latitude>40.696629</Latitude>
         </StopLocation>
      </MonitoredCloseStop>
      <MonitoredCloseStop>
         <StopName>3500 S @ 6361 W</StopName>
         <StopID>101401</StopID>
         <StopDirection>TO 3300 S TRAX</StopDirection>
         <DistanceToStop>384.05970744577843</DistanceToStop>
         <Route>35</Route>
         <StopLocation>
            <Longitude>-112.043018</Longitude>
            <Latitude>40.696415</Latitude>
         </StopLocation>
         </MonitoredCloseStop>
         <MonitoredCloseStop>
         <StopName>3500 S @ 6361 W</StopName>
         <StopID>101401</StopID>
         <StopDirection>TO 3300 S TRAX</StopDirection>
         <DistanceToStop>384.05970744577843</DistanceToStop>
         <Route>35M</Route>
         <StopLocation>
            <Longitude>-112.043018</Longitude>
            <Latitude>40.696415</Latitude>
         </StopLocation>
      </MonitoredCloseStop>
      <MonitoredCloseStop>
         <StopName>3500 S @ 6561 W</StopName>
         <StopID>133052</StopID>
         <StopDirection>TO 3300 S TRAX</StopDirection>
         <DistanceToStop>998.33474602277022</DistanceToStop>
         <Route>35</Route>
         <StopLocation>
            <Longitude>-112.047977</Longitude>
            <Latitude>40.696493</Latitude>
         </StopLocation>
      </MonitoredCloseStop>
      </MonitoredClosestStops>
   </CloseStopMonitoringDelivery>
</Siri>


Terms of Use
Copyright © 2012-2016 Utah Transit Authority. All Rights Reserved.