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

GET/v1/boundaries/{id}

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 /v1/boundaries/{id}.

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/v1/boundaries/{id}" \
  -H "Authorization: Bearer $MAPMAP_KEY"

Parameters

NameInTypeRequiredDescription
idpathstringyesA boundary_id from GET /v1/boundaries, e.g. osm-r51827

Responses

200A GeoJSON Feature: the stored MultiPolygon (Douglas-Peucker simplified, coordinates to 1e-6°) with the search fields plus simplification: {method, tolerance_deg, tolerance_m, vertices, source_vertices}, data_updated, licence and attribution in properties. The Feature is accepted as is as a custom region's polygon, and a cut by it equals a cut by the boundary_id
FieldTypeRequiredDescription
geometryobjectnoThe simplified boundary, a Polygon or MultiPolygon.
idstringnoThe boundary id, e.g. osm-r114085.
propertiesobjectnoname, admin_level, iso_code, country, territory, bbox, area_km2, simplification, data_updated, licence and attribution.
typestringnoAlways Feature.

Example: Recorded from the hosted gateway on 2026-11-05 with a test key: GET /v1/boundaries/osm-r114085 (Brighton and Hove); lists trimmed to their first items

json
{
  "geometry": {
    "coordinates": [
      [
        [
          [
            -0.042196,
            50.824823
          ],
          [
            -0.094387,
            50.876787
          ],
          [
            -0.168154,
            50.880754
          ],
          [
            -0.21391,
            50.870471
          ],
          [
            -0.216694,
            50.832969
          ],
          [
            -0.110852,
            50.811265
          ],
          [
            -0.049486,
            50.800517
          ],
          [
            -0.042196,
            50.824823
          ]
        ]
      ]
    ],
    "type": "MultiPolygon"
  },
  "id": "osm-r114085",
  "properties": {
    "admin_level": 6,
    "area_km2": 85.304,
    "attribution": "© OpenStreetMap contributors",
    "bbox": [
      -0.245077,
      50.79821,
      -0.016031,
      50.892374
    ],
    "boundary_id": "osm-r114085",
    "country": "GB",
    "data_updated": "2026-10-30",
    "iso_code": "GB-BNH",
    "licence": "ODbL-1.0",
    "name": "Brighton and Hove",
    "name_en": null,
    "simplification": {
      "method": "douglas-peucker",
      "source_vertices": 2031,
      "tolerance_deg": 0.0001,
      "tolerance_m": 11,
      "vertices": 290
    },
    "territory": "uk"
  },
  "type": "Feature"
}
400Not a boundary id

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

404No such boundary in this deployment's data

application/problem+json · Problem

429Per-key rate limit (rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)

application/problem+json · Problem

501Boundaries by name not enabled (SN_BOUNDARIES_DIR 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_by_id