Contents
REST API - Stops
Stops
The REST API routes endpoint 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 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
Parameter | Type | Description | Example |
---|---|---|---|
include_alerts | string enum | Include alerts from GTFS Realtime feeds | |
id | integer 0 ... unlimited | Search for a specific internal ID | |
stop_key | string | Stop lookup key; can be an integer ID, a '<feed onestop_id>:<gtfs stop_id>' key, or a Onestop ID | |
after | integer | Return records past this record ID | |
limit | integer 0 ... 100 | Maximum number of records to return | limit=1 |
format | enum | Response format | format=geojson |
search | string | Full text search | search=embarcadero |
onestop_id | string | Search for a specific Onestop ID | 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 |
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-9q9-bart |
radius | number 0 ... 10000 | Search for stops geographically; radius is in meters, requires lon and lat | lon=-122&lat=37&radius=1000 |
lon | number -180 ... 180 | Longitude | |
lat | number -90 ... 90 | 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 | 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 | 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 | 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 | 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 | 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
Array of objects
Description
Reference GTFS specification for stops.txt
id
(integer)
(integer)
Unique integer ID
onestop_id
(string)
(string)
Onestop ID for this stop, if available
Examples-dr5ruvgnyk-madisonav~e69st
stop_id
(string)
(string)
GTFS stop_id
Example400029
stop_name
(string)
(string)
GTFS stop_name
ExampleMADISON AV/E 69 ST
stop_desc
(string)
(string)
GTFS stop_desc
ExampleFind this stop at the end of a long journey
stop_url
(uri)
(uri)
GTFS stop_url
stop_timezone
(timezone)
(timezone)
GTFS stop_timezone, if overriding agency/route timezone
ExampleAmerica/Los_Angeles
stop_code
(string)
(string)
GTFS stop_code
zone_id
(string)
(string)
GTFS zone_id
wheelchair_boarding
(integer)
(integer)
GTFS wheelchair_boarding
location_type
(integer)
(integer)
GTFS location_type
platform_code
(string)
(string)
GTFS platform_code
tts_stop_name
(string)
(string)
GTFS tts_stop_name
feed_version
(object)
(object)
A subset of the fields for this stop's feed version
parent
(object)
(object)
A subset of fields for the parent station for this stop, if defined
level
(object)
(object)
GTFS level
level_id
(string)
(string)
GTFS level_id
level_name
(string)
(string)
GTFS level_name
level_index
(integer)
(integer)
GTFS level_index
route_stops
(array)
(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)
(object)
Geometry in GeoJSON format
type
(string)
(string)
GeoJSON geometry type
ExampleLineString
coordinates
(number array)
(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 ] ]