Geocoder Autocomplete API Developer's Guide

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) 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.

Table 1. Request Parameters
Parameter Type Description Examples
query string The search text which is the basis of the query.
query=Pariser Pl
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.

query=Pariser Pl
&maxresults=10
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=ISO3 country code

Can be combined with the mapview or prox spatial filters.

query=Rue du Froma
&country=FRA
query=Rue du Froma
&country=FRA,BEL
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.

mapview=
TopLeft.Latitude,
TopLeft.Longitude;
BottomRight.Latitude,
BottomRight.Longitude

Can be combined with the country spatial filter.

mapview=41.90852,-87.67629;
41.86827,-87.60419
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.

prox=Latitude,Longitude
prox=Latitude,Longitude,Radius

Can be combined with the country spatial filter.

prox=37.86946,-122.26811,10000
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

query=Barcelo
&beginHighlight=<b>
&endHighlight=</b>

Result:

"label": "Espanya, Catalunya,
<b>Barcelo</b>na"
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.

language=it&query=champs elys

Result:

"label": "Francia, Pariggi, Avenue des Champs-Élysées"