REST API - Stops

Stops

Stops are stops.txt entities imported from GTFS, and include the same basic structure and fields, plus some additional metadata.

Stops with location_type=0 are physical locations where transit vehicle makes scheduled stops; other types of stops represent station complexes, entrances and exits, generic nodes for pathways, boarding areas, and other types of information for using transit at a particular place.

Stop Onestop IDs

As with routes, the Onestop ID values for stops are automatically generated. Two very similar stops may both generate the same Onestop ID, in which case a query for that Onestop ID will return two or more stop entries.

Request overview

Geographic queries require all three parameters of lat, lon, and radius to be specified. The maximum radius is 10km.

The stop API returns "active" feed versions unless requesting a specific feed version.

Stop API results are based on this GraphQL query.


Request parameters

GET/api/v2/rest/stops Stops — Search for stops

GET/api/v2/rest/stops.{format}Request stops in specified format

GET/api/v2/rest/stops/{stop_key}Request a stop

GET/api/v2/rest/stops/{stop_key}.{format}Request a stop in a specified format

ParameterTypeDescriptionExample
include_alertsstring enum
truefalse
Include alerts from GTFS Realtime feeds
idinteger
0 ... unlimited
Search for a specific internal ID
stop_keystring

Stop lookup key; can be an integer ID, a '<feed onestop_id>:<gtfs stop_id>' key, or a Onestop ID
afterinteger

Return records past this record ID
limitinteger
0 ... 100
Maximum number of records to returnlimit=1
format enum
jsongeojsonpng
Response formatformat=geojson
searchstring

Full text searchsearch=embarcadero
onestop_idstring

Search for a specific Onestop IDonestop_id=...
stop_idstring

Search for records with this GTFS stop_idstop_id=EMBR
served_by_onestop_idsstring

Search stops visited by a route or agency OnestopID. Accepts comma separated values.served_by_onestop_ids=o-9q9-bart,o-9q9-caltrain
feed_version_sha1string

Search for records in this feed versionfeed_version_sha1=1c4721d4...
feed_onestop_idstring

Search for records in this feedfeed_onestop_id=f-9q9-bart
radiusnumber
0 ... 10000
Search radius (meters); requires lat and lonlat=-122&lon=37&radius=1000
latnumber
-90 ... 90
Latitude
lonnumber
-180 ... 180
Longitude
license_commercial_use_allowed enum
yesnounknownexclude_no
Filter entities by feed license 'commercial_use_allowed' value. Please see feed documentation for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'.
license_share_alike_optional enum
yesnounknownexclude_no
Filter entities by feed license 'share_alike_optional' value. Please see feed documentation for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'.
license_create_derived_product enum
yesnounknownexclude_no
Filter entities by feed license 'create_derived_product' value. Please see feed documentation for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'.
license_redistribution_allowed enum
yesnounknownexclude_no
Filter entities by feed license 'redistribution_allowed' value. Please see feed documentation for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'.
license_use_without_attribution enum
yesnounknownexclude_no
Filter entities by feed license 'use_without_attribution' value. Please see feed documentation for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'.

Response format

Array of objects
Description
id
(integer)
Unique integer ID
onestop_id
(string)
Onestop ID for this stop, if available

Examples-dr5ruvgnyk-madisonav~e69st

stop_id
(string)
GTFS stop_id

Example400029

stop_name
(string)
GTFS stop_name

ExampleMADISON AV/E 69 ST

stop_desc
(string)
GTFS stop_desc

ExampleFind this stop at the end of a long journey

stop_url
(uri)
GTFS stop_url
stop_timezone
(timezone)
GTFS stop_timezone, if overriding agency/route timezone

ExampleAmerica/Los_Angeles

stop_code
(string)
GTFS stop_code
zone_id
(string)
GTFS zone_id
wheelchair_boarding
(integer)
GTFS wheelchair_boarding
location_type
(integer)
GTFS location_type
platform_code
(string)
GTFS platform_code
tts_stop_name
(string)
GTFS tts_stop_name
feed_version
(object)
A subset of the fields for this stop's feed version
parent
(object)
A subset of fields for the parent station for this stop, if defined
level
(object)
GTFS level
level_id
(string)
GTFS level_id
level_name
(string)
GTFS level_name
level_index
(integer)
GTFS level_index
route_stops
(array)
Routes associated with this stop
route
()
A subset of fields for the routes that visit this stop. This field is only populated when requesting a single stop.
geometry
(object)
Geometry in GeoJSON format
type
(string)
GeoJSON geometry type

ExampleLineString

coordinates
(number array)
An array of coordinates; may be nested arrays if geometry is Polygon or MultiLineString

Example[ [ -122.496, 37.778 ], [ -122.425, 37.786 ] ]