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

# POST /api/rpc/queryCountryRiskActivity

`POST /api/rpc/queryCountryRiskActivity`

## Request

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

Read unrest in countries day by day, the way the pulse of Insurance Analytics → Country risk shows it: GDELT news-coded protests, riots, strikes, property destruction and terrorism per day next to the country's usual day over the past year. Use it to see whether a country is flaring up now: a week at three times its usual level or more, with at least 10 events, is high, the same rule the 21RISK score uses. GDELT codes events from the news, so compare a country with itself, not with other countries. The answer says which days GDELT was read: days outside them have no data rather than no events. For deaths in armed conflict use queryCountryRiskEvents with the conflict layer. Get the countries where the organization has sites from queryCountryRisk.

## Request body

- object
  - `tenant` unknown, required
  - `countryCodes` string[], required: The countries, as ISO 3166 alpha-2 codes such as CO. queryCountryRisk lists the countries where the organization has sites.
  - `weeks` integer: How many weeks back from yesterday to read: 13 by default, up to 53.

## Response `200`

Successful response

- object
  - `from` string, required: First day read, YYYY-MM-DD.
  - `to` string, required: Last day read: yesterday.
  - `unrest` object, required
    - `categories` string[], required: The categories counted.
    - `from` string, nullable, required: The first day GDELT was read; earlier days have no unrest data.
    - `to` string, nullable, required: The last day GDELT was read.
    - `usualFromDays` integer, required: How many days each usual day is drawn from: the days GDELT was read in the year before the last 28 days, as the score draws its normal.
    - `usualKnown` boolean, required: Whether GDELT has the 56 days before the last 28 that a usual day needs, as the score does; until then every `usual` is null.
  - `countries` object[], required
    - `countryCode` string, required
    - `usual` number, nullable, required: Unrest events on the country's usual day over the year before the last 28 days, or null while there is too little history to know it. Compare a day with it: news coverage differs between countries, so compare a country with itself.
    - `days` object[], required: The days with unrest, oldest first.
      - `day` string, required
      - `unrest` integer, required: GDELT unrest events that day.

---

[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)
