Request Parameters
The Geocoder Autocomplete API is very simple. It supports a small number of request parameters. Among them, only the authorization parameters (app_id
, app_code
or apiKey
) and query
are mandatory.
Requests must conform to this general pattern:
.../6.2/suggest.json?<parameter>=<value>...
The table below documents the supported request parameters.
Parameter | Type | Description | Examples |
---|---|---|---|
query | string | The search text which is the basis of the query. | |
maxresults | integer | The upper limit the for number of suggestions to be included in the response. Default is set to 5. Valid range: 1 to 20. | |
country | A comma separated list of strings (3-letter ISO country codes) | A type of Spatial Filter. The spatial filter limits the search for any other attributes in the request. The country parameter limits suggestions to a country or set of countries. country= Can be combined with the | |
mapview | two lat/lon pairs | A type of Spatial Filter. Sets a focus on a geographic area represented by the top-left and the bottom-right corners of a bounding box so the results within this area are more important than results outside of this area. Can be combined with the | |
prox | lat/lon pair and (optional) radius | A type of Spatial Filter. Sets a focus on a geographic area represented by a single geo-coordinate pair and optionally a radius (in meters) so the results within this area are more important than results outside of this area. Can be combined with the country spatial filter. | |
beginHighlight | string | Mark the beginning of the match in a token. This can be any character sequence. Common usage is a HTML tag such as <b> for bold. But it can also be a square bracket, "[". Default: no marker | Result: |
endHighlight | string | Mark the end of the match in a token. | See beginHighlight |
language | string | The preferred language of address elements in the result. The language parameter must be provided as 2-letter ISO language code. The plural form of the parameter (languages) is not supported and ignored. Only one language can be provided. The language setting changes the language of result elements where available in the map data. The language setting has no impact on matching or ranking and it does not express any regional preference. The default response language is the language that is most relevant to the query. | Result: |
resultType | 'areas' or 'postalCode' or 'city' | The The The | |