Skip navigation

Stop Location web service

Base HTTP URL: http://developer.trimet.org/ws/V1/stops
Base HTTPS URL: https://developer.trimet.org/ws/V1/stops

Request parameters:

Name Value Description
bbox comma delimited list of longitude and latitude values (optional) bbox arguments are lonmin, latmin, lonmax, latmax in decimal degrees. These define the lower left and upper right corners of the bounding box.
ll comma delimited long-lat pair (optional) Defines center of search radius in decimal degrees.
feet number (optional) Use with ll to define search radius in feet.
meters number (optional) Use with ll to define search radius in meters.
showRoutes boolean (optional) location elements will include a list of routes that service the stop(s) if this is set to 'true'.
showRouteDirs boolean (optional) route elements will include a list of 'dir' elements for each route direction that service the stop(s) if this is set to 'true'. Setting showRoutes is to 'true' is unnecessary if this is set to 'true'.
appID string (required) Your appID received during registration.
json boolean (optional) "true" or "false" (default) If true results will be returned in json format rather than the default xml format.
callback string (optional) If present returns the json result in a jsonp callback function. Only used if json is set to true.


Response fields:
Note: all times values are in milliseconds since epoch. JSON times are formatted as a string 'yyyy-MM-ddTHH:mm:ss.SSSZ'.

Name Description
resultSet Root element of all results
resultSet[@queryTime] Time the result was generated.
errorMessage This element will occur if there was an error processing your request and contains a description of the problem.
location Contains information about a stop
location[@desc] The public location description of the stop.
location[@dir] The direction of traffic at the stop. The cardinal directions of a compass. For bidirectional rail platforms the value will be blank.
location[@lat] The latitude of the stop.
location[@lng] The longitude of the stop.
location[@locid] LocationID of the stop.
route Contains information about a route.
route[@desc] The route's description.
route[@route] The route number.
route[@type] The type of the route, either 'B' for bus, or 'R' for fixed guideway (either rail or aerial tram).
dir Child element of route contains information for each route directions.
dir[@desc] Describes the direction of the route.
dir[@dir] The number of the direction, either 1 for inbound or 0 for outbound.