Reverse Geocode (v2)
The v2 Reverse Geocode API takes a latitude/longitude point and returns the closest address or place.
How it Works
- Send the point to reverse-geocode using
point.latandpoint.lon— note that these parameter names literally contain dots; that is correct, not a typo. - Cap the number of results with
size. - Pass
format=peliasto get back a full GeoJSONFeatureCollection— the same trap as forward geocode applies here.
format=pelias is required for the GeoJSON envelope
Without format=pelias — or with any other value — the endpoint silently returns a different, flat shape instead of the documented FeatureCollection. Always pass format=pelias explicitly.
Endpoint
GET https://gateway.mapmetrics-atlas.net/v2/reverse-geocode/Parameters
| Parameter | Type | Req | Example | Description |
|---|---|---|---|---|
point.lat | float | ✅ | 50.8514 | Latitude of the point. Parameter name contains a literal dot. |
point.lon | float | ✅ | 5.7423 | Longitude of the point. Parameter name contains a literal dot. |
size | integer | ❌ | 10 | Number of results to return. |
format | string | ✅ | pelias | Must be pelias to get the GeoJSON FeatureCollection shape. |
token | string | ✅ | YOUR_API_KEY | Auth token, passed as a query parameter. |
Example
curl "https://gateway.mapmetrics-atlas.net/v2/reverse-geocode/?point.lat=50.8514&point.lon=5.7423&size=10&format=pelias&token=YOUR_API_KEY"Example Response
{
"geocoding": {
"version": "0.2",
"attribution": "http://localhost:4000/attribution",
"query": {
"point.lat": 50.8514,
"point.lon": 5.7423,
"size": 10
},
"engine": {
"name": "Pelias",
"author": "Mapzen",
"version": "1.0"
}
},
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [5.7423, 50.8514]
},
"properties": {
"id": "osm:ext:7f3a9c1d2e4b5a6f",
"gid": "osm:address:7f3a9c1d2e4b5a6f",
"layer": "address",
"name": "Nieuwezijds Voorburgwal 147",
"label": "Nieuwezijds Voorburgwal 147, Maastricht, Netherlands",
"housenumber": "25",
"street": "Nieuwezijds Voorburgwal",
"locality": "Maastricht",
"country": "Netherlands",
"country_a": "NLD"
}
}
],
"bbox": [5.7423, 50.8514, 5.7423, 50.8514]
}region and postalcode are frequently absent
As with forward geocode, region and postalcode are frequently missing from v2 properties — do not assume either field is always present.
Attribution must be surfaced
geocoding.attribution is the ODbL licence credit. Any client displaying results must surface this attribution.