Перейти к содержанию
The Consortium

Risks Index APIOperational

GET_v1_places_observations

Indicator observations on the units of one country, with coverage

Request

Попробовать

Available · No credits

https://api.risksindex.com

GET/v1/places/observations

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

req = urllib.request.Request("https://api.risksindex.com/v1/places/observations?jurisdiction=KEN&level=1&limit=2")
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

200 OKapplication/json

{
  "data": [
    {
      "id": "index:jurisdiction/KEN/baringo",
      "level": 1,
      "name": "Baringo",
      "observations": [
        {
          "indicator": null,
          "nis": null,
          "relation": null,
          "measure": "exposure.airports",
          "section": "exposure",
          "unit": "H3 cells",
          "vintage": null,
          "licence": "Public domain",
          "dataset": "naturalearth",
          "source": {}
        }
      ],
      "valuesAt": "/v1/jurisdictions/KEN/adm/baringo"
    }
  ],
  "meta": {
    "authority": "The Global Risks Index (NXS-GRX), GCRI Canada",
    "state": "E",
    "jurisdiction": "KEN",
    "coverage": {
      "status": "partial",
      "records": 47,
      "unitsWithObservations": 1789,
      "unitsInEdition": 1789,
      "byIndicator": [
        {
          "indicator": "index:indicator/IND.DEM.population.total",
          "nis": "nis:IND.DEM.population.total",
          "units": {}
        }
      ],
      "observationsWithoutIndicator": 698,
      "note": "For each NIS-1 indicator, how many units of each ADM level have an observation bound to it. A unit without an observatio…"
    },
    "page": {
      "limit": 2,
      "offset": 0,
      "total": 47,
      "next": "eyJrIjoiODcxMDg1Y2E1NWY5MGUyM2MwZWM3MWNiMTQ3NGE2MGQiLCJmIjoiS0VOfCp8MSIsIm8iOjJ9"
    },
    "provenance": {
      "repository": "nexus-estate/global-risk-index",
      "commit": "df23cbe6e7bbc2b28f1c7eafed95e96389738321",
      "path": "editions/idx-949f583329bfb9c1c6c2/manifest.json",
      "sha256": "e538cc061a1c0737e0e883d8b9d13b0ba3f444b61c55bb75d20718e176c228db",
      "licence": "Per observation: each carries the licence of its source (licence).",
      "snapshotAt": "2026-11-22T01:34:55.802Z"
    },
    "note": "Observations, not classifications, and no value: each unit names valuesAt, the profile route that serves its source valu…",
    "service": "nxs-index-api",
    "version": "0.9.0"
  }
}

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

For one country (jurisdiction, required), its ADM1 to ADM3 units with the observations their jurisdiction profiles hold: each a source measure with its dataset, year (vintage), licence and source record, and the NIS-1 indicator it is bound to where it is. Filter by indicator and level. meta.coverage.byIndicator gives, for every indicator, how many units of each level have it, so coverage is seen honestly; a unit without an observation holds none, never zero. Observations, not classifications, and no value: each unit names valuesAt, the profile route serving its source values. Read from the country's values partition of the edition. Availability: Available.

Parameters

Parameters

  • jurisdictionoptional

    query · string

    ISO 3166-1 alpha-3 code (required), for example KEN. A place identifier of the Index is also accepted: index:country/KEN is the same as KEN; a sub-national unit such as index:jurisdiction/KEN/nairobi is answered with the records of its country, marked inherited in meta.place.

  • indicatoroptional

    query · string

    NIS-1 id: nis:, or index:indicator/

  • leveloptional

    query · string

    Comma-separated ADM levels: 1, 2, 3

  • limitoptional

    query · integer

    Units per page, 1 to 1000 (default 200)

  • cursoroptional

    query · string

    Opaque cursor from the Link rel="next"

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_FILTER, BAD_INDICATOR, 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

  • 409Problem, RFC 9457

    Stale cursor. Codes: STALE_CURSOR

  • 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.