跳至内容
The Consortium

Risks Index APIOperational

GET_v1_countries_iso3_adm2

The ADM2 scope of a country: its second-level units

Request

试一试

Available · No credits

https://api.risksindex.com

GET/v1/countries/{iso3}/adm2

curl -s "https://api.risksindex.com/v1/countries/KEN/adm2?parent=baringo"
const res = await fetch("https://api.risksindex.com/v1/countries/KEN/adm2?parent=baringo");
const { data, meta } = await res.json();
import json, urllib.request

req = urllib.request.Request("https://api.risksindex.com/v1/countries/KEN/adm2?parent=baringo")
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

200 OKapplication/json

{
  "data": [
    {
      "id": "index:jurisdiction/KEN/baringo/baringo-central",
      "path": "baringo/baringo-central",
      "level": 2,
      "name": "Baringo Central",
      "code": null,
      "parent": "index:jurisdiction/KEN/baringo",
      "href": "/v1/jurisdictions/KEN/adm/baringo/baringo-central"
    },
    {
      "id": "index:jurisdiction/KEN/baringo/baringo-north",
      "path": "baringo/baringo-north",
      "level": 2,
      "name": "Baringo North",
      "code": null,
      "parent": "index:jurisdiction/KEN/baringo",
      "href": "/v1/jurisdictions/KEN/adm/baringo/baringo-north"
    }
  ],
  "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": 6,
      "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.

The ADM2 level of the country as its own scope: the units with an admitted boundary in the current edition, as /v1/jurisdictions/{iso3}/adm?level=2. Availability: Available.

Parameters

Parameters

  • iso3required

    path · string

    Country code, ISO 3166-1 alpha-3, e.g. KEN

  • qoptional

    query · string

    Text filter on name, path, id or ISO 3166-2 code

  • parentoptional

    query · string

    An ADM1 slug: its ADM2 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_PAGE, PLACE_ID_INVALID, PLACE_ID_TOO_MANY

  • 401

  • 404Problem, RFC 9457

    Not found. Codes: NOT_FOUND, PLACE_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

开始使用

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