Geocoding
Mapviewer Geocoding APIs convert between address data and geographic coordinates.
Base URL: https://api.mapviewer.nl
Authentication: include apiKey as a required query parameter on every request.
Forward Geocoding API
Endpoint: GET /geocode/search
Use this endpoint to convert addresses into coordinates.
What It Supports
- Free-form lookup with text
- Structured lookup with housenumber, street, postcode, city, state, and country
- Geographic filtering and bias
- Optional result type and language controls
- Response formats: geojson (default), json, xml
Required Parameter
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Mapviewer API key |
Search Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| text | string | No | Free-form address query, for example Kerkweg 1, Maasland, Nederland |
| name | string | No | Amenity or place name |
| housenumber | string | No | House number |
| street | string | No | Street name |
| postcode | string | No | Postcode or ZIP code |
| city | string | No | City |
| state | string | No | State or region |
| country | string | No | Country |
Refinement Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | No | country, state, city, postcode, street, amenity |
| lang | string | No | ISO 639-1 language code, for example en |
| limit | integer | No | Max number of results (default: 5) |
| format | string | No | json, geojson, or xml (default: geojson) |
Geographic Controls
filter narrows results to a specific geography:
- Circle: filter=circle:lon,lat,radiusMeters
- Rectangle: filter=rect:lon1,lat1,lon2,lat2
- Country code filter: filter=countrycode:de,es,fr
- Place boundary: filter=place:placeId
bias prioritizes nearby or country-matching results without hard filtering:
- Circle: bias=circle:lon,lat,radiusMeters
- Rectangle: bias=rect:lon1,lat1,lon2,lat2
- Country code bias: bias=countrycode:de,es,fr
- Proximity point: bias=proximity:lon,lat
Example Requests
curl "https://api.mapviewer.nl/geocode/search?apiKey=INSERT_API_KEY_HERE&text=Kerkweg%201,%20Maasland,%20Nederland&format=geojson"
curl "https://api.mapviewer.nl/geocode/search?apiKey=INSERT_API_KEY_HERE&street=Kerkweg&housenumber=1&city=Maasland&country=Nederland&format=json"
Responses
- 200: Geocoding results in json, geojson, or xml
- 400: Invalid request input
- 401: Missing or invalid API key
- 429: Rate limit exceeded
- 500: Internal server error
200 Response Notes
- json responses return a results array and query metadata
- geojson responses return a FeatureCollection with features
- xml responses return equivalent data in XML structure
Reverse Geocoding API
Endpoint: GET /geocode/reverse
Use this endpoint to convert coordinates into address information.
Required Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Mapviewer API key |
| lat | number | Yes | Latitude |
| lon | number | Yes | Longitude |
Optional Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| format | string | No | json, geojson, or xml |
| limit | integer | No | Maximum number of results |
| type | string | No | country, state, city, postcode, street, amenity |
| lang | string | No | ISO 639-1 language code, for example en |
Example Request
curl "https://api.mapviewer.nl/geocode/reverse?apiKey=INSERT_API_KEY_HERE&lat=51.933368&lon=4.2692128&format=json&limit=1"
Responses
- 200: Reverse geocoding results in json, geojson, or xml
- 400: Invalid request input
- 401: Missing or invalid API key
- 429: Rate limit exceeded
- 500: Internal server error
200 Response Notes
- json responses return address objects in results plus query metadata
- geojson responses return a FeatureCollection with location geometry
- xml responses return equivalent address and query data in XML
Playground
Use the interactive Swagger UI: