# Export Credit Risk by Country — ECGC & OECD Grades + Alerts (`rich_minds/country-risk-feed-ai`) Actor

First 25 countries free. Export credit risk by country, pay per qualified country: a country risk list: ECGC/OECD grades, cover, export payment terms by country. Plus what each new list changed. Works with MCP & AI agents. Free demo on any plan.

- **URL**: https://apify.com/rich_minds/country-risk-feed-ai.md
- **Developed by:** [Rich Minds](https://apify.com/rich_minds) (community)
- **Categories:** Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 qualified country (rules only)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Export Credit Risk by Country — ECGC & OECD Grades + Alerts

**India's ECGC and the OECD's country grades, cover and every list's changes — one row each.**

⚡ First **25 countries free** · 💵 **$0.005** per country · 🤖 AI on by default, optional: **$0.0125** all in · ⏱️ 5 countries: **7.6 s** AI off · ≈ 40–110 s AI on

![One row per country — ECGC rating, cover, the change and the terms to propose](https://api.apify.com/v2/key-value-stores/9C5gm7Su8MNkNbvvZ/records/shortlist.svg)

> **Try it in 30 seconds:** 5 real countries, free. Then your countries — a live read on **any Apify plan**; AI with
> your own free Gemini key or on Starter+ — otherwise you get the rules row at $0.005. → [Cost](#-pricing--what-a-run-really-costs) · [Run it daily](#-run-it-daily)

### ⚡ At a glance

| | |
|---|---|
| **What you get** | One row per country: India's ECGC ST rating, cover and MLT rating, the OECD 0–7 grade, the change, terms to propose |
| **Typical run** | All 239 countries, 11 changed on the 14 Oct 2026 list: 17 s (local run, 2026-11-22) |
| **Cost of that run** | $1.07 rules only · ≈ $1.15 with AI on the 11 changed countries — your first 25 free |
| **Free tier** | Your first 25 countries, once per Apify account |
| **Keys / setup** | AI: your own free Gemini key on any plan (2–5 AI verdicts of 5, ≈ 40–110 s); Apify's model access on Starter+ (not yet measured) |
| **Which plan** | Any plan: demo, live read, your rows ([list template](https://api.apify.com/v2/key-value-stores/9C5gm7Su8MNkNbvvZ/records/list-template.json)), chat digest · e-mail digest: a plan that runs Store Actors |
| **Works with** | Schedules, webhooks, Google Sheets, Slack, Teams, Make / n8n / Zapier, MCP & AI agents |

### 🎯 What this Actor does: ECGC country risk classification

The ECGC country risk classification grades countries A1 … D with a cover category (bilingual PDFs); the OECD
grades them 0 … 7. It reads both:

- **Every country as one row** — 239 on ECGC's list of 14 Oct 2026, with the OECD grade.
- **What changed** — `upgrade`, `downgrade`, `cover_restricted`, `cover_eased` or `new`, with before / after.
- **Where the two disagree** — 62 countries 2+ grades apart.
- **Terms to propose** — advance, LC, DP, DA or open account within a buyer limit.

### 🚀 How to use it

1. **Click Try it** — the free demo on 5 real countries (Afghanistan, Pakistan, Egypt …).
2. **Pick a ready search or your countries** — they replace the sample.
3. **Press Start** — open "Shortlist" or "Changes since the previous edition"; each row links the PDF page.
4. **Schedule it daily** with **Changes only** and a chat link in **Send alerts to** — an empty day costs nothing.

![The countries ECGC's list of 14 Oct 2026 moved — Egypt and Sri Lanka back to Open Cover](https://api.apify.com/v2/key-value-stores/9C5gm7Su8MNkNbvvZ/records/changes.svg)

📚 **Learn more:** [Tutorial — check ECGC cover for a country before you quote](https://api.apify.com/v2/key-value-stores/9C5gm7Su8MNkNbvvZ/records/tutorial.html)

### 🆚 Why this instead of running apify/website-content-crawler on ECGC's PDFs yourself?

| | ECGC circulars (free) | Credit insurer ratings (free) | `ravch/eudr-screener` | **This Actor** |
|---|---|---|---|---|
| **Your time per 100 countries** | ≈ 7 h (≈ 4 min each, on 5 sample countries) | ≈ 3 h | — another list | ≈ 10 min (estimate) |
| **What you get** | ECGC cover | a grade per country | EUDR deforestation risk | ECGC cover + OECD grade |
| **Change alert, API** | by hand | no | API, no alert | `change`, before / after, API |
| **100 countries, all in (list price, no free tier)** | $0 + 7 h | $0 + 3 h | $0.50, no credit grade | $0.50 rules only · $1.25 with the AI note |

The circulars win for one country now and then; Credendo, Coface, Allianz Trade: a grade, no alert. A crawler on the
PDFs: ≈ $0.03 + 7 h of sorting.

#### vs other country risk tools on Apify

`atlasdata/eudr-scope-risk-checker-reliable` (EUDR), `yck69/sanctions-screening` (names) and
`travelcode/travel-risk-checker` (travel) check other lists — none reads export credit grades.

### 💵 Pricing — what a run really costs

| Event | When it is charged | Price |
|---|---|---|
| `free-tier` | your first 25 countries on this Actor | **$0.00** |
| `qualified-country-basic` | a country with rules only (AI off, or unchanged in a big AI run) | **$0.005** |
| `qualified-country-ai` | an AI-assessed country | **$0.01** |
| `edition-delivered` | a scheduled Changes-only run that brings a new ECGC list with ≥ 1 change | **$0.05** |

**Never charged:** countries outside your filters or unchanged since your last run, the demo, a run with nothing new.

**How that compares** — $0.005 a country here, the median of 5 priced country risk Actors; by hand ≈ 4 min a country.

**Worked example** — first run, all countries: AI off: 25 free + 214 × $0.005 = **$1.07**. AI on: 11 changed countries
AI-assessed (11 × $0.0125 with tokens) + 228 at $0.005 − 25 free ≈ **$1.15**. Each later list on a daily Changes-only
schedule: 11 × $0.005 + $0.05 = **$0.105**.

**AI tier, all in:** ≈ $0.0125 per AI country = $0.01 + ≈ $0.0025 tokens (211 output tokens, measured 2026-11-23 on
google:gemini-3.5-flash-lite with an own Gemini key, priced at anthropic/claude-haiku-4.5 rates).
**At volume:** a bank's trade-finance desk on Changes only: ≈ 55 moves a year over ≈ 5 lists, ≈ 4 analyst minutes
saved each, on the day the list lands.

### 🤖 What the AI tier adds

Egypt (ECGC list of 14 Oct vs 1 Oct 2026), AI **off**:

```json
{"name": "Egypt", "stRating": "B2", "coverCategory": "Open Cover", "change": "cover_eased", "ruleScore": 50,
 "generatedText": "Open Cover. ST B2 (Moderate Risk), MLT C1 on ECGC's list of 14 Oct 2026 — changed since 1 Oct 2026: ST C1 → B2; cover RCC-I → Open Cover.", "summary": null,
 "assessedBy": "rules"}
```

AI **on** (own Gemini key, the sample's AI run of 2026-11-22):

```json
{"name": "Egypt", "fitScore": 50, "tier": "warm",
 "generatedText": "Open Cover with B2 rating: apply for an ECGC buyer limit before shipping on credit.",
 "paymentTerms": "Propose payment under an ECGC buyer limit or a Letter of Credit, reflecting the B2 Moderate Risk rating.",
 "aiModel": "google:gemini-3.5-flash-lite"}
```

With 26+ countries it writes for the moved ones. Free key: [aistudio.google.com/apikey](https://aistudio.google.com/apikey).

### ⚙️ Input

The mode that runs = `sourceMode`, except `{}` = the free demo; naming countries runs the live read.

| Field | Default | What it does |
|---|---|---|
| `countries` | — | ISO-2 codes or names; `["ALL"]` = every country |
| `changesOnly` | `false` | Only countries that changed since your last run of this search |
| `minRating` | — (every rating) | Keep this ST rating or riskier: `C1` keeps C1, C2, D |
| `exporterCountry` | `""` | Your country: its export credit agency is named in terms and next steps |
| `maxQualified` | `250` | Hard cap on rows and spend |
| `enableAi` | `true` | The exporter note, terms and what a change means |
| `notifyEmail` / `sendAlertsTo` | — | E-mail / Slack · Teams · Telegram digest |

More (`goalDescription`, `minScore`, `targetFlags`, `suppressionList`, `includeHistory`, `historyDatasetName`): the **Input** tab and the [API reference](https://api.apify.com/v2/key-value-stores/9C5gm7Su8MNkNbvvZ/records/api-reference.md).

#### Changes only — track country risk changes, never skip a move

Compares with the list your last run read, so two lists between runs never hide a move.

#### Where ECGC and the OECD disagree

`ecgc_oecd_differ` flags 62 countries 2+ grades apart (lists of 14 / 16 Oct 2026); widest, 4 grades: Bahrain, Cambodia, Turkmenistan.
Ready search: `ecgc-oecd-disagree`.

#### Export payment terms by country

`paymentTerms`: the terms to propose from cover + ST rating (mapping in the FAQ).

#### Minimum rating — a country risk list of your riskiest markets

`minRating: "C1"` keeps the 65 countries rated C1, C2 or D.

### 📤 Output

One row per country (live run 2026-11-23, rules only; all fields: [API reference](https://api.apify.com/v2/key-value-stores/9C5gm7Su8MNkNbvvZ/records/api-reference.md)):

```json
{"name": "Egypt", "country": "EG", "stRating": "B2", "coverCategory": "Open Cover", "mltRating": "C1",
 "oecdRating": 6, "change": "cover_eased", "score": 50, "tier": "warm",
 "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=3&search=%22Egypt%22",
 "dedupeKey": "ecgc:EG:B2|OpenCover|C1"}
```

Output fields: the above plus `stRatingLabel`, `mltRatingLabel`, `coverCategoryLabel`, `ecgcRatingDate`,
`mltRatingDate`, `previousStRating`, `previousMltRating`, `changedOn`, `history`, `ecgcNote`, `stListUrl`, `mltListUrl`,
`feedUrl`, `previousOecdRating`, `oecdChange`, `oecdRatingDate`, `oecdListUrl`, `oecdNote`, `flags`, `targetFlagsMatched`, `scoreReasons`,
`recommendedNextStep`, `nextStepActorUrl`, `chargedEvent`, `billedAs`, `itemId`, `source`,
`sourceRun`, `sample`, `previousCoverCategory`, `changeDetail`, `previousEdition`, `ruleScore`, `paymentTerms`, `changeNote`, `fetchedAt`; `rowId` and `scrapedAt` are deprecated aliases (removed in 0.3.0, 2027-01-31). AI fields are `null` on rule-scored rows.

**Ids:** `dedupeKey` (and `itemId`, its hash) = one per ECGC state — the **Upsert key**; `country` is stable. Sort by
`score`; `fitScore` is the AI part — trend on `ruleScore`.

Views: **Shortlist**, **Changes since the previous edition**, **Score breakdown**, **Export**; records `DIGEST`,
`REPORT`, `OUTPUT` (`RUN_SUMMARY`: deprecated alias, removed in 0.3.0, 2027-01-31).

⭐ **Found it useful? A review on the Store helps others find it.**

### 🔁 Run it daily

#### Your export credit country risk monitor

1. A chat link in **Send alerts to** (any plan) or `notifyEmail`, tick **Changes only**, open
   `OUTPUT.scheduleTaskUrl` → **Schedule** daily.
2. Rows to a sheet: the [tracker sheet](https://api.apify.com/v2/key-value-stores/9C5gm7Su8MNkNbvvZ/records/tracker.csv).

ECGC re-issues its lists 4–6 times a year: a day without one costs nothing; 14 Oct 2026 cost $0.105 (11 moves).

#### 🎯 Try it for your niche

<details><summary>6 ready searches in <b>Start from a ready search</b></summary>

| Preset | Countries (lists of 14 Oct 2026) |
|---|---|
| `all-countries` | every country → 239 |
| `changes-only` | what the newest list moved → 11 |
| `restricted-cover` | RCC-I, RCC-II, Off Cover → 52 |
| `gulf-markets` | AE, SA, KW, QA, OM, BH → 6 |
| `high-risk-markets` | ST C1, C2 or D → 65 |
| `ecgc-oecd-disagree` | ECGC and the OECD 2+ grades apart → 62 |

</details>

### 🔌 Integrations, automation and API

#### Run outcomes — what your integration sees

<details><summary>Every outcome: run status, <code>OUTPUT</code>, charged?, what to do</summary>

| Outcome | Run status | `OUTPUT` | Charged? | What to do |
|---|---|---|---|---|
| Free demo | SUCCEEDED | `mode: demo` | no | pick countries |
| Success | SUCCEEDED | `rows`, `changed` | per country | — |
| Nothing new | SUCCEEDED | `qualified: 0` | no | wait for the next list |
| Invalid input | FAILED | — | no | fix the named field |
| Source failed | FAILED | `ok: false`, `outcome: source_failed` | no | retry in an hour |
| Plan refused (dataset mode) | SUCCEEDED¹ | `outcome: source_refused` | no | Console: the free sample scored on your brief; schedule / API: channels alerted |
| Source partial (MLT / OECD unread) | SUCCEEDED | `refused[].reason: failed` | per country | alert on it |
| AI unavailable | SUCCEEDED | `aiError` | basic | your own key |
| Run time limit reached during the AI pass | SUCCEEDED, never TIMED-OUT | `fallbackReasons`: `run budget` | rule rows at basic | raise the timeout or lower `maxQualified` |

¹ FAILED with `failOnSourceError`.

</details>

- **Webhook** — `webhookUrl` POSTs `{"event": "country.qualified", "country": {…}, "runId": …}`, or a batch body
  `{"event": "countries.qualified", "countries": […], "runId": …}`; failed rows (`OUTPUT.webhook.failedKeys`) are
  re-sent first next run; `webhookSecret` signs each POST (`X-Signature`).
- **Which delivery field wins:** every URL posted once; a per-service field wins for its service; `webhookUrl` gets
  rows as JSON, chat and e-mail the digest.
- **Google Sheets, Make scenario, n8n, Zapier** — their Apify app runs it on a schedule; upsert rows on `dedupeKey`.
- **Which call runs what:** `OUTPUT.mode` — `demo` (`{}`), `live`, `list`, `dataset`.

#### Country risk rating API — Python and JavaScript

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("rich_minds/country-risk-feed-ai").call(
    run_input={
        # free first call: {} or {"sourceMode": "list", "itemsList": [{"name": "Kenya", "stRating": "B2"}]}
        # over the API the mode you send runs (autoSwitchToLive is Console-only)
        "sourceMode": "live", "countries": ["AE", "BD", "KE", "LK"], "changesOnly": False,
        "exporterCountry": "IN", "goalDescription": "Spices on 60-day DA to new buyers", "maxQualified": 250,
        "dedupeAcrossRuns": True,  # a re-run skips countries already delivered
        "failOnSourceError": True,  # an unreadable list ends FAILED
        # "maxDiscoveryChargeUsd": 0.5,  # Store-Actor fallback cap — none runs here
    },
    timeout_secs=3600,  # 4 AI countries × ≈ 46 s (slowest own key) + the read; the AI stops at the run budget
    # build="0.1.7",  # pin the build your pipeline was tested with
)
if run["status"] != "SUCCEEDED":
    raise RuntimeError(run["status"], run.get("statusMessage"))
rec = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("OUTPUT")
out = rec["value"] if rec else {}
if not out.get("ok", True):
    raise RuntimeError(out.get("outcome"), out.get("sourceError"))
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item["score"], item["tier"], item["stRating"], item["oecdRating"])
```

<details><summary>The same call in JavaScript</summary>

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('rich_minds/country-risk-feed-ai').call({
    sourceMode: 'live', countries: ['AE', 'BD', 'KE', 'LK'], exporterCountry: 'IN', maxQualified: 250,
    dedupeAcrossRuns: true, failOnSourceError: true,
    // maxDiscoveryChargeUsd: 0.5, // Store-Actor fallback cap — none runs here
}, { timeout: 3600 /* , build: '0.1.7' */ });
if (run.status !== 'SUCCEEDED') throw new Error(`${run.status}: ${run.statusMessage}`);
const rec = await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('OUTPUT');
const out = rec ? rec.value : {};
if (out.ok === false) throw new Error(`${out.outcome}: ${out.sourceError}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.url, i.score, i.tier, i.stRating, i.oecdRating]));
```

</details>

**MCP:** `{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=rich_minds/country-risk-feed-ai"}}}` — ask
*"Which countries did ECGC's newest list restrict, and where does the OECD disagree?"* **Minimal agent input:**

```json
{"sourceMode": "live", "countries": ["ALL"], "changesOnly": true, "maxQualified": 50, "dedupeAcrossRuns": false}
```

#### List-mode rows — what a pasted record needs

Rows go into `itemsList`; the free filters apply; aliases in the API reference.

| Field | Needed? | Enables |
|---|---|---|
| `name` | required | the country (or `country`, ISO-2) |
| `stRating` | required | score, flags, terms |
| `coverCategory` | optional | cover flags, terms |
| `oecdRating` | optional | OECD flags |
| `previousStRating` | optional | the change view |

### 👥 Who is it for?

| You are… | You run it to… | Start with |
|---|---|---|
| An exporter (India, UK, Gulf …) | see cover, OECD grade and terms before you quote | your countries |
| A bank's trade-finance desk | watch what ECGC restricts or eases | `changes-only`, daily |
| A credit insurance broker | list the RCC and Off Cover countries | `restricted-cover` |

### 🧠 How the AI works

`anthropic/claude-haiku-4.5` (Apify) or your key's model reads one row and your brief; an invented figure or a failed
call keeps the rule text.

### 🔒 Data, compliance and limits

Official public data: ECGC's list PDFs (read ≥ 2 s apart) and the OECD's PDF. No personal data.

### ❓ FAQ

**How long does a run take?**

| Mode | Measured time | `timeoutSecs` |
|---|---|---|
| Free demo | 2 s | 120 |
| Live read, all countries, rules only | 17 s locally (2026-11-22); 5 countries 7.6 s on Apify (2026-11-23) | 300 |
| AI, own free Gemini key (google:gemini-3.5-flash-lite) | measured ≈ 0.8–46 s per country, ≈ 1–75 a minute: 0.8 s (5 of 5, 2026-11-24), 46 s rate-limited (2026-11-23) | 2480 per 50 |
| AI, free own key, rate-limited | worst case ≈ 1 min of waiting per run, the rest rule-scored; the run budget caps the AI phase | 900 |
| AI via Apify's model access (anthropic/claude-haiku-4.5) | not measured on the platform yet | 1500 |

**Why not the free Credendo / Coface ratings?** For one country they win — but no ECGC cover, no alert, no API.

**Which export payment terms by country does it propose?** Advance only for Off Cover; advance or a confirmed LC
for RCC-II; a confirmed LC for RCC-I; on Open Cover LC / DP for C1–D, DP / DA for B1–B2, open account for A1 / A2 —
credit always within a buyer limit.

**What are the ECGC restricted cover countries?** RCC-I (29 on 14 Oct 2026): revolving buyer limits; RCC-II (22):
approval case by case; Pakistan: Off Cover.

**How do I track country risk changes when ECGC publishes a new list?** Schedule it daily with Changes only and a chat link: you
hear on the day, for $0.05 plus $0.005 a moved country.

**I export from the UK, the US or the Gulf — does it help?** Yes: the OECD grade is yours too, ECGC's a second
opinion; terms name your agency.

**Do rule-scored countries use my free ones?** Yes; while the AI is unavailable 5 are kept for your first AI verdicts.

### 🧩 More Actors from the same developer

- **[DGFT Notification Watch](https://apify.com/rich_minds/trade-regulation-watch-ai)** — Watch India's export bans on your HS codes too.
- **[UN Comtrade Trade Data](https://apify.com/rich_minds/export-market-finder-ai)** — A market went to RCC? Find the next one that buys.
- **[APEDA Registered Exporters & MPEDA](https://apify.com/rich_minds/india-exporter-registries-ai)** — Licensed exporters to partner with in safe markets.
- **[India Export Data by HS Code](https://apify.com/rich_minds/india-export-stats-ai)** — What India already ships to a country.
- **[Top Importers List Finder](https://apify.com/rich_minds/importer-list-extractor-ai)** — The importers to call once a country is safe.
- **[WTO ePing Alerts](https://apify.com/rich_minds/destination-rule-watch-ai)** — next to a market's credit grade, the new import rules it notifies to the WTO for your HS codes.

### 🆘 Support

Open an issue on the Actor's page — buyer requests ship first.

### 📝 Changelog

- **0.1.7** (2026-11-24) — More Actors — link the newest related Actors.
- **0.1.6** (2026-11-24) — Store listing and README wording updated so the Actor is easier to find and understand.
- **0.1.5** — "AI-assessed N of M" status; `null` AI fields on rule rows; ECGC-vs-OECD ready search.
- **0.1.4** (2026-11-23) — the OECD grade; Changes only from your last run; rows link the PDF page; $0.05 per new list.
- Deprecated in 0.1.4: `rowId`, `scrapedAt` and `RUN_SUMMARY` — removed in 0.3.0 (2027-01-31).
- **0.1.1** (2026-11-22) — first release.

# Actor input Schema

## `preset` (type: `string`):

Pick a ready search and press Start: it replaces the sample below and reads ECGC's newest country risk lists live (any Apify plan, no source Actor runs); a value you typed yourself always wins. The status names what ran. <b>Custom</b> = fill the fields yourself.

## `countries` (type: `array`):

The countries you sell to, or <b>All countries</b> (≈ 240). Picking any runs the live read of ECGC's newest lists — any Apify plan, no Store Actor; the demo below does not read ECGC. API: ISO-2 codes, English names or <code>\["ALL"]</code>. Affects what you pay: one charge per delivered country.

## `changesOnly` (type: `boolean`):

Deliver only the countries whose ECGC rating or cover changed <b>since your last run of this search</b> — every list ECGC published in between counts, so two lists between runs never hide a move. The first run compares the newest two lists. Off = every country you picked. Unchanged countries are skipped free.

## `goalDescription` (type: `string`):

Optional, for the AI: e.g. 'spices on 60-day DA to new buyers'. The AI weighs each country against it and writes the payment terms to propose. Leave empty for a general exporter view.

## `notifyEmail` (type: `string`):

The digest of every run with new countries — schedule it daily with Changes only: an empty day costs nothing, a new ECGC list reaches you within 24 h. Sent by Apify's send-mail Actor (a plan that runs Store Actors); on any plan put a Slack / Teams link in Send alerts to. Never for the demo.

## `minScore` (type: `integer`):

The field that decides what you pay: countries scoring below this are discarded and <b>not charged</b>. The score is how much attention a country needs before you quote credit terms (A1 Open Cover unchanged = 10; D under restricted cover = 90). 0 = every country you picked.

## `maxQualified` (type: `integer`):

Hard cap on results — and the ceiling of what this Actor charges: at most this many countries × $0.01 with AI on (× $0.005 with AI off). Affects what you pay: the default 250 covers every country on ECGC's lists — worst case $3.75 with AI on, $1.25 off. Riskiest countries come first.

## `enableAi` (type: `boolean`):

A one-line exporter note, the payment terms to propose and what a change means for your open quotes, per country, from the ECGC and OECD row only. <b>On = $0.01 per AI-assessed country + AI tokens; off = $0.005</b> (rule-based note, terms and flags). With 26 or more countries the AI writes for the countries a list moved; the unchanged rest gets the rule note at $0.005. AI: your own free Gemini key on any plan (2–5 AI verdicts of 5 per run); Apify's model access on Starter and up (not measured on the platform yet). Otherwise you get the rules row at $0.005.

## `exporterCountry` (type: `string`):

Your own country: its export credit agency is named in the payment terms, the next step and the AI note (ECGC for India, UK Export Finance for the UK …). Empty = neutral wording for an exporter from anywhere. ECGC's cover categories and the OECD grade are the same for everyone.

## `minRating` (type: `string`):

Keep only countries whose short-term rating is this or riskier — C1 keeps C1, C2 and D. Empty = every rating. Countries below it are skipped free.

## `includeHistory` (type: `boolean`):

Adds each country's ratings in ECGC's earlier editions (up to the last 4 on the circular page) to <code>history</code> — reads up to 6 more PDFs, ≈ 15 s longer. No extra charge.

## `targetFlags` (type: `array`):

Only deliver countries with at least one of these flags, and rank those with more of them higher. Empty = everything. An API call passes the flag names from the README's flag table, e.g. <code>restricted_cover</code> (<code>restrictedCover</code> works too); an unknown name stops the run at once with the list of valid ones.

## `suppressionList` (type: `array`):

Country names or ISO-2 codes to never output. Skipped before any processing and never charged.

## `allowList` (type: `array`):

API only — hidden on the form. Country names or ISO-2 codes no free filter may drop (countries, rating floor, changes only). They still need to pass <code>minScore</code>.

## `llmProvider` (type: `string`):

<b>Apify (no keys)</b> — the AI runs through Apify's built-in OpenRouter proxy on plans with model access (Starter and up); tokens are billed to your Apify account. <b>My own key</b> — your own Gemini key (verified on a platform run; OpenAI / Anthropic keys work too). Measured with a free google:gemini-3.5-flash-lite key: ≈ 0.8–46 s per country (0.8 s on 2026-11-24 and 4.7 s on 2026-11-23 with 5 of 5 assessed, 46 s on 2026-11-23 when the key rate-limited and was overloaded: 2 of 5 assessed in 111 s) — size a 50-country run from the slowest, ≈ 2480 s. A free-tier key may stop at its rate limit: expect 2–5 AI verdicts of 5, and 1–3 AI checks per bigger run once it does (the 3 borderline countries retried one by one), the rest keep their rule score; a paid key assesses every country.

## `llmModel` (type: `string`):

Leave empty for the default — <code>anthropic/claude-haiku-4.5</code> through Apify, <code>google:gemini-3.5-flash-lite</code> with your own key. Apify mode takes an OpenRouter slug such as <code>openai/gpt-4.1-mini</code>; own-key mode takes <code>provider:model</code>, e.g. <code>groq:openai/gpt-oss-120b</code>.

## `llmApiKey` (type: `string`):

Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged.

## `aiCandidateMultiplier` (type: `integer`):

API only — hidden on the form. The AI pass takes the best rule-scored countries first, up to this many × <b>Max countries to output</b>; with 26 or more countries only those a list moved (see <code>aiScope</code>). Higher = more thorough, slower, more tokens.

## `aiScope` (type: `string`):

API only — hidden on the form. <code>changed</code> (default): with 26 or more countries the AI writes for the countries a list moved, the rest keep the rule note at the basic price; up to 25 countries it writes for all. <code>all</code>: every country — ≈ 10 × the AI time and tokens on an All-countries run.

## `sendAlertsTo` (type: `string`):

Paste one or more URLs, one per line — the service is detected from the address: a Slack or Discord channel webhook, a Teams Workflows or Google Chat space webhook, your Telegram bot's send link (<code>https://api.telegram.org/bot\<token>/sendMessage?chat_id=@yourchannel</code>) or any other https URL (Zapier, Make, n8n, your CRM), which gets the countries as JSON. After every run with at least one new country, the digest (how many are new, the top 10 with links) is posted there. Never sent for the free demo. Headers, batching and signing: <i>Delivery details (advanced)</i>.

## `dedupeAcrossRuns` (type: `boolean`):

API only — hidden on the form. On: a weekly run delivers a country again only when a new ECGC edition changes its ST rating, cover category or MLT rating — a change is never missed, an unchanged country is never charged twice. The memory (country + its ECGC state) lives in a named key-value store on your account.

## `dedupeTtlDays` (type: `integer`):

API only — hidden on the form. 0 = an unchanged country is never delivered or charged again. A number of days re-delivers the full list that often — e.g. 30 for a monthly snapshot of every country, charged again as new rows.

## `historyDatasetName` (type: `string`):

Optional. Type a name (e.g. <code>country-risk-feed-ai-seen-log</code>) and every run appends its new countries with the date to that named dataset on your account — one list across months to connect to Google Sheets or your BI tool once. Empty = off. Costs nothing extra.

## `sourceMode` (type: `string`):

<code>{}</code> over the API runs the free demo — nothing charged; naming countries runs the live read. Rule: no countries and no itemsList → the demo (although the default here is <b>live</b>); your own rows → <b>list</b> / <b>dataset</b>; OUTPUT.mode returns the one that ran. <b>live</b> reads ECGC's circular page, its country risk list PDFs and the OECD's list itself (any plan); <b>dataset</b> / <b>list</b> score country rows you already have. The chosen mode with your own records always runs; only the untouched sample + countries you picked switch to the live read.

## `autoSwitchToLive` (type: `boolean`):

API only — hidden on the form. On (default, Console runs only): search terms typed next to the untouched sample records start the live search (spend-capped; <code>OUTPUT.switchedToLive</code> names them). Off: the mode you send is the mode that runs — the sample stays the free demo and the status names the terms it did not search. Over the API the mode you send is always the mode that runs.

## `failOnSourceError` (type: `boolean`):

API only — hidden on the form. Off (default): a run whose source answered nothing ends with <code>OUTPUT.ok: false</code> and the reason. On: the same run ends FAILED, so a schedule's failed-run alert fires.

## `datasetId` (type: `string`):

Only for <b>dataset</b> mode. Pick the dataset so the Actor is granted read access to it.

## `itemsList` (type: `array`):

Only for <b>list</b> mode. JSON array of country rows. Required on every row: <code>name</code> (or <code>country</code> as ISO-2) and <code>stRating</code>; optional: <code>coverCategory</code>, <code>mltRating</code>, the <code>previous…</code> fields and any field the README's <i>List-mode rows</i> table names. The prefilled rows are the free demo (real ECGC ratings of 14 Oct 2026, marked <code>sample</code>).

## `maxDiscoveryChargeUsd` (type: `number`):

API only — hidden on the form. Only when you turn the built-in reader off: the cap on what the fallback Store Actor may charge your account — $0.50 for an API call that leaves it out.

## `maxToProcess` (type: `integer`):

API only — hidden on the form. Upper bound on how many countries are scored in one run. Default = 3 × max countries.

## `webhookUrl` (type: `string`):

Qualified countries are POSTed here as JSON (Zapier, Make, n8n, your CRM). For Google Sheets / Slack you can also use Apify's built-in Integrations tab. Stored encrypted — Zapier / Make hook URLs carry their secret in the path.

## `webhookHeaders` (type: `object`):

API only — hidden on the form. Extra HTTP headers for the webhook, e.g. <code>{"Authorization": "Bearer …"}</code>. Stored encrypted by Apify, never logged.

## `webhookBatchSize` (type: `integer`):

API only — hidden on the form. 1 = one POST per country the moment it is ready. Higher = one POST per N countries.

## `webhookSecret` (type: `string`):

API only — hidden on the form. Any random string. Every webhook POST then carries <code>X-Signature: sha256=\<HMAC-SHA256 of the raw body with this secret></code>, so your endpoint can verify it came from this Actor. Stored encrypted by Apify, never logged.

## `dedupeStoreName` (type: `string`):

API only — hidden on the form. Key-value store used for cross-run memory. Left at the default, the memory is kept per search (source and filters); running it for several clients on one account, type one name per client.

## `discoveryTimeoutSecs` (type: `integer`):

API only — hidden on the form. How long the source Store Actor may run before its partial results are used — never more than 60 % of the run's time left, so the AI, the charges and the digest keep the rest. Raise it (and the run timeout) when the status says the source stopped early.

## `slackWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Slack incoming-webhook URL for the digest.

## `discordWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Discord channel webhook URL for the digest.

## `teamsWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Teams Workflows webhook URL for the digest.

## `googleChatWebhookUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Google Chat space webhook URL for the digest.

## `telegramUrl` (type: `string`):

API only — hidden on the form, where <code>sendAlertsTo</code> takes it. The bot's sendMessage link with its chat_id.

## Actor input object example

```json
{
  "preset": "custom",
  "countries": [],
  "changesOnly": false,
  "minScore": 0,
  "maxQualified": 250,
  "enableAi": true,
  "exporterCountry": "",
  "includeHistory": false,
  "llmProvider": "apify",
  "aiCandidateMultiplier": 2,
  "aiScope": "changed",
  "dedupeAcrossRuns": true,
  "dedupeTtlDays": 0,
  "historyDatasetName": "",
  "sourceMode": "list",
  "autoSwitchToLive": true,
  "failOnSourceError": false,
  "itemsList": [
    {
      "name": "Afghanistan",
      "country": "AF",
      "stRating": "D",
      "coverCategory": "RCC-II",
      "mltRating": "D",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "D",
      "previousCoverCategory": "RCC-II",
      "previousMltRating": "D",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=11&search=%22Afghanistan%22",
      "oecdRating": 7,
      "previousOecdRating": 7,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Angola",
      "country": "AO",
      "stRating": "B2",
      "coverCategory": "Open Cover",
      "mltRating": "C1",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "B2",
      "previousCoverCategory": "Open Cover",
      "previousMltRating": "C1",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Angola%22",
      "oecdRating": 6,
      "previousOecdRating": 6,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Bolivia",
      "country": "BO",
      "stRating": "C1",
      "coverCategory": "Open Cover",
      "mltRating": "C2",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "C1",
      "previousCoverCategory": "Open Cover",
      "previousMltRating": "C2",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Bolivia%22",
      "oecdRating": 7,
      "previousOecdRating": 7,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Pakistan",
      "country": "PK",
      "stRating": "C2",
      "coverCategory": "Off Cover",
      "mltRating": "D",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "C2",
      "previousCoverCategory": "Off Cover",
      "previousMltRating": "D",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "ecgcNote": "ST cover stands withdrawn effective from 12.05.2025",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=12&search=%22Pakistan%22",
      "oecdRating": 7,
      "previousOecdRating": 7,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Egypt",
      "country": "EG",
      "stRating": "B2",
      "coverCategory": "Open Cover",
      "mltRating": "C1",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "C1",
      "previousCoverCategory": "RCC-I",
      "previousMltRating": "C1",
      "previousEdition": "2026-10-01",
      "change": "cover_eased",
      "changeDetail": "ST C1 → B2; cover RCC-I → Open Cover",
      "changedOn": "2026-10-14",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=3&search=%22Egypt%22",
      "oecdRating": 6,
      "previousOecdRating": 6,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    }
  ],
  "maxDiscoveryChargeUsd": 0.5,
  "webhookBatchSize": 1,
  "dedupeStoreName": "country-risk-feed-ai-seen",
  "discoveryTimeoutSecs": 3600
}
```

# Actor output Schema

## `qualified` (type: `string`):

All qualified countries as JSON, best-scoring first.

## `sheet` (type: `string`):

The same countries as a spreadsheet.

## `runSummary` (type: `string`):

JSON record with the funnel (loaded -> filtered -> AI-assessed -> qualified), per-reason skip counts, charged events by type, free-tier countries used and remaining, whether a budget limit was reached, webhook delivery counts and the dedupe store size.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "countries": [],
    "sourceMode": "list",
    "itemsList": [
        {
            "name": "Afghanistan",
            "country": "AF",
            "stRating": "D",
            "coverCategory": "RCC-II",
            "mltRating": "D",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "D",
            "previousCoverCategory": "RCC-II",
            "previousMltRating": "D",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=11&search=%22Afghanistan%22",
            "oecdRating": 7,
            "previousOecdRating": 7,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": true
        },
        {
            "name": "Angola",
            "country": "AO",
            "stRating": "B2",
            "coverCategory": "Open Cover",
            "mltRating": "C1",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "B2",
            "previousCoverCategory": "Open Cover",
            "previousMltRating": "C1",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Angola%22",
            "oecdRating": 6,
            "previousOecdRating": 6,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": true
        },
        {
            "name": "Bolivia",
            "country": "BO",
            "stRating": "C1",
            "coverCategory": "Open Cover",
            "mltRating": "C2",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "C1",
            "previousCoverCategory": "Open Cover",
            "previousMltRating": "C2",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Bolivia%22",
            "oecdRating": 7,
            "previousOecdRating": 7,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": true
        },
        {
            "name": "Pakistan",
            "country": "PK",
            "stRating": "C2",
            "coverCategory": "Off Cover",
            "mltRating": "D",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "C2",
            "previousCoverCategory": "Off Cover",
            "previousMltRating": "D",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "ecgcNote": "ST cover stands withdrawn effective from 12.05.2025",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=12&search=%22Pakistan%22",
            "oecdRating": 7,
            "previousOecdRating": 7,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": true
        },
        {
            "name": "Egypt",
            "country": "EG",
            "stRating": "B2",
            "coverCategory": "Open Cover",
            "mltRating": "C1",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "C1",
            "previousCoverCategory": "RCC-I",
            "previousMltRating": "C1",
            "previousEdition": "2026-10-01",
            "change": "cover_eased",
            "changeDetail": "ST C1 → B2; cover RCC-I → Open Cover",
            "changedOn": "2026-10-14",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=3&search=%22Egypt%22",
            "oecdRating": 6,
            "previousOecdRating": 6,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": true
        }
    ],
    "maxDiscoveryChargeUsd": 0.5
};

// Run the Actor and wait for it to finish
const run = await client.actor("rich_minds/country-risk-feed-ai").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "countries": [],
    "sourceMode": "list",
    "itemsList": [
        {
            "name": "Afghanistan",
            "country": "AF",
            "stRating": "D",
            "coverCategory": "RCC-II",
            "mltRating": "D",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "D",
            "previousCoverCategory": "RCC-II",
            "previousMltRating": "D",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=11&search=%22Afghanistan%22",
            "oecdRating": 7,
            "previousOecdRating": 7,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": True,
        },
        {
            "name": "Angola",
            "country": "AO",
            "stRating": "B2",
            "coverCategory": "Open Cover",
            "mltRating": "C1",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "B2",
            "previousCoverCategory": "Open Cover",
            "previousMltRating": "C1",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Angola%22",
            "oecdRating": 6,
            "previousOecdRating": 6,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": True,
        },
        {
            "name": "Bolivia",
            "country": "BO",
            "stRating": "C1",
            "coverCategory": "Open Cover",
            "mltRating": "C2",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "C1",
            "previousCoverCategory": "Open Cover",
            "previousMltRating": "C2",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Bolivia%22",
            "oecdRating": 7,
            "previousOecdRating": 7,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": True,
        },
        {
            "name": "Pakistan",
            "country": "PK",
            "stRating": "C2",
            "coverCategory": "Off Cover",
            "mltRating": "D",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "C2",
            "previousCoverCategory": "Off Cover",
            "previousMltRating": "D",
            "previousEdition": "2026-10-01",
            "change": "unchanged",
            "ecgcNote": "ST cover stands withdrawn effective from 12.05.2025",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=12&search=%22Pakistan%22",
            "oecdRating": 7,
            "previousOecdRating": 7,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": True,
        },
        {
            "name": "Egypt",
            "country": "EG",
            "stRating": "B2",
            "coverCategory": "Open Cover",
            "mltRating": "C1",
            "ecgcRatingDate": "2026-10-14",
            "mltRatingDate": "2026-10-14",
            "previousStRating": "C1",
            "previousCoverCategory": "RCC-I",
            "previousMltRating": "C1",
            "previousEdition": "2026-10-01",
            "change": "cover_eased",
            "changeDetail": "ST C1 → B2; cover RCC-I → Open Cover",
            "changedOn": "2026-10-14",
            "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
            "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
            "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=3&search=%22Egypt%22",
            "oecdRating": 6,
            "previousOecdRating": 6,
            "oecdChange": "unchanged",
            "oecdRatingDate": "2026-10-16",
            "sample": True,
        },
    ],
    "maxDiscoveryChargeUsd": 0.5,
}

# Run the Actor and wait for it to finish
run = client.actor("rich_minds/country-risk-feed-ai").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "countries": [],
  "sourceMode": "list",
  "itemsList": [
    {
      "name": "Afghanistan",
      "country": "AF",
      "stRating": "D",
      "coverCategory": "RCC-II",
      "mltRating": "D",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "D",
      "previousCoverCategory": "RCC-II",
      "previousMltRating": "D",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=11&search=%22Afghanistan%22",
      "oecdRating": 7,
      "previousOecdRating": 7,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Angola",
      "country": "AO",
      "stRating": "B2",
      "coverCategory": "Open Cover",
      "mltRating": "C1",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "B2",
      "previousCoverCategory": "Open Cover",
      "previousMltRating": "C1",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Angola%22",
      "oecdRating": 6,
      "previousOecdRating": 6,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Bolivia",
      "country": "BO",
      "stRating": "C1",
      "coverCategory": "Open Cover",
      "mltRating": "C2",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "C1",
      "previousCoverCategory": "Open Cover",
      "previousMltRating": "C2",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=1&search=%22Bolivia%22",
      "oecdRating": 7,
      "previousOecdRating": 7,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Pakistan",
      "country": "PK",
      "stRating": "C2",
      "coverCategory": "Off Cover",
      "mltRating": "D",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "C2",
      "previousCoverCategory": "Off Cover",
      "previousMltRating": "D",
      "previousEdition": "2026-10-01",
      "change": "unchanged",
      "ecgcNote": "ST cover stands withdrawn effective from 12.05.2025",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=12&search=%22Pakistan%22",
      "oecdRating": 7,
      "previousOecdRating": 7,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    },
    {
      "name": "Egypt",
      "country": "EG",
      "stRating": "B2",
      "coverCategory": "Open Cover",
      "mltRating": "C1",
      "ecgcRatingDate": "2026-10-14",
      "mltRatingDate": "2026-10-14",
      "previousStRating": "C1",
      "previousCoverCategory": "RCC-I",
      "previousMltRating": "C1",
      "previousEdition": "2026-10-01",
      "change": "cover_eased",
      "changeDetail": "ST C1 → B2; cover RCC-I → Open Cover",
      "changedOn": "2026-10-14",
      "stListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf",
      "mltListUrl": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-MLT-w.e.f.-14.10.2026.pdf",
      "url": "https://main.ecgc.in/english/wp-content/uploads/2026/10/ECGC-Country-Risk-Classification-List-ST-w.e.f.-14.10.2026.pdf#page=3&search=%22Egypt%22",
      "oecdRating": 6,
      "previousOecdRating": 6,
      "oecdChange": "unchanged",
      "oecdRatingDate": "2026-10-16",
      "sample": true
    }
  ],
  "maxDiscoveryChargeUsd": 0.5
}' |
apify call rich_minds/country-risk-feed-ai --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rich_minds/country-risk-feed-ai"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rBZqNsUo9JFewZqh7/builds/Q4YgnPCiogB0W0GGI/openapi.json
