You can filter by address-related fields using two methods:
- URL parameter
- Advanced queries
By default, the search API will only return results that are in Belgium. You can reset this default as described in Default filters.
Currently, the only URL parameters for address fields are
postalCode can be any integer or string,
addressCountry should always be an ISO 3166-1 alpha-2 country code.
These URL parameters look for complete matches, but are case insensitive.
Note that a document can have multiple addresses, one for each language. The
addressCountry URL parameters look for a match in any of these addresses.
Using advanced queries, you can not only filter by
addressCountry, but also by
Because a document can have address translations, you can search by a specific language or alternatively use a wildcard instead of specifying a language.
GET https://search.uitdatabank.be/offers/?addressCountry=*&q=address.fr.addressCountry:BE AND address.fr.postalCode:1000 AND address.fr.addressLocality:Bruxelles AND address.fr.streetAddress:Boulevard Anspach*
The query above will look for specific matches in the
The following example looks for matches in any language:
GET https://search.uitdatabank.be/offers/?addressCountry=*&q=address.\*.addressCountry:BE AND address.\*.postalCode:1000 AND address.\*.addressLocality:Bruxelles AND address.\*.streetAddress:Boulevard Anspach*
Note that wildcards in field names should be escaped using a backslash. (
streetAddress also includes the street number, so make sure to add a wildcard to the field value to filter by a street name. Like so:
For more information, see advanced queries.
Free text search
Lees verder: Age