Slaan oor na inhoud
The Consortium

Risks Index APIOperational

grx_country_classify

Classification scoped to the country

Request

Try it

Available · MCP tool grx.country_classify · No credits

https://api.risksindex.com

GET/v1/countries/{iso3}/classify

curl -s "https://api.risksindex.com/v1/countries/KEN/classify?q=drought%20and%20crop%20failure"
const res = await fetch("https://api.risksindex.com/v1/countries/KEN/classify?q=drought%20and%20crop%20failure");
const { data, meta } = await res.json();
import json, urllib.request

req = urllib.request.Request("https://api.risksindex.com/v1/countries/KEN/classify?q=drought%20and%20crop%20failure")
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

200 OKapplication/json

{
  "data": {
    "input": {
      "kind": "text",
      "characters": 24
    },
    "matches": [],
    "method": {
      "id": "rule-v1",
      "deterministic": true,
      "modelCalls": "none",
      "threshold": 0.3,
      "text": "Words are lower-cased, accents removed, plural endings stripped and stop words dropped. A whole label found in the text …",
      "code": "An exact NHS-1 or NIS-1 id scores 1. An external code follows the NIS-1 crosswalk rows to indicators and carries each ro…"
    },
    "replication": {
      "inputDigest": "4b4afe58b5f06166107787e50b31f628081cbac372c21e4148f0c5f05b67938b",
      "resultDigest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
      "methodVersion": "rule-v1",
      "sources": [
        {
          "key": "nhs-1",
          "commit": "2fcbde115623f8b75a12a91177893f80feb7ee1c",
          "sha256": "cf483570ce455cb47a20260a23af594d334a8bed4107a677922093029f3c96c6"
        }
      ],
      "deterministic": true
    },
    "note": "A suggestion to review, never an assignment, a rating or advice. Confidence is a rule score or a draft crosswalk label, …"
  },
  "meta": {
    "authority": "Nexus Standards (authority for NHS-1 and NIS-1); served as an indexing product by The Global Risks Index API, GCRI Canad…",
    "state": "E",
    "provenance": [
      {
        "repository": "nexus-estate/nexus-standards-full",
        "commit": "2fcbde115623f8b75a12a91177893f80feb7ee1c",
        "path": "registry/native/nhs-1.json",
        "sha256": "cf483570ce455cb47a20260a23af594d334a8bed4107a677922093029f3c96c6",
        "licence": "CC-BY-4.0",
        "snapshotAt": "2026-11-22T01:34:55.802Z",
        "carriedVia": {
          "repository": "nexus-estate/nexus-wp",
          "commit": "4a7662f4cc254b5c8ef373764ca8b953775c114e",
          "path": "services/risk-graph/data/snapshot/hazards.json",
          "sha256": "de76b0add311002f6c3f3ff64a59a55ecd85e0aaf3deb2befca60d99fa5c3128"
        }
      }
    ],
    "coverage": {
      "status": "none",
      "records": 0,
      "dimensions": {
        "jurisdiction": {
          "requested": "KEN",
          "status": "applies-everywhere",
          "countrySpecificRecords": 0,
          "note": "NHS-1, NIS-1 and the crosswalks are jurisdiction-independent vocabularies: the same records apply to every place. No rec…"
        }
      }
    },
    "standards": [
      "NHS-1"
    ],
    "method": {
      "id": "rule-v1",
      "card": "/v1/methods/rule-v1",
      "version": "rule-v1"
    },
    "review": {
      "state": "unreviewed"
    },
    "service": "nxs-index-api",
    "version": "0.9.0",
    "subsite": {
      "kind": "country",
      "iso3": "KEN",
      "name": "Kenya",
      "route": "/v1/countries/KEN/classify"
    }
  }
}

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

The route /v1/classify fixed to the country: the same parameters apply and the answer names the scope it was fixed to. Availability: Available.

Parameters

Parameters

  • iso3required

    path · string

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

  • qoptional

    query · string

    Text to classify

  • codeoptional

    query · string

    A code of the code system named by system, e.g. an NHS-1 or NIS-1 id

  • systemoptional

    query · string

    Code system

Answers

Responses

  • 200

    Records with provenance, coverage and links

  • 304

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

  • 400Problem, RFC 9457

    Bad theme. Codes: BAD_THEME, SCOPE_CONFLICT

  • 401

  • 404Problem, RFC 9457

    Not found. Codes: NOT_FOUND

  • 414

  • 429Problem, RFC 9457

    Rate limited. Codes: RATE_LIMITED

  • 500Problem, RFC 9457

    Internal error. Codes: INTERNAL

Get started

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