Structured search
GET /address_whisper/structured
Use this when your form has separate fields (city, street, zip, house
number…) instead of a single search box. You tell the API which field the user
is currently typing into via searchType; that field is completed, and any
other fields you pass narrow the candidates.
Active field vs. filters
searchType selects the active field — the one being completed and
collapsed in the response. Every other field you supply is applied as a
filter. Example: searchType=street with city=Praha autocompletes
streets, restricted to Prague.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
searchType | enum | yes | Which field is being typed into. One of: city, street, zip, houseNumber, orientationNumber, fullNumber. |
city | string | City name or partial input. | |
street | string | Street name or partial input. | |
zip | string | Postal code or partial input. | |
houseNumber | string | House number (číslo popisné). | |
orientationNumber | string | Orientation number (číslo orientační). | |
fullNumber | string | Full number, e.g. "3104/1". | |
country | string | ISO 3166-1 alpha-2 country code. | |
lon | number | WGS-84 longitude bias. | |
lat | number | WGS-84 latitude bias. | |
apiKey | string | yes | Your API key. |
searchType values
| Value | Completes | Typical filters |
|---|---|---|
city | City names | country |
street | Street names | city, zip |
zip | Postal codes | city |
houseNumber | House numbers (popisné) | city, street |
orientationNumber | Orientation numbers (orientační) | city, street |
fullNumber | Combined number, e.g. 3104/1 | city, street |
If the active field's value is empty (e.g. searchType=city with no city),
the endpoint returns 200 with an empty array [].
Request
cURL
Code(bash)
JavaScript
Code(js)
Response
200 OK — an array of up to 13 result objects, collapsed on the active
field (e.g. one entry per distinct city when searchType=city). The object
shape is identical to Address search, including the
structured details.
Code(json)
