➑️ suggest-spec

GET https://{{geocode-service}}.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest

The suggest operation allows character-by-character autocomplete suggestions to be generated for user input in a client application. This capability facilitates the interactive search user experience by reducing the number of characters that need to be typed before a suggested match is obtained.

πŸ“„ API reference: suggest operation & geocoding error codes & category filtering. πŸ“™ Related guides: Autosuggest.

Request Params

KeyDatatypeRequiredDescription
tokenstring(Required) You need a valid access token. To learn more, read the collection's documentation.
fstring(Required) Format of the response: json or pjson
textstring(Required) The input text entered by a user, which is used by the suggest operation to generate a list of possible matches.
locationstringDefines an origin point that is used to prefer or boost geocoding candidates based on their proximity to the location. Candidates near the location are prioritized relative to those further away. This is useful in mobile applications where a user wants to search for places in the vicinity of their current GPS location, or in mapping applications where users want to search for places near the center of the map.
categorystringA place or address type that can be used to filter suggest results. The parameter supports input of single category values or multiple comma-separated values. The category parameter must be passed in a request with the text parameter. See Category filtering for complete details about the category parameter.
searchExtentstringA set of bounding box coordinates that limit the search area for suggestions to a specific region. This is especially useful for applications in which a user will search for places and addresses within the current map extent. Helper to get search extent with https://arcgis-js-api-extent-helper.gavinr.com/
maxSuggestionsstringThe maximum number of suggestions returned by a suggest response, up to the maximum number allowed by the service. Currently, the ArcGIS World Geocoding Service allows up to 15 suggestions to be returned. If maxSuggestions is not included in the suggest request, the default value is 5.

| | countryCode | string | | Limits the returned suggestions to values in a particular country. Valid 2- and 3-character country code values for each country are available in Geocode coverage. | | preferredLabelValues | string | | Allows simple configuration of suggestion labels returned in a response from the ArcGIS World Geocoding Service by specifying which address component values should be included in the label. If the parameter is blank or excluded from a request then default address formats are used. |