Skip to content
Documentation menu
docs / api / get-territories
Offline territories

GET/territories

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

Each territory in the index carries data_updated: the ISO-8601 date (YYYY-MM-DD) of the OSM extract behind its latest_version, or null on a channel published before the field existed. The gateway adds nothing here either; the field is written and signed by snfactory publish (sn_factory::channel), so it cannot drift from the manifests it summarises, and a client can verify it against them.

Call it

bash
curl -fsS -X GET "https://api.mapmap.ai/territories" \
  -H "Authorization: Bearer $MAPMAP_KEY"

Responses

200The channel index (index.json, exact signed bytes); each territory carries data_updated, the ISO-8601 date of the OSM extract behind its latest version (null if unknown)
FieldTypeRequiredDescription
format_versionintegernoIndex format version.
generated_atstringnoWhen the index was generated.
territoriesobject[]noTerritories: id, display_name, latest_version, data_updated, and versions with each version's manifest_path, data_timestamp and total_bytes.

Example: Recorded from the hosted gateway on 2026-11-05 with a test key: GET /territories; lists trimmed to their first items

json
{
  "format_version": 1,
  "generated_at": "2026-11-04T17:21:16.607034799Z",
  "territories": [
    {
      "data_updated": "2026-10-28",
      "display_name": "Africa",
      "id": "africa",
      "latest_version": "2026.1031.0010",
      "versions": [
        {
          "data_timestamp": "2026-10-28T21:21:02Z",
          "manifest_path": "territories/africa/2026.1031.0010/manifest.json",
          "total_bytes": 17707467741,
          "version": "2026.1031.0010"
        }
      ]
    },
    {
      "data_updated": "2026-10-28",
      "display_name": "Albania",
      "id": "albania",
      "latest_version": "2026.1030.2135",
      "versions": [
        {
          "data_timestamp": "2026-10-28T21:21:02Z",
          "manifest_path": "territories/albania/2026.1030.2135/manifest.json",
          "total_bytes": 149236551,
          "version": "2026.1030.2135"
        }
      ]
    }
  ]
}
304Not modified (If-None-Match matched the BLAKE3 ETag)
401No 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 update channel configured on this gateway

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

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 Offline territories

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