Skip to content
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.

When visualizing many stop points over a large region, consider using Transitland's vector tiles instead of the REST API.

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.


GEThttps://transit.land/api/v2/rest/stops

  • GEThttps://transit.land/api/v2/rest/stops.{format}Request stops in specified format
  • GEThttps://transit.land/api/v2/rest/stops/{stop_key}Request a stop by ID or Onestop ID
  • GEThttps://transit.land/api/v2/rest/stops/{stop_key}.{format}Request a stop by ID or Onestop ID in specified format

Request

stop_keyoptional string
Stop lookup key; can be an integer ID, a '<feed onestop_id>:<gtfs stop_id>' key, or a Onestop ID
stop_idoptional string
Search for records with this GTFS stop_id
served_by_onestop_idsoptional string
Search stops visited by a route or agency OnestopID. Accepts comma separated values.
served_by_route_typeoptional integer
Search for stops served by a particular route (vehicle) type.
served_by_route_typesoptional string
Search for stops served by particular route (vehicle) types. Accepts comma separated values.
location_typeoptional integer
Filter by location_type: 0=stop/platform, 1=station, 2=entrance/exit, 3=generic node, 4=boarding area
include_alertsoptional string
Include alerts from GTFS Realtime feeds

Allowed:true, false

include_routesoptional string
Include routes that serve this stop

Allowed:true, false

idoptional integer (int32)
Search for a specific internal ID
afteroptional integer (int32)
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.
limitoptional integer (int32)
Maximum number of records to return
formatoptional string
Response format

Allowed:json, geojson, geojsonl

onestop_idoptional string
Search for a specific Onestop ID
feed_version_sha1optional string
Search for records in this feed version
feed_onestop_idoptional string
Search for records in this feed
radiusoptional number
Search for stops geographically; radius is in meters, requires lon and lat
lonoptional number
Longitude
latoptional number
Latitude
bboxoptional string
Geographic search using a bounding box, with coordinates in (min_lon, min_lat, max_lon, max_lat) order as a comma separated string
license_commercial_use_allowedoptional string
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'.

Allowed:yes, no, unknown, exclude_no

license_share_alike_optionaloptional string
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'.

Allowed:yes, no, unknown, exclude_no

license_create_derived_productoptional string
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'.

Allowed:yes, no, unknown, exclude_no

license_redistribution_allowedoptional string
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'.

Allowed:yes, no, unknown, exclude_no

license_use_without_attributionoptional string
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'.

Allowed:yes, no, unknown, exclude_no

Response

stopsarray of Stop
List or search for Stops
stops.idinteger
Internal integer ID
stops.stop_idstring
GTFS stops.stop_id

Example:400029

stops.stop_namenullable string
GTFS stops.stop_name

Example:MADISON AV/E 68 ST

stops.stop_urlnullable string
GTFS stops.stop_url
stops.stop_timezonenullable string
GTFS stops.stop_timezone; overrides agency timezone; inherits from parent station if empty

Example:America/Los_Angeles

stops.stop_descnullable string
GTFS stops.stop_desc

Example:NW Corner of Broadway and 14th

stops.stop_codenullable string
GTFS stops.stop_code; short text or number identifying the location for riders
stops.zone_idnullable string
GTFS stops.zone_id; identifies the fare zone for a stop; required only on stops referenced by fare_rules.txt
stops.platform_codenullable string
GTFS stops.platform_code; platform identifier without a 'platform' prefix (e.g. G or 3)
stops.tts_stop_namenullable string
GTFS stops.tts_stop_name; readable version of stop_name for use with text-to-speech systems
stops.stop_accessnullable integer
GTFS 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_station
stops.wheelchair_boardingnullable integer
GTFS stops.wheelchair_boarding [0=no information, 1=some accessible path exists, 2=no accessible path]
stops.location_typeinteger
GTFS stops.location_type [0=stop/platform, 1=station, 2=entrance/exit, 3=generic node, 4=boarding area]
stops.onestop_idstring
Onestop ID for this stop, or empty string if not registered

Example:s-dr5ruvgnyk-madisonav~e69st

stops.geometryPoint
Geographic location of this stop as a GeoJSON Point
stops.placenullable StopPlace
Administrative place (country and state/province) associated with this stop's location
stops.feed_versionFeedVersion
Source feed version for this entity
stops.levelnullable Level
Level within the station that this stop/platform belongs to
stops.parentnullable Stop
Parent station for this stop; for platforms and entrances (location_type 2, 3, 4), this is the enclosing station (location_type 1)
stops.alertsnullable array of Alert
GTFS-RT service alerts for this stop; pass active: true to return only currently active alerts