---
url: https://docs.geo.admin.ch/access-data/identify-features.md
---
# Identify Features

Use this endpoint to discover features at a specific location.

::: warning
A maximum of 200 features can be retrieved per request.
To download a larger number of features or entire datasets, use the file-based [STAC API](/download-data/stac-api/overview.md).

Do not send requests over a grid of bounding boxes to export a layer. We block clients that do this.
This also applies to scripts that AI agents generate. See [Fair Use](/get-started/overview.md#fair-use).
:::

## Request Details

To interact with the `identify` endpoint, you need to provide specific parameters in your request.
This endpoint only has query parameters that modify the behavior of the request, some are required and some are optional.

### Query Parameters

| **Parameter**                        | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **geometry (required)**              | The geometry to identify on. The geometry is specified by the geometry type. This parameter is specified as a separated list of coordinates. The simple syntax (comma-separated list of coordinates) and the complex one can be used. ([ESRI syntax for geometries](https://developers.arcgis.com/rest/services-reference/enterprise/geometry-objects/))                                                                                                                                  |
| **geometryType (required)**          | The type of geometry to identify on. Supported values are: `esriGeometryPoint`, `esriGeometryPolyline`, `esriGeometryPolygon`, or `esriGeometryEnvelope`.                                                                                                                                                                                                                                                                                                                                 |
| **layers (optional)**                | The layers to perform the identify operation on. By default, query all the layers in the GeoAdmin API. Notation: `all:"comma-separated list of technical layer names"`.                                                                                                                                                                                                                                                                                                                   |
| **tolerance (required)**             | The tolerance in pixels around the specified geometry. This parameter is used to create a buffer around the geometry. Therefore, a tolerance of `0` deactivates the buffer creation.                                                                                                                                                                                                                                                                                                      |
| **mapExtent (required/optional)**    | The extent of the map (minx, miny, maxx, maxy). Optional if `tolerance=0`. Defaults to `0,0,0,0`. The `mapExtent` and the `imageDisplay` parameters are used by the server to calculate the resolution or scale.                                                                                                                                                                                                                                                                          |
| **imageDisplay (required/optional)** | The screen image display parameters (width, height, and dpi) of the map. The `mapExtent` and `imageDisplay` parameters are used by the server to calculate the distance on the map to search based on the tolerance in screen pixels. Optional if `tolerance=0`. Defaults to `0,0,0`. The combination of `mapExtent` and `imageDisplay` is used to compute a resolution or scale. Some layers have scale-dependent geometries.                                                            |
| **returnGeometry (optional)**        | This parameter defines whether the geometry is returned or not. Defaults to `true`.                                                                                                                                                                                                                                                                                                                                                                                                       |
| **geometryFormat (optional)**        | Returned geometry format. Defaults to ESRI geometry format. Supported values are: `esrijson` or `geojson`.                                                                                                                                                                                                                                                                                                                                                                                |
| **timeInstant (optional)**           | Year (`YYYY`) to filter time-enabled layers (e.g. `ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill` or `ch.astra.unfaelle-personenschaeden_alle`), so you don't receive the whole time series. Requires explicit layers in `layers` (e.g. `layers=all:ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill&timeInstant=2024`). For several layers, give one year for all or a comma-separated list with one value per layer. Layers that are not time-enabled ignore this parameter. |
| **offset (optional)**                | Offset for the first record (if more than 50 records).                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **limit (optional)**                 | The maximum number of results to retrieve per request (default limit=50, max limit=200). For layers that have multiple underlying tables registered in the system, the actual number of features returned may exceed the specified limit. The limit and offset is applied per table, meaning the total result set can contain up to limit × number_of_tables features.                                                                                                                    |
| **sr (optional)**                    | The spatial reference. Supported values: `21781` (LV03), `2056` (LV95), `4326` (WGS84), and `3857` (Web Pseudo-Mercator). Defaults to `21781`.                                                                                                                                                                                                                                                                                                                                            |
| **lang (optional)**                  | The language. Supported values: `de`, `fr`, `it`, `rm`, `en`. Defaults to `de`.                                                                                                                                                                                                                                                                                                                                                                                                           |
| **layerDefs (optional)**             | Filter features with an expression. Syntax: `{ "<layerId>" : "<layerDef1>" }` where `<layerId>` must correspond to the layer specified in `layers`. See below for more details.                                                                                                                                                                                                                                                                                                           |
| **callback (optional)**              | The name of the callback function.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

### Tolerance, mapExtent and imageDisplay

The values of `imageDisplay` and `mapExtent` must be set for a `tolerance > 0`. This is because we need them to map the `tolerance` from pixels to meters. For a `tolerance=0`, however, we would only set `imageDisplay` and `mapExtent` for specific cases. One such case might be a scale dependant model that you display as points at smaller scales and as polygons at larger scales.

The following table summarize the various combinations:

| **Tolerance** | `imageDisplay=0,0,0` `mapExtent=0,0,0,0` | `imageDisplay=1,1,1` `mapExtent=1,1,1,1` |
| ------------- | ---------------------------------------- | ---------------------------------------- |
| `tolerance=0` | No buffer & no scale                     | No buffer, but scale                     |
| `tolerance>0` | Forbidden                                | Buffer & scale                           |

### Filtering

To filter features on a set of attributes, we can use the `layerDefs` parameter on "queryable" layers.

So-called "queryable" layers are:

```txt
ch.astra.unfaelle-personenschaeden_alle
ch.astra.unfaelle-personenschaeden_fahrraeder
ch.astra.unfaelle-personenschaeden_fussgaenger
ch.astra.unfaelle-personenschaeden_getoetete
ch.astra.unfaelle-personenschaeden_motorraeder
ch.bafu.landesforstinventar-vegetationshoehenmodell
ch.bafu.wrz-wildruhezonen_portal
ch.bfe.solarenergie-eignung-daecher
ch.bfe.solarenergie-eignung-fassaden
ch.swisstopo.amtliches-gebaeudeadressverzeichnis
ch.swisstopo.amtliches-strassenverzeichnis
```

Regarding the format of the `layerDefs` parameter:

* Use a JSON-like format: `{"<layername>":"<filter_expression>"}`.
* The `<filter_expression` is defined in the form `<attribute><operator><value>` where

  * `<attribute>` must be one of the queryable attributes listed by the [layer attribute endpoint](/explore-data/get-layer-attributes).
  * `<operator>` must be one of the following options:

  | **Operator** | **Operators**                                                                 | **Examples**                                                                    |
  | ------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
  | `varchar`    | `=`, `+=`, `like`, `ilike`, `not like`, `not ilike`, `is null`, `is not null` | `toto = '3455 Kloten'`, `toto ilike '%SH%'`, `toto is null`, `toto ilike 'SH%'` |
  | `number`     | `=`, `<`, `>`, `>=`, `<=`, `!=`                                               | `tutu >= 2.4`, `tutu < 5`                                                       |
  | `boolean`    | `is` (true/false), `is not` (true/false)                                      | `tata is not false`                                                             |

  * `<value>` must correspond to the type of the queryable attribute.

In an example:

#### Correct Encoding

It's important that the parameters are correctly serialized and url-encoded.

To encode the layerDefs parameter in your URL using the right URL escape codes (%xx), you may want to make use of Python's [urllib.parse.quote()](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote):

```python
import json
import urllib.parse

params = {
  "ch.swisstopo.amtliches-strassenverzeichnis": "zip_label = '8302 Kloten'"
}
print(f'&layerDefs={urllib.parse.quote(json.dumps(params))}')
## &layerDefs=%7B%22ch.swisstopo.amtliches-strassenverzeichnis%22%3A%20%22zip_label%20%3D%20%278302%20Kloten%27%22%7D
```

## Examples

Identify all the features belonging to `ch.bafu.nabelstationen` using a tolerance of 5 pixels around a point:

Identify all the features belonging to `ch.bfs.arealstatistik` intersecting an envelope (or bounding box):

Identify all the features belonging to `ch.bafu.bundesinventare-bln` a polyline:

Identify all the features belonging to `ch.bafu.bundesinventare-bln` intersecting a polygon:

Same request for `ch.bfs.arealstatistik` as above but returned geometry format is GeoJSON:

Same request for `ch.bfs.arealstatistik` as above but geometry is not returned:

## Examples: Reverse Geocoding

The `identify` endpoint can be used for reverse geocoding operations.

Perform an identify request to find the districts intersecting a given envelope geometry (no buffer):

Perform an identify request to find the municipal boundaries and ZIP (PLZ or NPA) intersecting with a point (no buffer):

Reverse geocoding an address with a point (no buffer):

## Examples: Search Radius

To search within a specified radius at a given location:

1. Specify the location with `geometry` and set the `geometryType` to `esriGeometryPoint`.

2. Set `mapExtent`, `imageDisplay` and `tolerance` such that you get the desired search radius in meters according to this relation:

```
searchRadius = max(mapExtent.maxx / imageDisplay.width, mapExtent.maxy / imageDisplay.height) * tolerance toleranceInPx
```

For example, if you want a search radius of 5 meters, you could set `tolerance=5` for a `mapExtent=0,0,100,100` and a `imageDisplay=100,100,100`:

```
searchRadius = max(mapExtent.maxx / imageDisplay.width, mapExtent.maxy / imageDisplay.height) * tolerance toleranceInPx
             = max(100 / 100, 100 / 100) * 5
             = 5
```

So, to perform an identify request with a search radius of 5 meters around a given point, you would set:&#xA;

## Download as INTERLIS

For a limited set of "ÖREB" layers, features can be retrieved in the INTERLIS format (XML) with `geometryFormat=interlis`.
"ÖREB" is the German accronym for the [Cadastre of public-law restrictions on landownership](https://www.swisstopo.admin.ch/en/plr-cadastre).

:::warning
The INTERLIS format is designed for specialized applications and may not be suitable for general use.
For most users, we recommend using one of the following formats instead:

* `geometryFormat=geojson`
* `geometryFormat=esrijson`

:::

The following layers are based on the [ÖREB model V2_0](https://models.geo.admin.ch/V_D/OeREB/OeREBKRMtrsfr_V2_0.ili) and offer features in the INTERLIS format:

* Layers with data:

  ```txt
  ch.astra.baulinien-nationalstrassen_v2_0.oereb
  ch.bazl.projektierungszonen-flughafenanlagen_v2_0.oereb
  ch.bazl.sicherheitszonenplan_v2_0.oereb
  ch.vbs.kataster-belasteter-standorte-militaer_v2_0.oereb
  ch.bazl.kataster-belasteter-standorte-zivilflugplaetze_v2_0.oereb
  ch.bav.kataster-belasteter-standorte-oev_v2_0.oereb
  ```

* Layers without data:

  ```txt
  ch.astra.projektierungszonen-nationalstrassen_v2_0.oereb
  ch.bav.projektierungszonen-eisenbahnanlagen_v2_0.oereb
  ch.bav.baulinien-eisenbahnanlagen_v2_0.oereb
  ch.bazl.baulinien-flughafenanlagen_v2_0.oereb
  ch.bfe.projektierungszonen-starkstromanlagen_v2_0.oereb
  ch.bfe.baulinien-starkstromanlagen_v2_0.oereb
  ```

### Example ÖREB Queries

Look for all the features of `ch.bazl.projektierungszonen-flughafenanlagen_v2_0.oereb` using a point:

https://api3.geo.admin.ch/rest/services/ech/MapServer/identify?geometry=2682414.312,1257059.381\&geometryType=esriGeometryPoint\&layers=all:ch.bazl.projektierungszonen-flughafenanlagen_v2_0.oereb\&mapExtent=2480000,1070000,2840000,1310000\&imageDisplay=3600,2400,96\&tolerance=0\&geometryFormat=interlis\&sr=2056

Look for all the features of `ch.bav.kataster-belasteter-standorte-oev_v2_0.oereb` using a polygon:

https://api3.geo.admin.ch/rest/services/ech/MapServer/identify?geometry={"rings":\[\[\[2675000,1245000],\[2670000,1255000],\[2680000,1260000],\[2690000,1255000],\[2685000,1240000],\[2675000,1245000]]]}\&geometryType=esriGeometryPolygon\&layers=all:ch.bav.kataster-belasteter-standorte-oev_v2_0.oereb\&mapExtent=2480000,1070000,2840000,1310000\&imageDisplay=3600,2400,96\&tolerance=0\&geometryFormat=interlis\&sr=2056

Look for all the features of `ch.bazl.sicherheitszonenplan_v2_0.oereb` using a bounding box (envelope):

https://api3.geo.admin.ch/rest/services/ech/MapServer/identify?geometry=2575000,1109000,2610000,1127000\&geometryType=esriGeometryEnvelope\&layers=all:ch.bazl.sicherheitszonenplan_v2_0.oereb\&mapExtent=2480000,1070000,2840000,1310000\&imageDisplay=3600,2400,96\&tolerance=0\&geometryFormat=interlis\&sr=2056

Look for all the features of `ch.astra.baulinien-nationalstrassen_v2_0.oereb` using a bounding box (envelope):

https://api3.geo.admin.ch/rest/services/ech/MapServer/identify?geometry=2599000,1200000,2604000,1203000\&geometryType=esriGeometryEnvelope\&layers=all:ch.astra.baulinien-nationalstrassen_v2_0.oereb\&mapExtent=2480000,1070000,2840000,1310000\&imageDisplay=3600,2400,96\&tolerance=0\&geometryFormat=interlis\&sr=2056
