Wazli Maps Docs

Docs › Products

Autocomplete

Address suggestions while people type, in English or Arabic, ranked near a point: what to send, the places that come back and a copy-paste example.

What to send

GET https://map.wazli.com/api/maps/v1/autocomplete with a key that has Autocomplete. In a web page, the website kit's address box calls it for you; see map.wazli.com/developers/website-kit.

ParameterWhat it is
qThe text typed, 2 to 200 characters. Eastern Arabic digits (٠-٩) are read as 0-9.
lang"en" (default) or "ar": the language of names and addresses in the answer.
nearlat,lng to rank close places first.
limitHow many results, 1 to 10 (5 if left out).

What comes back

{ results: Place[] }, best first. Each place:

FieldWhat it is
idThe place's id, or null.
kindWhat it is: house, street, city, state, postcode, poi, area.
labelThe whole line, ready to show.
name, houseNumber, street, city, state, postcode, countryCodeThe address's parts; each is null when unknown.
lat, lngThe point (latitude, longitude).
bboxAreas only: [west, south, east, north].
Answer (shortened)
{
  "results": [
    {
      "id": "osm:W589215792",
      "kind": "poi",
      "label": "Orlando International Airport, 1 Jeff Fuqua Boulevard, Orlando, Florida, 32827, United States",
      "name": "Orlando International Airport",
      "houseNumber": "1",
      "street": "Jeff Fuqua Boulevard",
      "city": "Orlando",
      "state": "Florida",
      "postcode": "32827",
      "countryCode": "US",
      "lat": 28.4129036,
      "lng": -81.3094431,
      "bbox": [-81.3430557, 28.374728, -81.2766925, 28.4512482]
    },
    { "id": "osm:R9219427", "kind": "poi", "label": "Inter.co Stadium, West Pine Street, Orlando, Florida, 32801, United States", ... },
    ...
  ]
}

Example

curl
curl "https://map.wazli.com/api/maps/v1/autocomplete?q=Orlando%20Inter&near=28.538,-81.379&limit=3" \
  -H "X-Wazli-Key: YOUR_SERVER_KEY"