{
  "openapi": "3.1.0",
  "info": {
    "title": "RiskPulse API",
    "description": "Global risk intelligence API. AI-synthesized travel safety alerts, country risk profiles, sanctions screening, business risk analysis, supply chain disruption intelligence, nomad visa/tax guidance, expat risk assessment, and emergency evacuation protocols. Covers 195 countries with real-time data. Serves travel risk managers, insurance brokers, compliance teams, expats, and digital nomads. Travel insurance affiliates (SafetyWing, WorldNomads) included in relevant endpoints. All endpoints support any language via ?lang=. Pricing: $0.08\u2013$0.20 USDC/call via x402 micropayment.",
    "version": "1.2.0",
    "contact": {
      "url": "https://riskpulse-five.vercel.app"
    }
  },
  "servers": [
    {
      "url": "https://riskpulse-five.vercel.app"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment signature. Omit to receive a 402 with payment requirements."
      }
    }
  },
  "paths": {
    "/api/risk/country": {
      "get": {
        "summary": "Country risk profile",
        "description": "Comprehensive risk profile across 6 dimensions: political, economic, security, health, natural disaster, and legal/regulatory. Powered by World Bank governance indicators and real-time intelligence.",
        "operationId": "riskCountry",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Country name (e.g. Mexico, Thailand, Nigeria)"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Country risk profile with dimensional scores and recommendations"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.15,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Comprehensive country profile \u2014 run first for any country-specific workflow; chain to /api/risk/travel for traveler view or /api/risk/business for enterprise view"
      }
    },
    "/api/risk/travel": {
      "get": {
        "summary": "Travel safety assessment",
        "description": "Advisory level (1-4), crime and health risks, entry requirements, safe/avoid areas, emergency contacts, and travel insurance recommendations.",
        "operationId": "riskTravel",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nationality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Traveler nationality (default: US)"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Travel safety assessment with insurance referrals"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Run before any trip booking; pairs with TravelPulse /api/travel/insurance; SafetyWing + WorldNomads insurance links auto-appended in response"
      }
    },
    "/api/risk/business": {
      "get": {
        "summary": "Business risk analysis",
        "description": "Market entry risk assessment covering regulatory quality, corruption, rule of law, IP protection, contract enforcement, profit repatriation, and due diligence checklist.",
        "operationId": "riskBusiness",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Business risk analysis with market entry guidance"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.2,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Pairs with /api/risk/sanctions for compliance check; follow with /api/risk/supply for supply chain exposure; combine with FilingsPulse for due diligence workflows"
      }
    },
    "/api/risk/compare": {
      "get": {
        "summary": "Country risk comparison",
        "description": "Side-by-side risk comparison of 2-4 countries \u2014 safety, stability, business environment, expat friendliness, category winners, and overall ranking.",
        "operationId": "riskCompare",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "countries",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated country names (e.g. Mexico,Colombia,Costa Rica)"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Side-by-side country risk comparison"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Risk comparison between destinations \u2014 run before trip planning to pick safer alternative; chain to /api/risk/travel for selected destination"
      }
    },
    "/api/risk/expat": {
      "get": {
        "summary": "Expat living guide",
        "description": "Comprehensive expat guide covering safety, healthcare quality, cost of living, visa ease, language barrier, expat community, best cities, challenges, and travel insurance links.",
        "operationId": "riskExpat",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Country of origin (default: US)"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Expat living guide with insurance referrals"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.15,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Pairs with ImmigrationPulse /api/status for visa; pairs with RemittancePulse for cross-border payments; SafetyWing expat insurance link auto-appended"
      }
    }
  }
}