Autocomplete response
The autocomplete endpoint returns a structured response containing a list of matching addresses. Each response includes:- The requested country (
country) - The response language (
language) - A list of address results (
hits) - The maximum number of results requested (
limit)
Address results
Each item inhits represents a single, normalized address.
An address consists of:
- A compact single-line representation (
single_line) - A list of formatted address lines (
lines) - A structured address record (
record) - A geographic location (
location)
Address records
Therecord field contains a structured representation of the address.
Address records are polymorphic and vary depending on the country and address type. Each
record contains a type field that identifies the schema used for that address.
Each record type exposes the fields that are relevant for that country’s address system.
This approach avoids forcing all countries into a single rigid address structure while still
providing strongly typed address data.
For a detailed breakdown of available record types and their fields, see the
API reference.
Location
Thelocation field contains the geographic coordinates of the address in WGS84.
These coordinates can be used for mapping, distance calculations, or geospatial queries.