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
jsongeojsonpng
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

Array of objects
Description:
id
(int64)
Unique integer ID

Example:123

onestop_id
(string)
OnestopID for this stop, if available

Example:s-dr5ruvgnyk-madisonav~e69st

stop_id
(string)
GTFS stop_id

Example:400029

stop_name
(string)
GTFS stop_name

Example:MADISON AV/E 69 ST

stop_desc
(string)
GTFS stop_desc

Example:Find 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

Example:America/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
feed_version
(object)
A subset of the fields for this stop's feed version
level
(object)
GTFS level
level_id
(string)
GTFS level_id
level_name
(string)
GTFS level_name
level_index
(integer)
GTFS level_index
parent
(object)
A subset of fields for the parent station for this stop, if defined
route_stops
(array)
Routes associated with this stop
route
(object)
A subset of fields for the routes that visit this stop
geometry
(object)
Geometry in GeoJSON format
type
(string)
GeoJSON geometry type

Example:LineString

coordinates
(number array)
An array of GeoJSON coordinates

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