{
  "openapi": "3.0.1",
  "info": {
    "title": "Export Credit Risk by Country — ECGC & OECD Grades + Alerts",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "Q4YgnPCiogB0W0GGI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rich_minds~country-risk-feed-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rich_minds-country-risk-feed-ai",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/rich_minds~country-risk-feed-ai/runs": {
      "post": {
        "operationId": "runs-sync-rich_minds-country-risk-feed-ai",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/rich_minds~country-risk-feed-ai/run-sync": {
      "post": {
        "operationId": "run-sync-rich_minds-country-risk-feed-ai",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "preset": {
            "title": "Start from a ready search (one click)",
            "enum": [
              "custom",
              "all-countries",
              "changes-only",
              "restricted-cover",
              "gulf-markets",
              "high-risk-markets",
              "ecgc-oecd-disagree"
            ],
            "type": "string",
            "description": "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.",
            "default": "custom"
          },
          "countries": {
            "title": "Countries to check",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string",
              "enum": [
                "ALL",
                "AF",
                "AL",
                "DZ",
                "AS",
                "AD",
                "AO",
                "AI",
                "AG",
                "AR",
                "AM",
                "AW",
                "AU",
                "AT",
                "AZ",
                "BS",
                "BH",
                "BD",
                "BB",
                "BY",
                "BE",
                "BZ",
                "BJ",
                "BM",
                "BT",
                "BO",
                "BQ",
                "BA",
                "BW",
                "BR",
                "PN",
                "VG",
                "BN",
                "BG",
                "BF",
                "BI",
                "KH",
                "CM",
                "CA",
                "IC",
                "CV",
                "KY",
                "CF",
                "TD",
                "CL",
                "CN",
                "CX",
                "CC",
                "CO",
                "KM",
                "CG",
                "CK",
                "CR",
                "CI",
                "HR",
                "CU",
                "CW",
                "CY",
                "CZ",
                "CD",
                "DK",
                "DJ",
                "DM",
                "DO",
                "EC",
                "EG",
                "SV",
                "GQ",
                "ER",
                "EE",
                "SZ",
                "ET",
                "FK",
                "FO",
                "FJ",
                "FI",
                "FR",
                "GF",
                "PF",
                "TF",
                "GA",
                "GM",
                "GE",
                "DE",
                "GH",
                "GI",
                "GR",
                "GL",
                "GD",
                "GP",
                "GU",
                "GT",
                "GN",
                "GW",
                "GY",
                "HT",
                "HM",
                "HN",
                "HK",
                "HU",
                "IS",
                "IN",
                "ID",
                "IR",
                "IQ",
                "IE",
                "IL",
                "IT",
                "JM",
                "JP",
                "JO",
                "KZ",
                "KE",
                "KI",
                "KW",
                "KG",
                "LA",
                "LV",
                "LB",
                "LS",
                "LR",
                "LY",
                "LI",
                "LT",
                "LU",
                "MO",
                "MG",
                "MW",
                "MY",
                "MV",
                "ML",
                "MT",
                "MH",
                "MQ",
                "MR",
                "MU",
                "YT",
                "MX",
                "FM",
                "MD",
                "MC",
                "MN",
                "ME",
                "MS",
                "MA",
                "MZ",
                "MM",
                "NA",
                "NR",
                "NP",
                "NL",
                "NC",
                "NZ",
                "NI",
                "NE",
                "NG",
                "NU",
                "NF",
                "KP",
                "MK",
                "MP",
                "NO",
                "OM",
                "PK",
                "PW",
                "PS",
                "PA",
                "PG",
                "PY",
                "PE",
                "PH",
                "PL",
                "PT",
                "PR",
                "QA",
                "RE",
                "RO",
                "RU",
                "RW",
                "WS",
                "SM",
                "ST",
                "SA",
                "SN",
                "RS",
                "SC",
                "SL",
                "SG",
                "SX",
                "SK",
                "SI",
                "SB",
                "SO",
                "ZA",
                "KR",
                "SS",
                "ES",
                "LK",
                "KN",
                "SH",
                "LC",
                "PM",
                "VC",
                "SD",
                "SR",
                "SE",
                "CH",
                "SY",
                "TW",
                "TJ",
                "TZ",
                "TH",
                "TL",
                "TG",
                "TK",
                "TO",
                "TT",
                "TN",
                "TR",
                "TM",
                "TC",
                "TV",
                "UG",
                "UA",
                "AE",
                "GB",
                "US",
                "UY",
                "UM",
                "VI",
                "UZ",
                "VU",
                "VA",
                "VE",
                "VN",
                "WF",
                "YE",
                "ZM",
                "ZW"
              ],
              "enumTitles": [
                "All countries",
                "Afghanistan (AF)",
                "Albania (AL)",
                "Algeria (DZ)",
                "American Samoa (USA) (AS)",
                "Andorra (AD)",
                "Angola (AO)",
                "Anguilla (UK) (AI)",
                "Antigua and Barbuda (AG)",
                "Argentina (AR)",
                "Armenia (AM)",
                "Aruba (AW)",
                "Australia (AU)",
                "Austria (AT)",
                "Azerbaijan (AZ)",
                "Bahamas (BS)",
                "Bahrain (BH)",
                "Bangladesh (BD)",
                "Barbados (BB)",
                "Belarus (BY)",
                "Belgium (BE)",
                "Belize (BZ)",
                "Benin (BJ)",
                "Bermuda (UK) (BM)",
                "Bhutan (BT)",
                "Bolivia (BO)",
                "Bonaire, St. Eustatius and Saba (Netherlands) (BQ)",
                "Bosnia and Herzegovina (BA)",
                "Botswana (BW)",
                "Brazil (BR)",
                "British Pacific (Pitcairn) Islands (PN)",
                "British Virgin Islands (UK) (VG)",
                "Brunei (BN)",
                "Bulgaria (BG)",
                "Burkina Faso (BF)",
                "Burundi (BI)",
                "Cambodia (KH)",
                "Cameroon (CM)",
                "Canada (CA)",
                "Canary Islands (Spain) (IC)",
                "Cape Verde (CV)",
                "Cayman Islands (UK) (KY)",
                "Central African Republic (CF)",
                "Chad (TD)",
                "Chile (CL)",
                "China (CN)",
                "Christmas Island (Australia) (CX)",
                "Cocos/Keeling Island (Australia) (CC)",
                "Colombia (CO)",
                "Comoros (KM)",
                "Congo Republic (CG)",
                "Cook Islands (New Zealand) (CK)",
                "Costa Rica (CR)",
                "Cote D’Ivoire (CI)",
                "Croatia (HR)",
                "Cuba (CU)",
                "Curacao (Netherlands) (CW)",
                "Cyprus (CY)",
                "Czech Republic (CZ)",
                "Democratic Republic of Congo (CD)",
                "Denmark (DK)",
                "Djibouti (DJ)",
                "Dominica (DM)",
                "Dominican Republic (DO)",
                "Ecuador (EC)",
                "Egypt (EG)",
                "El Salvador (SV)",
                "Equatorial Guinea (GQ)",
                "Eritrea (ER)",
                "Estonia (EE)",
                "Eswatini (SZ)",
                "Ethiopia (ET)",
                "Falkland Islands (UK) (FK)",
                "Faroe Islands (Denmark) (FO)",
                "Fiji (FJ)",
                "Finland (FI)",
                "France (FR)",
                "French Guiana (France) (GF)",
                "French Polynesia (France) (PF)",
                "French South Atlantic Territories (France) (TF)",
                "Gabon (GA)",
                "Gambia (GM)",
                "Georgia (GE)",
                "Germany (DE)",
                "Ghana (GH)",
                "Gibraltar (UK) (GI)",
                "Greece (GR)",
                "Greenland (GL)",
                "Grenada (GD)",
                "Guadeloupe (France) (GP)",
                "Guam (US) (GU)",
                "Guatemala (GT)",
                "Guinea (GN)",
                "Guinea Bissau (GW)",
                "Guyana (GY)",
                "Haiti (HT)",
                "Heard Island and McDonald Island (Australia) (HM)",
                "Honduras (HN)",
                "Hong Kong (Sp. Ad. Region of China) (HK)",
                "Hungary (HU)",
                "Iceland (IS)",
                "India (IN)",
                "Indonesia (ID)",
                "Iran (IR)",
                "Iraq (IQ)",
                "Ireland (IE)",
                "Israel (IL)",
                "Italy (IT)",
                "Jamaica (JM)",
                "Japan (JP)",
                "Jordan (JO)",
                "Kazakhstan (KZ)",
                "Kenya (KE)",
                "Kiribati (KI)",
                "Kuwait (KW)",
                "Kyrgyzstan (KG)",
                "Laos (LA)",
                "Latvia (LV)",
                "Lebanon (LB)",
                "Lesotho (LS)",
                "Liberia (LR)",
                "Libya (LY)",
                "Liechtenstein (LI)",
                "Lithuania (LT)",
                "Luxembourg (LU)",
                "Macao (MO)",
                "Madagascar (MG)",
                "Malawi (MW)",
                "Malaysia (MY)",
                "Maldives (MV)",
                "Mali (ML)",
                "Malta (MT)",
                "Marshall Islands (MH)",
                "Martinique (France) (MQ)",
                "Mauritania (MR)",
                "Mauritius (MU)",
                "Mayotte (France) (YT)",
                "Mexico (MX)",
                "Micronesia (FM)",
                "Moldova (MD)",
                "Monaco (MC)",
                "Mongolia (MN)",
                "Montenegro (ME)",
                "Montserrat (UK) (MS)",
                "Morocco (MA)",
                "Mozambique (MZ)",
                "Myanmar (MM)",
                "Namibia (NA)",
                "Nauru (NR)",
                "Nepal (NP)",
                "Netherlands (NL)",
                "New Caledonia (France) (NC)",
                "New Zealand (NZ)",
                "Nicaragua (NI)",
                "Niger (NE)",
                "Nigeria (NG)",
                "Niue Island (New Zealand) (NU)",
                "Norfolk Island (Australia) (NF)",
                "North Korea (KP)",
                "North Macedonia (MK)",
                "Northern Mariana Islands (USA) (MP)",
                "Norway (NO)",
                "Oman (OM)",
                "Pakistan (PK)",
                "Palau (USA) (PW)",
                "Palestine (PS)",
                "Panama (PA)",
                "Papua New Guinea (PG)",
                "Paraguay (PY)",
                "Peru (PE)",
                "Philippines (PH)",
                "Poland (PL)",
                "Portugal (PT)",
                "Puerto Rico (USA) (PR)",
                "Qatar (QA)",
                "Reunion Islands (France) (RE)",
                "Romania (RO)",
                "Russia (RU)",
                "Rwanda (RW)",
                "Samoa (WS)",
                "San Marino (Italy) (SM)",
                "Sao Tome & Principe (ST)",
                "Saudi Arabia (SA)",
                "Senegal (SN)",
                "Serbia (RS)",
                "Seychelles (SC)",
                "Sierra Leone (SL)",
                "Singapore (SG)",
                "Sint Maarten (Netherlands) (SX)",
                "Slovakia (SK)",
                "Slovenia (SI)",
                "Solomon Islands (SB)",
                "Somalia (SO)",
                "South Africa (ZA)",
                "South Korea (KR)",
                "South Sudan (SS)",
                "Spain (ES)",
                "Sri Lanka (LK)",
                "St. Christopher and Nevis (KN)",
                "St. Helena and Ascension (UK) (SH)",
                "St. Lucia (LC)",
                "St. Pierre and Miquelon (France) (PM)",
                "St. Vincent and the Grenadines (VC)",
                "Sudan (SD)",
                "Suriname (SR)",
                "Sweden (SE)",
                "Switzerland (CH)",
                "Syria (SY)",
                "Taiwan (TW)",
                "Tajikistan (TJ)",
                "Tanzania (TZ)",
                "Thailand (TH)",
                "Timor Leste (TL)",
                "Togo (TG)",
                "Tokealu (New Zealand) (TK)",
                "Tonga (TO)",
                "Trinidad and Tobago (TT)",
                "Tunisia (TN)",
                "Turkey (TR)",
                "Turkmenistan (TM)",
                "Turks and Caicos (UK) (TC)",
                "Tuvalu (TV)",
                "Uganda (UG)",
                "Ukraine (UA)",
                "United Arab Emirates (AE)",
                "United Kingdom (GB)",
                "United States of America (US)",
                "Uruguay (UY)",
                "US Minor outlying Islands (UM)",
                "US Virgin Islands (VI)",
                "Uzbekistan (UZ)",
                "Vanuatu (VU)",
                "Vatican City (VA)",
                "Venezuela (VE)",
                "Vietnam (VN)",
                "Wallis and Futuna (France) (WF)",
                "Yemen (YE)",
                "Zambia (ZM)",
                "Zimbabwe (ZW)"
              ]
            }
          },
          "changesOnly": {
            "title": "Changes only",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "goalDescription": {
            "title": "What do you export, and on what terms? (optional)",
            "type": "string",
            "description": "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": {
            "title": "E-mail me the changes (optional)",
            "type": "string",
            "description": "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": {
            "title": "Minimum score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "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.",
            "default": 0
          },
          "maxQualified": {
            "title": "Max countries to output",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "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.",
            "default": 250
          },
          "enableAi": {
            "title": "AI assessment",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "exporterCountry": {
            "title": "You export from (optional)",
            "enum": [
              "",
              "IN",
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "JP",
              "KR",
              "CN",
              "CA",
              "AU",
              "AE",
              "SA",
              "TR",
              "ZA",
              "BR",
              "BD",
              "LK",
              "MY"
            ],
            "type": "string",
            "description": "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.",
            "default": ""
          },
          "minRating": {
            "title": "Minimum ST rating (at or worse than)",
            "enum": [
              "A1",
              "A2",
              "B1",
              "B2",
              "C1",
              "C2",
              "D"
            ],
            "type": "string",
            "description": "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": {
            "title": "Add earlier editions (history)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "targetFlags": {
            "title": "Target flags (any of)",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string",
              "enum": [
                "restricted_cover",
                "off_cover",
                "high_risk",
                "downgraded",
                "upgraded",
                "st_mlt_differ",
                "changed",
                "ecgc_oecd_differ",
                "oecd_downgraded"
              ],
              "enumTitles": [
                "Restricted cover (RCC-I / RCC-II)",
                "Off cover (no ECGC cover)",
                "High risk (ST C2 or D)",
                "Downgraded in the newest edition",
                "Upgraded in the newest edition",
                "ST and MLT ratings differ",
                "Changed since the previous edition",
                "ECGC and OECD disagree (2+ grades apart)",
                "OECD downgraded at its latest meeting"
              ]
            }
          },
          "suppressionList": {
            "title": "Exclude list",
            "type": "array",
            "description": "Country names or ISO-2 codes to never output. Skipped before any processing and never charged.",
            "items": {
              "type": "string"
            }
          },
          "llmProvider": {
            "title": "AI model access",
            "enum": [
              "apify",
              "byok"
            ],
            "type": "string",
            "description": "<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.",
            "default": "apify"
          },
          "llmModel": {
            "title": "AI model",
            "type": "string",
            "description": "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": {
            "title": "Your API key (own-key mode only)",
            "type": "string",
            "description": "Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged."
          },
          "aiCandidateMultiplier": {
            "title": "AI shortlist size, × max qualified (API only)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "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.",
            "default": 2
          },
          "aiScope": {
            "title": "Which countries the AI writes for (API only)",
            "type": "string",
            "description": "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.",
            "default": "changed"
          },
          "sendAlertsTo": {
            "title": "Send alerts to (Slack, Discord, Teams, Google Chat, Telegram or webhook)",
            "type": "string",
            "description": "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&lt;token&gt;/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": {
            "title": "Skip countries ECGC did not move",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "dedupeTtlDays": {
            "title": "Deliver an unchanged country again after (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "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.",
            "default": 0
          },
          "historyDatasetName": {
            "title": "Keep a running log (dataset name)",
            "type": "string",
            "description": "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.",
            "default": ""
          },
          "sourceMode": {
            "title": "Where do the countries come from?",
            "enum": [
              "live",
              "dataset",
              "list"
            ],
            "type": "string",
            "description": "<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.",
            "default": "live"
          },
          "autoSwitchToLive": {
            "title": "Typed search next to the sample starts the live search (API only)",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "failOnSourceError": {
            "title": "Fail the run when ECGC could not be read (API only)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "Only for <b>dataset</b> mode. Pick the dataset so the Actor is granted read access to it."
          },
          "itemsList": {
            "title": "Countries to process",
            "type": "array",
            "description": "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": {
            "title": "Max fallback source spend, USD (API only)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "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.",
            "default": 0.5
          },
          "maxToProcess": {
            "title": "Max countries to score per run (API only)",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "API only — hidden on the form. Upper bound on how many countries are scored in one run. Default = 3 × max countries."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "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": {
            "title": "Webhook headers (API only)",
            "type": "object",
            "description": "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": {
            "title": "Webhook batch size (API only)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "API only — hidden on the form. 1 = one POST per country the moment it is ready. Higher = one POST per N countries.",
            "default": 1
          },
          "webhookSecret": {
            "title": "Webhook signing secret (API only)",
            "type": "string",
            "description": "API only — hidden on the form. Any random string. Every webhook POST then carries <code>X-Signature: sha256=&lt;HMAC-SHA256 of the raw body with this secret&gt;</code>, so your endpoint can verify it came from this Actor. Stored encrypted by Apify, never logged."
          },
          "dedupeStoreName": {
            "title": "Dedupe store name (API only)",
            "type": "string",
            "description": "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.",
            "default": "country-risk-feed-ai-seen"
          },
          "discoveryTimeoutSecs": {
            "title": "Source run timeout, seconds (API only)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "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.",
            "default": 3600
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Slack incoming-webhook URL for the digest."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Discord channel webhook URL for the digest."
          },
          "teamsWebhookUrl": {
            "title": "Microsoft Teams webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Teams Workflows webhook URL for the digest."
          },
          "googleChatWebhookUrl": {
            "title": "Google Chat webhook URL (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. Google Chat space webhook URL for the digest."
          },
          "telegramUrl": {
            "title": "Telegram sendMessage link (API only)",
            "type": "string",
            "description": "API only — hidden on the form, where <code>sendAlertsTo</code> takes it. The bot's sendMessage link with its chat_id."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}