Skip to content
Documentation menu
docs / api / get-geocode-reverse
Geocoding and search

GET/geocode/reverse

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…, or none on the keyless demo lane: a per-IP rate limit and daily cap, never metered. Truck and ADR parameters always need a key (401 demo-premium-requires-key). A browser (maps) key may call it.
Price1 call per request. Class: standard. Published as unit_rules.default in /pricing.json.

What it does

GET /geocode/reverse?lon=<f64>&lat=<f64>[&kinds=..&categories=..&name=..&radius_m=..&limit=..].

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/geocode/reverse?lon=…&lat=…" \
  -H "Authorization: Bearer $MAPMAP_KEY"

Parameters

NameInTypeRequiredDescription
lonquerynumberyesLongitude (WGS84), required
latquerynumberyesLatitude (WGS84), required
kindsquerystringnoRestrict hits to these document kinds, comma-separated: address, street, locality, poi, postcode (e.g. kinds=poi for nearest-POI lookups). First-party index only; ignored on the Photon proxy path.
categoriesquerystringnoRestrict hits to POIs of these categories, comma-separated; a category browse: the nearest cafés/fuel/parking to the point, nearest first. The index's category vocabulary is the lowercased value of the POI's first matching OSM tag (amenity, shop, tourism, railway, leisure, …), e.g. cafe, fuel, charging_station, parking, pharmacy, supermarket, hotel, restaurant, fast_food, atm, bakery, hospital, station. Common colloquial phrases are normalised to their canonical token (coffee → cafe; ev_charging, ev charging, charging station → charging_station; petrol → fuel; chemist → pharmacy); anything else is passed through lowercased, and a category the index does not carry simply matches nothing: an empty FeatureCollection, never an error. Implies kinds=poi unless kinds is given explicitly. First-party index only: on the Photon proxy path this parameter answers 501 reverse-filtering-not-enabled (Photon's reverse cannot filter by category).
namequerystringnoRestrict hits to places of this name or brand, nearest first; the "nearest Lloyds bank" question (name=Lloyds&categories=bank), which forward text search cannot answer: GET /geocode?q=Lloyds Bank ranks every branch in the country and only biases by proximity, so a namesake in another city outranks the branch 100 m away. Matched the same way the forward search matches names: lowercased, diacritic-folded, split into words, and EVERY word must match the place's name or one of its alternative names (alt_name, short_name, official_name, name:en), with the last word also matching as a prefix so partial input works (name=Sains finds Sainsbury's). It follows that name=Lloyds matches "Lloyds Bank" but name=Lloyds Bank does not match a branch mapped as just "Lloyds": combine name with categories for that. Not a kind filter: streets and localities of that name match too unless kinds says otherwise. Brand and operator tags are NOT searchable (they are returned in details but not indexed), so a branch whose name never mentions the brand is not reachable by name. First-party index only: on the Photon proxy path this parameter answers 501 reverse-filtering-not-enabled (Photon's reverse cannot filter by name).
radius_mqueryintegernoMaximum straight-line distance of any hit from the point, in metres (1–100000; the search ladder is capped and hits beyond the radius are dropped). Without it a category or name browse expands 2.5 km → 25 km → 100 km until it fills the page. First-party index only: on the Photon proxy path this parameter answers 501 reverse-filtering-not-enabled. Limits: at least 0.
limitqueryintegernoMaximum results, 1–10 (default 5). Honoured on both the first-party and Photon proxy paths. Limits: at least 0.

Responses

200Photon-compatible GeoJSON FeatureCollection. First-party hits add distance_m, a stable id, and a details object on POI hits (whitelisted OSM display tags), and carry the same address fields as GET /geocode (state the containing first-level subdivision; on indexes built from 6 November 2026, UK district and county from the administrative boundaries that contain the hit); the Photon proxy path passes the upstream body through verbatim
FieldTypeRequiredDescription
featuresobject[]noMatches, best first: a Point geometry and properties with name, address parts, country, countrycode, the OSM osm_type, osm_id, osm_key and osm_value, and where known categories and details.
typestringnoAlways FeatureCollection.

Example: Recorded from the hosted gateway on 2026-11-05, keyless: GET /geocode/reverse?lat=50.8195&lon=-0.1366&limit=1

json
{
  "features": [
    {
      "geometry": {
        "coordinates": [
          -0.1365172,
          50.8194215
        ],
        "type": "Point"
      },
      "properties": {
        "categories": [
          "information"
        ],
        "city": "Brighton",
        "context_names": [
          "Hove",
          "Portslade by Sea"
        ],
        "country": "United Kingdom",
        "countrycode": "GB",
        "details": {
          "description": "1) Brighton Marina 1.5 2) Hove 2",
          "operator": "Walk Wheel Cycle Trust",
          "website": "https://www.walkwheelcycletrust.org.uk/national-cycle-network/millennium-mileposts/"
        },
        "distance_m": 10,
        "id": "osm:n82558040:poi",
        "name": "Millennium Milepost",
        "state": "Knepp Wildland",
        "type": "poi"
      },
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}
400Missing or malformed lon/lat, or a malformed kinds/categories/name/radius_m/limit

application/problem+json · Problem

401Missing or invalid API key. Also: A malformed, unknown, revoked or expired key (unauthorized); or a keyless call on the demo lane that engaged truck or ADR parameters (demo-premium-requires-key)

application/problem+json · Problem

402Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected X-PAYMENT). Not problem+json

application/json · X402PaymentRequired

403The key may not call this: a browser key outside its scope (scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)

application/problem+json · Problem

429Quota or rate limit exceeded. Also: Per-key rate limit (rate-limited, with Retry-After); monthly quota with no payment path (quota-exceeded); or, keyless, the demo lane's per-IP rate (rate-limited) or daily cap (demo-daily-exceeded)

application/problem+json · Problem

501Geocoding not enabled (neither SN_GEOCODE_DIR nor SN_PHOTON_URL set), or categories/name/radius_m on a Photon-proxy deployment (urn:sn-gateway:problem:reverse-filtering-not-enabled; clients feature-detect on this status)

application/problem+json · Problem

502Photon upstream failed

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

Error bodies follow the shared problem model documented on API conventions.

Also under Geocoding and search

Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId get_geocode_reverse