REST API - 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 OnestopIDs
As with routes, the OnestopID values for stops are automatically generated. Two very similar stops may both generate the same OnestopID, in which case a query for that OnestopID 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 by ID or Onestop ID
GET /api/v2/rest/stops/{stop_key}.{format} — Request a stop by ID or Onestop ID in format
Parameter | Type | Description | Example |
---|---|---|---|
id |
integer
0 ... unlimited | Search for a specific internal ID | |
stop_key |
string
| Equivalent to id (if an integer) or onestop_id (if string) | |
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 |
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 radius (meters); requires lat and lon | lat=-122&lon=37&radius=1000 |
lat |
number
-90 ... 90 | Latitude | |
lon |
number
-180 ... 180 | Longitude |
Response format
(int64)
Example123
(string)
Examples-dr5ruvgnyk-madisonav~e69st
(string)
Example400029
(string)
ExampleMADISON AV/E 69 ST
(string)
ExampleFind this stop at the end of a long journey
(uri)
(timezone)
ExampleAmerica/Los_Angeles
(string)
(string)
(integer)
(integer)
(string)
(string)
(object)
(object)
(string)
(string)
(integer)
(object)
(array)
(object)
(object)
(string)
ExampleLineString
(number array)
Example[ [ -122.496, 37.778 ], [ -122.425, 37.786 ] ]