mz_search
allows you to search using an unstructured string of
text, but if your address data has more structure (eg separate columns for
address, city, state, zip), then using the structured search service may
provide more precision. For more information, see
https://github.com/pelias/documentation. Note that
all of the arguments are optional, but at least one of them must be non-NULL.
Furthermore, postalcode
can not be used by itself.
mz_structured_search(
address = NULL,
neighbourhood = NULL,
borough = NULL,
locality = NULL,
county = NULL,
region = NULL,
postalcode = NULL,
country = NULL,
api_key = NULL,
...
)
Can be a numbered street address or just the name of the street
Neighborhood name (eg "Notting Hill" in London)
eg "Manhattan"
The city (eg "Oakland")
The county
States in the case of US/Canada, or state-like administrative division in other countries
AKA the zip code. Can not be used alone, must have at least one other argument
The country - Can be the full name or the abbreviation from
mz_countries
Your Mapzen API key. The default is to look for the key within the provider information that was set up with `mz_set_host`.
Any of the parameters, other than "text", that appear in
mz_search
, can appear here, for example size
,
boundary.country
, etc.
mz_search