Autocomplete suggestions
GET https://{{geocode-service}}.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest?token={{access_token}}&f=pjson&text=New Y
The ArcGIS World Geocoding Service includes a method that 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. The idea is that a client application can provide a list of suggestions that is updated with each character entered by a user until the place they are looking for is returned in the list.

API reference: suggest
operation
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
token | string | (Required) You need a valid access token. To learn more, read the collection's documentation. | |
f | string | (Required) Format of the response: json or pjson | |
text | string | (Required) The input text entered by a user, which is used by the suggest operation to generate a list of possible matches. |
RESPONSES
status: OK
{"suggestions":[{"text":"New York, NY, USA","magicKey":"dHA9MCNsb2M9NTI0NDIwMCNsbmc9MzQjcGw9NjUxOTExI2xicz0xNDoyNzAzMTgwMQ==","isCollection":false},{"text":"New York, USA","magicKey":"dHA9MCNsb2M9NDk1NjY3MyNsbmc9MzQjcGw9NjAxNzMxI2xicz0xNDoyNzAzMTgwMQ==","isCollection":false},{"text":"New York international Airport, New York, NY, USA","magicKey":"dHA9MCNsb2M9MTQ1MDQ3NzIjbG5nPTM0I3BsPTIyNTY3NTIjbGJzPTE0OjI3MDM0MDAz","isCollection":false},{"text":"New York Stad, NY, USA","magicKey":"dHA9MCNsb2M9MTQ1MDU5ODYjbG5nPTM0I3BsPTIyNjcyMTAjbGJzPTE0OjI3MDMzNjM5","isCollection":false},{"text":"New York Mills, NY, USA","magicKey":"dHA9MCNsb2M9NDk5ODg0OSNsbmc9MzQjcGw9NjA4NjM1I2xicz0xNDoyNzAzMzE4Mg==","isCollection":false}]}