Skip to content
Documentation menu
docs / api / get-boundary
Boundaries, coordinates and time zones

GET/boundary

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Needs a full key; a browser (maps) key is refused.
Price1 call per request. Class: standard. Published as unit_rules.default in /pricing.json.

What it does

GET /boundary?lat=<f64>&lon=<f64>.

Call it

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

Parameters

NameInTypeRequiredDescription
latquerynumberyesLatitude (WGS84), required
lonquerynumberyesLongitude (WGS84), required

Responses

200{point: {lat, lon}, admins: [{admin_level, iso_code, name, name_en, drive_on_right}, …]}, sorted ascending by admin_level (country before sub-division). An empty admins array is a valid answer (open sea, or a genuine gap in this deployment's admin-boundary coverage: see docs/API.md), never an error
FieldTypeRequiredDescription
adminsobject[]noAreas containing the point, broadest first: admin_level, name, name_en, iso_code and drive_on_right.
pointobjectnoThe point asked about: lat and lon.

Example: Recorded from the hosted gateway on 2026-11-05 with a test key: GET /boundary?lat=51.5074&lon=-0.1278; lists trimmed to their first items

json
{
  "admins": [
    {
      "admin_level": 2,
      "drive_on_right": false,
      "iso_code": "GB",
      "name": "United Kingdom",
      "name_en": null
    },
    {
      "admin_level": 4,
      "drive_on_right": false,
      "iso_code": "ENG",
      "name": "England",
      "name_en": null
    }
  ],
  "point": {
    "lat": 51.5074,
    "lon": -0.1278
  }
}
400Missing or malformed lat/lon

application/problem+json · Problem

401Missing or invalid API key. Also: No key, or a missing, malformed, unknown, revoked or expired one (unauthorized); the body carries signup, docs and a one-call hint for a free 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), or monthly quota exhausted with no payment path (quota-exceeded)

application/problem+json · Problem

500The admin-boundaries database could not be read

application/problem+json · Problem

501Admin boundary lookup not enabled (SN_ADMIN_BOUNDARIES_DB unset)

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 Boundaries, coordinates and time zones

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