Skip to content

Both copy text to your clipboard — Build with AI copies a setup prompt to paste into Claude Code, Cursor, Codex or Copilot; Copy page as Markdown copies this page to paste into a chat. How it works

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.lat and point.lon — note that these parameter names literally contain dots; that is correct, not a typo.
  • Cap the number of results with size.
  • Pass format=pelias to get back a full GeoJSON FeatureCollection — 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

ParameterTypeReqExampleDescription
point.latfloat50.8514Latitude of the point. Parameter name contains a literal dot.
point.lonfloat5.7423Longitude of the point. Parameter name contains a literal dot.
sizeinteger10Number of results to return.
formatstringpeliasMust be pelias to get the GeoJSON FeatureCollection shape.
tokenstringYOUR_API_KEYAuth token, passed as a query parameter.

Example

bash
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

json
{
  "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.