Request format

https://suggest.api.mappable.world/v1/suggest
  ? apikey=<string>
  & text=<string>
  & [sessiontoken=<string>]
  & [lang=<string>]
  & [results=<string>]
  & [highlight=<string>]
  & [ll=<string>]
  & [spn=<string>]
  & [bbox=<string>]
  & [ull=<string>]
  & [strict_bounds=<string>]
  & [types=<string>]
  & [print_address=<string>]
  & [org_address_kind=<string>]
  & [attrs=<string>]

apikey

Required parameter

The client key issued in Mappable Account.

Note

Key activation takes up to 15 minutes.

text

Required parameter

User input (prefix). A non-empty UTF-8 encoded string.

sessiontoken

A random unique string that identifies the session. It is necessary for the correct billing of requests.

During one day, you can make several requests to the API by signing up with the same sessiontoken. Such requests will be charged as a single session.

lang

Response language in the format of a two-letter ISO 639-1 code. For example, lang=fr — French. Specified in ISO 639-1.

results

Maximum number of hints. An integer up to 10. The default value is results=7.

highlight

By default, the service highlights matches in the results and returns a set of index ranges that can be highlighted in the interface. The highlight=0 value disables highlighting.

ll

The coordinates of the center of the search window if it is set as a rectangle with the coordinates of the center and a specified size.

The {lon},{lat} format is used, where:

  • {lon} is the longitude in the range from −180° to +180°;
  • {lat} is the latitude in the range from −90° to +90°.

spn

The width and height of the search window in degrees if it is set as a rectangle with the coordinates of the center and a specified size. The values are separated by a comma, no space.

If this parameter isn't specified, the default value is spn=0.1,0.1.

bbox

The coordinates of the lower-left and upper-right corners of the search window if it is set using the coordinates of opposite corners.

ull

User's GPS coordinates (geolocation) Used to calculate distances.

Passed in addition to the window. If this parameter isn't specified, the center of the window will be taken for calculations by default.

strict_bounds

The value strict_bounds=1 is used to strictly limit the output and keep only objects that fall within the window. The window is advisory in nature and doesn't impose strict restrictions on search results, helping to select the most relevant hints.

types

Sets the type of object in the response. Supported types:

  • biz — all organizations
  • geo — all geographical objects
  • street — street
  • metro — subway station
  • district — district, microdistrict, village
  • locality — village, town, residential complex, cottage settlement, gardening cooperative
  • area — regional district
  • province — province, administrative district, federal city
  • country — country
  • house — house, building, unit

Types are separated by a comma, no space. Filtering works through the "or" operator. In case of simultaneous use, the larger type absorbs the smaller ones. For example, ...&types=street,geo,station&... means ..&types=geo&....

Returns a post-component address in the response. To do this, use the value print_address=1.

org_address_kind

Returns a list of organizations with an address up to the house number. To do this, use the value org_address_kind=house. The parameter can be used on its own or together with types=biz or any other object type that returns an address in the response.

attrs

Used in the value attrs=uri. Returns the uri parameter in the response, the value of which can be used in the Geocoder API request to get additional information about the object.