Contents
Documentation
REST API - Stops
Stops
The REST API routes stops provides a fast and flexible way to browse stops and to visualize their representative locations.
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 Search for stops
GET/api/v2/rest/stops.{format} Request stops in specified format
GET/api/v2/rest/stops/{stop_key} Request a stop by ID or Onestop ID
GET/api/v2/rest/stops/{stop_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 |
| location_type | integer | Filter by location_type: 0=stop/platform, 1=station, 2=entrance/exit, 3=generic node, 4=boarding area | location_type=1 |
| include_alerts | string enum | Include alerts from GTFS Realtime feeds | |
| include_routes | string enum | Include routes that serve this stop | include_routes=true |
| 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: StopList or search for Stops
id
integerInternal integer ID
stop_id
stringGTFS
stops.stop_idExample400029
stop_name
stringGTFS
stops.stop_nameExampleMADISON AV/E 68 ST
stop_url
stringGTFS
stops.stop_urlstop_timezone
stringGTFS
stops.stop_timezone; overrides agency timezone; inherits from parent station if emptyExampleAmerica/Los_Angeles
stop_desc
stringGTFS
stops.stop_descExampleNW Corner of Broadway and 14th
stop_code
stringGTFS
stops.stop_code; short text or number identifying the location for riderszone_id
stringGTFS
stops.zone_id; identifies the fare zone for a stop; required only on stops referenced by fare_rules.txtplatform_code
stringGTFS
stops.platform_code; platform identifier without a 'platform' prefix (e.g. G or 3)tts_stop_name
stringGTFS
stops.tts_stop_name; readable version of stop_name for use with text-to-speech systemsstop_access
integerGTFS
stops.stop_access [0=access only via station entrance/pathways, 1=route directly to the stop]; only valid for platforms (location_type 0) with a parent_stationwheelchair_boarding
integerGTFS
stops.wheelchair_boarding [0=no information, 1=some accessible path exists, 2=no accessible path]location_type
integerGTFS
stops.location_type [0=stop/platform, 1=station, 2=entrance/exit, 3=generic node, 4=boarding area]onestop_id
stringOnestop ID for this stop, or empty string if not registered
Examples-dr5ruvgnyk-madisonav~e69st
geometry
Geographic location of this stop as a GeoJSON Point
place
object: StopPlaceAdministrative place (country and state/province) associated with this stop's location
adm0_name
stringBest-matched country name
adm1_name
stringBest-matched state or province name
adm0_iso
stringBest-matched country ISO code
adm1_iso
stringBest-matched state or province ISO code
feed_version
object: FeedVersionSource feed version for this entity
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: LevelLevel within the station that this stop/platform belongs to
level_id
stringGTFS
levels.level_idlevel_name
stringGTFS
levels.level_name; rider-facing level name (e.g. Mezzanine, Upper Level)level_index
numberGTFS
levels.level_index; higher values are upper levels, 0 is ground, negative values are undergroundparent
object: StopParent station for this stop; for platforms and entrances (location_type 2, 3, 4), this is the enclosing station (location_type 1)
id
integerInternal integer ID
stop_id
stringGTFS
stops.stop_idExample400029
stop_name
stringGTFS
stops.stop_nameExampleMADISON AV/E 68 ST
geometry
Geographic location of this stop as a GeoJSON Point
alerts
array: AlertGTFS-RT service alerts for this stop; pass
active: true to return only currently active alertsalerts
array: AlertGTFS-RT service alerts for this stop; pass
active: true to return only currently active alertscause
stringGTFS-RT Alert cause
effect
stringGTFS-RT Alert effect
severity_level
stringAlert severity:
UNKNOWN_SEVERITY, INFO, WARNING, or SEVEREurl
array: RTTranslationURL for more information
header_text
array: RTTranslationGTFS-RT Alert header text
description_text
array: RTTranslationGTFS-RT Alert description text
tts_header_text
array: RTTranslationHeader text optimized for text-to-speech (TTS) systems
tts_description_text
array: RTTranslationDescription text optimized for text-to-speech (TTS) systems
active_period
array: RTTimeRangeTime ranges during which this alert is active. See https://gtfs.org/realtime/reference/#message-timerange