# Geocoder

:::lead
The Geocoder API provides geocoding (text search), reverse geocoding (coordinates to places), and place lookup for Norwegian addresses, stop places, and points of interest. Results are GeoJSON `FeatureCollection`s combining data from the national stop registry (NSR), the cadastre (matrikkelen), Kartverket place names, and OpenStreetMap.
:::

Coming from the v1/v2 API? See the [v2 to v3 migration guide](geocoder/migration-v2-v3).

## Endpoints

::endpoint[geocoder/autocompleteV3]
::endpoint[geocoder/reverseV3]
::endpoint[geocoder/placeV3]

## Quick start

```bash
# Autocomplete
curl -H "ET-Client-Name: company-application" \
  "https://api.entur.io/geocoder/v3/autocomplete?q=Oslo+S"

# Autocomplete with focus point (boost results near a location)
curl -H "ET-Client-Name: company-application" \
  "https://api.entur.io/geocoder/v3/autocomplete?q=haugen&lat=59.9&lon=10.7"

# Reverse geocode (radius in km, decimals accepted)
curl -H "ET-Client-Name: company-application" \
  "https://api.entur.io/geocoder/v3/reverse?lat=59.9110&lon=10.7522&radius=0.5"

# Place lookup
curl -H "ET-Client-Name: company-application" \
  "https://api.entur.io/geocoder/v3/place?ids=NSR:StopPlace:337"
```

## Listing places with filters

The `q` parameter is optional on `/v3/autocomplete`. Omitting it while providing at least one filter lists all matching places instead of searching:

```bash
# All airports
curl -H "ET-Client-Name: company-application" \
  "https://api.entur.io/geocoder/v3/autocomplete?stopPlaceTypes=airport"

# All stop places in a fare zone
curl -H "ET-Client-Name: company-application" \
  "https://api.entur.io/geocoder/v3/autocomplete?fareZones=RUT:FareZone:4&limit=50"
```
