---
title: "POST /api/rpc/queryCountryRiskEvents"
method: POST
path: "/api/rpc/queryCountryRiskEvents"
tags: ["insurance"]
---

# POST /api/rpc/queryCountryRiskEvents

`POST /api/rpc/queryCountryRiskEvents`

## Request

- Base URL: `https://21risk.com`
- URL: `https://21risk.com/api/rpc/queryCountryRiskEvents`
- Auth: OAuth 2 (client credentials, token URL `/api/v1/oauth/token`)

Read the events behind the 21RISK country risk score, the way the map layers of Insurance Analytics → Country risk show them, counted per 0.5° cell (about 55 km) with its most common place. conflict is UCDP armed conflict and violence against civilians with deaths over the 12 months the score counts; unrest is GDELT news-coded protests, riots, strikes, property destruction and terrorism over the last 28 days. GDELT codes events from the news, so places with more coverage show more events: compare a place with itself over time rather than with other countries. Use countryCode for where in a country the events are, for example near which of its sites, and cell for what happened in one place: its events with their dates, types and, for unrest, the news articles.

## Request body

- object
  - `tenant` unknown, required
  - `layer` 'conflict' | 'unrest', required: conflict: UCDP's armed conflict and violence against civilians, with deaths, over the 12 months up to its latest data, the window the score counts. unrest: GDELT's news-coded protests, riots, strikes, property destruction and terrorism over the last 28 full days.
  - `countryCode` string: Only this country, as an ISO 3166 alpha-2 code such as CO.
  - `cell` string: One cell, by the cell id an answer gives, such as "9:-149": adds its events, newest first, with what each was and, for unrest, the news article it was coded from.

## Response `200`

Successful response

- object
  - `layer` 'conflict' | 'unrest', required
  - `from` string, nullable, required: First day counted, YYYY-MM-DD; null when no data of the layer is loaded.
  - `to` string, nullable, required: Last day counted, YYYY-MM-DD.
  - `categories` string[], required: The categories counted.
  - `cells` object[], required: Events per 0.5° cell, about 55 km, most deaths or events first.
    - `cell` string, required: The cell id, to ask for its events with cell.
    - `latitude` number, required: The average position of the cell's events.
    - `longitude` number, required
    - `countryCode` string, nullable, required: The country most of them are in.
    - `place` string, nullable, required: The place most of them are reported at.
    - `events` integer, required
    - `deaths` integer, nullable, required: UCDP's best estimate of the deaths; null for unrest.
    - `latest` string, required: The day of the newest event, YYYY-MM-DD.
    - `types` object[], required: What the events were, from the publisher's own code, such as Protest or Fighting between armed groups.
      - `type` string, required
      - `events` integer, required
      - `deaths` integer, nullable, required
  - `totals` object, required
    - `events` integer, required
    - `deaths` integer, nullable, required
  - `events` object[]: Only with cell: its events, newest first, at most 50, each article once.
    - `date` string, required: YYYY-MM-DD.
    - `types` string[], required: What it was; GDELT may code one article as several.
    - `place` string, nullable, required
    - `deaths` integer, nullable, required
    - `url` string, nullable, required: The news article GDELT coded it from; null for UCDP.
    - `headline` string, nullable, required: The article's headline as its web address spells it, when it does.
  - `sources` object[], required: Show their attribution wherever the events are shown.
    - `name` string, required
    - `url` string, required
    - `attribution` string, required

---

[API](https://skmtc.dev/21risk/apis/21risk-api.md) · [All operations](https://skmtc.dev/21risk/apis/21risk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/21risk/apis/21risk-api/revisions/273a727dfd49?raw)
