Contents
REST API - Stops
Stops
The REST API routes stops provides a fast and flexible way to browse
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"
Stop API results are based on this GraphQL query.
Request parameters
GET/api/v2/rest/stops Search for stops
GET/api/v2/rest/stops.{format} Request stops in specified format
GET/api/v2/rest/stops/{route_key} Request a stop by ID or Onestop ID
GET/api/v2/rest/stops/{route_key}.format Request a stop by ID or Onestop ID in specified format
| Parameter | Type | Description | Example |
|---|---|---|---|
| stop_key | string | Stop lookup key; can be an integer ID, a '<feed onestop_id>:<gtfs stop_id>' key, or a Onestop ID | |
| stop_id | string | Search for records with this GTFS stop_id | stop_id=EMBR |
| served_by_onestop_ids | string | Search stops visited by a route or agency OnestopID. Accepts comma separated values. | served_by_onestop_ids=o-9q9-bart,o-9q9-caltrain |
| served_by_route_type | integer | Search for stops served by a particular route (vehicle) type. | served_by_route_type=1 |
| served_by_route_types | string | Search for stops served by particular route (vehicle) types. Accepts comma separated values. | served_by_route_types=1,2 |
| include_alerts | string enum | Include alerts from GTFS Realtime feeds | |
| id | integer | Search for a specific internal ID | |
| after | integer | Pagination cursor value. This should be treated as an opaque value created by the server and returned as the link to the next result page, which may be empty. For historical reasons, this is based on the integer record ID values, but that should not be assumed to be the case in the future. | |
| limit | integer | Maximum number of records to return | limit=1 |
| format | string enum | Response format | format=geojson |
| search | string | Full text search | search=embarcadero |
| onestop_id | string | Search for a specific Onestop ID | onestop_id=... |
| feed_version_sha1 | string | Search for records in this feed version | feed_version_sha1=1c4721d4... |
| feed_onestop_id | string | Search for records in this feed | feed_onestop_id=f-c20-trimet |
| radius | number | Search radius (meters); requires lat and lon | lon=-122.3&lat=37.8&radius=1000 |
| lon | number | Longitude | |
| lat | number | Latitude | |
| bbox | string | Geographic search using a bounding box, with coordinates in (min_lon, min_lat, max_lon, max_lat) order as a comma separated string | bbox=-122.269,37.807,-122.267,37.808 |
| license_commercial_use_allowed | string enum | Filter entities by feed license 'commercial_use_allowed' value. Please see Source Feed concept for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'. | |
| license_share_alike_optional | string enum | Filter entities by feed license 'share_alike_optional' value. Please see Source Feed concept for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'. | |
| license_create_derived_product | string enum | Filter entities by feed license 'create_derived_product' value. Please see Source Feed concept for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'. | |
| license_redistribution_allowed | string enum | Filter entities by feed license 'redistribution_allowed' value. Please see Source Feed concept for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'. | |
| license_use_without_attribution | string enum | Filter entities by feed license 'use_without_attribution' value. Please see Source Feed concept for details on license values. 'exclude_no' is equivalent to 'yes' and 'unknown'. |
Response format
stops
array: StopCurrently imported stops. If no feed version is specified, defaults to active feed versions.
id
integerInternal integer ID
stop_id
stringGTFS stops.stop_id
Example400029
stop_name
stringGTFS stops.stop_name
ExampleMADISON AV/E 68 ST
stop_url
stringGTFS stops.stop_url
stop_timezone
stringGTFS stops.stop_timezone; if overriding agency/route timezone
ExampleAmerica/Los_Angeles
stop_desc
stringGTFS stops.stop_desc
ExampleNW Corner of Broadway and 14th
stop_code
stringGTFS stops.stop_code
zone_id
stringGTFS stops.zone_id
platform_code
stringGTFS stops.platform_code
tts_stop_name
stringGTFS stops.tts_stop_name
wheelchair_boarding
integerGTFS stops.wheelchair_boarding
location_type
integerGTFS stops.location_type; this is optional in GTFS spec
onestop_id
stringOnestopID for this stop, if available
Examples-dr5ruvgnyk-madisonav~e69st
geometry
Stop geometry
place
object: StopPlaceState/Province associated with this stop
adm0_name
stringBest-matched country name
adm1_name
stringBest-matched state or province name
adm0_iso
stringBest-mached country ISO code
adm1_iso
stringBest-matched state or province ISO code
feed_version
object: FeedVersionFeed version
id
integerInternal integer ID
sha1
stringSHA1 hash of the zip file
Exampleab5bdc8b6cedd06792d42186a9b542504c5eef9a
fetched_at
stringTime when the file was fetched from the url
Example2019-11-15T00:45:55.409906
feed
object: FeedFeed associated with this feed version
level
object: LevelStop level
level_id
stringGTFS levels.level_id
level_name
stringGTFS levels.level_name
level_index
numberGTFS levels.level_index
parent
object: StopStop parent station
id
integerInternal integer ID
stop_id
stringGTFS stops.stop_id
Example400029
stop_name
stringGTFS stops.stop_name
ExampleMADISON AV/E 68 ST
geometry
Stop geometry
alerts
array: AlertGTFS-RT Alerts for this stop
alerts
array: AlertGTFS-RT Alerts for this stop
cause
stringGTFS-RT Alert cause
effect
stringGTFS-RT Alert effect
severity_level
stringGTFS-RT Alert severity level
url
array: RTTranslationGTFS-RT Alert uRL for more information
header_text
array: RTTranslationGTFS-RT Alert header text
description_text
array: RTTranslationGTFS-RT Alert description text
tts_header_text
array: RTTranslationGTFS-RT Alert TTS header text
tts_description_text
array: RTTranslationGTFS-RT Alert TTS description text
active_period
array: RTTimeRangeGTFS-RT Alert active alert period. See https://gtfs.org/realtime/reference/#message-timerange