رفتن به محتوا
The Consortium

Risks Index APIOperational

grx_adm_units

The ADM1, ADM2 and ADM3 units of a country (drill-down)

Request

امتحان کنید

Available · MCP tool grx.adm_units · No credits

https://api.risksindex.com

GET/v1/jurisdictions/{jurisdiction}/adm

curl -s "https://api.risksindex.com/v1/jurisdictions/KEN/adm?level=1"
const res = await fetch("https://api.risksindex.com/v1/jurisdictions/KEN/adm?level=1");
const { data, meta } = await res.json();
import json, urllib.request

req = urllib.request.Request("https://api.risksindex.com/v1/jurisdictions/KEN/adm?level=1")
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

200 OKapplication/json

{
  "data": [
    {
      "id": "index:jurisdiction/KEN/baringo",
      "path": "baringo",
      "level": 1,
      "name": "Baringo",
      "code": "KE-01",
      "parent": "index:jurisdiction/KEN",
      "href": "/v1/jurisdictions/KEN/adm/baringo"
    },
    {
      "id": "index:jurisdiction/KEN/bomet",
      "path": "bomet",
      "level": 1,
      "name": "Bomet",
      "code": "KE-02",
      "parent": "index:jurisdiction/KEN",
      "href": "/v1/jurisdictions/KEN/adm/bomet"
    }
  ],
  "meta": {
    "authority": "The Global Risks Index (NXS-GRX), GCRI Canada",
    "state": "E",
    "edition": "idx-949f583329bfb9c1c6c2",
    "publishedAt": "repository",
    "provenance": {
      "repository": "nexus-estate/global-risk-index",
      "commit": "df23cbe6e7bbc2b28f1c7eafed95e96389738321",
      "path": "objects/sha256/9e/9e53c411246cc91e00d6bc685f14aec9bb25f1a1303cf60947158e3658a29b41.json",
      "sha256": "9e53c411246cc91e00d6bc685f14aec9bb25f1a1303cf60947158e3658a29b41",
      "licence": "Per value: each value carries the licence of its source (data.sections.*.values[].licence).",
      "snapshotAt": "repository",
      "edition": "idx-949f583329bfb9c1c6c2",
      "builder": {
        "digest": "d5df5d9155a82f760883f0a9bb7e85046f036bca26c1682e926b0f8a2f3bd882",
        "name": "index-api profiles",
        "version": "1.0.0"
      }
    },
    "composite": {
      "released": false,
      "note": "No Index edition is released: no composite value, score, rank or class."
    },
    "service": "nxs-index-api",
    "version": "0.9.0",
    "page": {
      "limit": 200,
      "offset": 0,
      "total": 47,
      "next": null
    },
    "counts": {
      "adm1": 47,
      "adm2": 290,
      "adm3": 1452,
      "expected": 65,
      "held": 61,
      "values": 6218
    },
    "boundary": {
      "credit": "geoBoundaries (William & Mary geoLab), gbOpen KEN ADM1, source: RCMRD GeoPortal, Africa GeoPortal, licence: Public Domain",
      "gate": {
        "approval": "the network's legal texts#LA-2026-10-12-owner-boundaries-per-country",
        "reason": "\"Public Domain\" is on the C2 allowlist",
        "verdict": "permissive"
      },
      "kind": "geoBoundaries gbOpen",
      "level": 1,
      "licence": "Public Domain",
      "shareAlike": false,
      "source": "RCMRD GeoPortal, Africa GeoPortal",
      "type": "ADM1",
      "url": "https://www.geoboundaries.org/countryDownloads.html#KEN",
      "year": "2020"
    }
  }
}

An answer this API gave, shortened. Values change with the data.

Every subnational unit of the country with an admitted boundary in the current edition: id, path, level, name, ISO 3166-2 code where the boundary source has one, parent and the profile route. ADM3 is held for the countries whose boundary source publishes that level. A level whose boundary licence is refused or not stated is withheld: it is absent here and listed in the country profile (withheld). Availability: Available.

Parameters

Parameters

  • jurisdictionrequired

    path · string

    The country: ISO 3166-1 alpha-3 code. A place identifier of the Index is also accepted, with its slashes percent-encoded (index:country%2FKEN); a sub-national unit is answered with its country, marked inherited in meta.place.

  • qoptional

    query · string

    Text filter: units whose name, path, id or ISO 3166-2 code contains the terms (case-insensitive; all terms must match)

  • leveloptional

    query · string

    1, 2 or 3

  • parentoptional

    query · string

    An ADM1 slug (its ADM2 units only) or an ADM2 path (its ADM3 units only)

  • limitoptional

    query · integer

    Rows per page, 1 to 1000 (default 200)

  • offsetoptional

    query · integer

    Rows to skip (default 0)

Answers

Responses

  • 200

    Records with provenance, coverage and links

  • 304

    Not modified: If-None-Match matched the snapshot digest

  • 400Problem, RFC 9457

    Bad cursor. Codes: BAD_CURSOR, BAD_JURISDICTION, BAD_PAGE, PLACE_ID_INVALID, PLACE_ID_TOO_MANY

  • 401

  • 404Problem, RFC 9457

    Not found. Codes: NOT_FOUND, PLACE_NOT_FOUND, UNIT_NOT_FOUND

  • 410Problem, RFC 9457

    Place withdrawn. Codes: PLACE_WITHDRAWN

  • 414

  • 429Problem, RFC 9457

    Rate limited. Codes: RATE_LIMITED

  • 500Problem, RFC 9457

    Internal error. Codes: INTERNAL

  • 503Problem, RFC 9457

    Profiles unavailable. Codes: PROFILES_UNAVAILABLE

شروع کنید

Get a key with a free account, or choose who the account is for, its seats and any council, and see your workstation first.