Get features by search

This section describes how to search for specific features in your layer on the basis of the properties. This is a powerful tool to retrieve just a specific subset of the content in your layer.

Note

The results are unordered, and the request does not allow to continue the search, which is the main difference when compared to the iterate-request.

Check which properties are searchable

Not all Feature properties are searchable. Before using the property search it helps to check which of the properties in your layer can be searched.

To check which layer properties can be searched, check the layer's statistics.

Search for features in the layer

Note

For authorization in a GET request you can also use an API Key as a query parameter instead of a bearer token in an authorization header.

Using one of the API endpoints /layers/<Layer ID>/search, /layers/<Layer ID>/bbox or /layers/<Layer ID>>/tile, you can retrieve a set of features in your layer matching a specified query. Such a query could look like:

GET /Base path for the interactive API from the API Lookup Service>/search?p.someProperty1=value1,value2
Host: <Hostname for the interactive API from the API Lookup Service>
Authorization: Bearer <Authorization Token>
Cache-Control: no-cache

Here the prefix p. points to the feature's properties map. The resulting FeatureCollection will contain all features having value1 or value2 for the property property_name_1.

Filtering on values of the properties someProperty1 and someProperty2 a query could look like:

GET /Base path for the interactive API from the API Lookup Service>/search?p.someProperty1=value1,value2
Host: <Hostname for the interactive API from the API Lookup Service>
Authorization: Bearer <Authorization Token>
Cache-Control: no-cache

The available operators are:

  • "=" - equals
  • "!=" - not equals
  • ">=" or "=gte=" - greater than or equals
  • "<=" or "=lte=" - less than or equals
  • ">" or "=gt=" - greater than
  • "<" or "=lt=" - less than
  • "@>" or "=cs=" - array contains

The response will contain only the features matching all conditions in the query. When executing bounding-box or tile queries, the search is only applied to the features located in the specified area.

Note

When using a version enabled interactive map layer, searches can be requested on a specific version of a layer using the "version" query parameter and/or filtering using the "author" query parameter.

results matching ""

    No results matching ""