{
  "openapi": "3.1.0",
  "info": {
    "title": "DataNexusAI API",
    "version": "1.0.0",
    "description": "Public data API for SEBRA payments, PTP road accidents, Hearthstone cards, EU agri-food prices, and trade/market analytics. Paid data endpoints use x402 (USDC micropayments). Docs and discovery endpoints are free.\n\nMachine-readable discovery: `https://api.datanexusai.org/openapi.json`, `https://api.datanexusai.org/llms.txt`, `https://api.datanexusai.org/.well-known/x402`.\n\nHuman docs: `/docs` and `/api/`.",
    "contact": {
      "url": "https://datanexusai.org"
    }
  },
  "servers": [
    {
      "url": "https://api.datanexusai.org",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "docs",
      "description": "Free documentation"
    },
    {
      "name": "sebra",
      "description": "SEBRA public payments"
    },
    {
      "name": "ptp",
      "description": "Road accidents (PTP)"
    },
    {
      "name": "hearthstone",
      "description": "Hearthstone cards"
    },
    {
      "name": "agrifood",
      "description": "Agri-food prices"
    },
    {
      "name": "trade",
      "description": "Trade and markets"
    }
  ],
  "paths": {
    "/api/": {
      "get": {
        "operationId": "api_docs",
        "summary": "API documentation (HTML)",
        "description": "Human-readable HTML documentation for the DataNexusAI API.",
        "tags": [
          "docs"
        ],
        "responses": {
          "200": {
            "description": "HTML documentation",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          }
        },
        "security": []
      }
    },
    "/api": {
      "get": {
        "operationId": "api_docs_noslash",
        "summary": "API documentation (HTML, no trailing slash)",
        "description": "Same HTML docs as /api/.",
        "tags": [
          "docs"
        ],
        "responses": {
          "200": {
            "description": "HTML documentation",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          }
        },
        "security": []
      }
    },
    "/api/docs": {
      "get": {
        "operationId": "api_docs_alias",
        "summary": "API documentation (HTML alias)",
        "description": "Same HTML docs as /api/.",
        "tags": [
          "docs"
        ],
        "responses": {
          "200": {
            "description": "HTML documentation",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          }
        },
        "security": []
      }
    },
    "/api/docs.md": {
      "get": {
        "operationId": "api_docs_markdown",
        "summary": "API documentation (Markdown)",
        "description": "Raw Markdown documentation (README).",
        "tags": [
          "docs"
        ],
        "responses": {
          "200": {
            "description": "Markdown documentation",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          }
        },
        "security": []
      }
    },
    "/api/sebra/getPeriodsWithMostPayments": {
      "get": {
        "operationId": "sebra_get_periods_with_most_payments",
        "summary": "Periods with the largest payment sums",
        "description": "Which calendar slots (days, months, or weekdays) have the largest SEBRA payment sums and how many payments.",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "getPeriodsWithMostPayments",
                  "period": "days",
                  "count": 1,
                  "items": [
                    {
                      "day_of_month": 28,
                      "total_amount": "1234567.89",
                      "payment_count": 42
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "days",
                "months",
                "weekdays"
              ]
            },
            "description": "One of: days, months, weekdays. Or pass as flag ?days / ?months / ?weekdays.",
            "example": "days"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Inclusive start (DD-MM-YYYY or MM-YYYY).",
            "example": "01-10-2020"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Inclusive end (DD-MM-YYYY or MM-YYYY).",
            "example": "01-11-2020"
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR. Omit to group by currency.",
            "example": "EUR"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Restrict to one calendar year.",
            "example": 2024
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows after sorting by amount.",
            "example": 10
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/sebra/getTaxonomyForYear": {
      "get": {
        "operationId": "sebra_get_taxonomy_for_year",
        "summary": "SEBRA taxonomy for a calendar year",
        "description": "Where money went in a year: Salaries, Maintenance, Capital expenditure, etc.",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "getTaxonomyForYear",
                  "year": 2019,
                  "items": [
                    {
                      "category": "Заплати",
                      "category_key": "salaries",
                      "total_amount": "500000.00"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2019
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR.",
            "example": "BGN"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/sebra/getTaxonomyForYear/{year}": {
      "get": {
        "operationId": "sebra_get_taxonomy_for_year_path",
        "summary": "SEBRA taxonomy for a calendar year (path)",
        "description": "Same as getTaxonomyForYear with year in the path.",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2019
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR.",
            "example": "BGN"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/sebra/getTaxonomyForPeriod": {
      "get": {
        "operationId": "sebra_get_taxonomy_for_period",
        "summary": "SEBRA taxonomy for a date window",
        "description": "Same account buckets as getTaxonomyForYear, for from/to dates.",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Start date DD-MM-YYYY or MM-YYYY.",
            "example": "01-10-2020"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End date; defaults to today.",
            "example": "01-11-2020"
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR.",
            "example": "BGN"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/sebra/getMostSponsoredProgramme": {
      "get": {
        "operationId": "sebra_get_most_sponsored_programme",
        "summary": "Most sponsored programmes",
        "description": "Programmes ranked by total amount (then payment count).",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year (or use from/to).",
            "example": 2019
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window start DD-MM-YYYY or MM-YYYY.",
            "example": "01-10-2020"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window end.",
            "example": "01-11-2020"
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR.",
            "example": "EUR"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max programmes.",
            "example": 10
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/sebra/getMostSponsoredProgramme/{year}": {
      "get": {
        "operationId": "sebra_get_most_sponsored_programme_year",
        "summary": "Most sponsored programmes (path year)",
        "description": "Same as getMostSponsoredProgramme with year in the path.",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2019
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max programmes."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/sebra/getUnusualPayments": {
      "get": {
        "operationId": "sebra_get_unusual_payments",
        "summary": "Unusual SEBRA payment activity",
        "description": "Unusual days, programmes, expense spikes, and payment-count outliers for a year or date window.",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2019
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window start."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window end."
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max items per list (default 5).",
            "example": 5
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/sebra/getUnusualPayments/{year}": {
      "get": {
        "operationId": "sebra_get_unusual_payments_year",
        "summary": "Unusual SEBRA payments (path year)",
        "description": "Same as getUnusualPayments with year in the path.",
        "tags": [
          "sebra"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2019
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BGN or EUR."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max items per list."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/ptp/getPtpPerCity": {
      "get": {
        "operationId": "ptp_get_ptp_per_city",
        "summary": "Road accidents for a city",
        "description": "Crashes for a city (Latin or Cyrillic names). Optional year or from/to.",
        "tags": [
          "ptp"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City name (e.g. Sofia, Варна).",
            "example": "Sofia"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2025
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window start."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window end."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows (newest first)."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/ptp/getPtpPerCity/{city}": {
      "get": {
        "operationId": "ptp_get_ptp_per_city_path",
        "summary": "Road accidents for a city (path)",
        "description": "Same as getPtpPerCity with city in the path.",
        "tags": [
          "ptp"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "city",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City name.",
            "example": "Sofia"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window start."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window end."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/ptp/getPtpPerRegion": {
      "get": {
        "operationId": "ptp_get_ptp_per_region",
        "summary": "Road accidents for a region/oblast",
        "description": "Crashes in a district/oblast. Sofia maps to Sofia city, not district.",
        "tags": [
          "ptp"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Region/oblast name.",
            "example": "Sofia"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2025
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window start."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window end."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/ptp/getPtpPerRegion/{region}": {
      "get": {
        "operationId": "ptp_get_ptp_per_region_path",
        "summary": "Road accidents for a region (path)",
        "description": "Same as getPtpPerRegion with region in the path.",
        "tags": [
          "ptp"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Region/oblast name.",
            "example": "Sofia"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window start."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window end."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/ptp/getMostDeadlyLocations": {
      "get": {
        "operationId": "ptp_get_most_deadly_locations",
        "summary": "Deadliest crash location clusters",
        "description": "Deadliest 2 km crash clusters for a year or date window.",
        "tags": [
          "ptp"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2020
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window start."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Window end."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max clusters (default 20).",
            "example": 20
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/ptp/getMostDeadlyLocations/{year}": {
      "get": {
        "operationId": "ptp_get_most_deadly_locations_year",
        "summary": "Deadliest locations (path year)",
        "description": "Same as getMostDeadlyLocations with year in the path.",
        "tags": [
          "ptp"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Calendar year.",
            "example": 2020
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max clusters."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/hearthstone/getCard": {
      "get": {
        "operationId": "hearthstone_get_card",
        "summary": "Get Hearthstone card (EN + BG)",
        "description": "Returns structured bilingual Hearthstone card information. Provide name and/or dbf_id.",
        "tags": [
          "hearthstone"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "query": {
                    "name": "Fireball"
                  },
                  "count": 1,
                  "items": [
                    {
                      "en": {
                        "name": "Fireball",
                        "dbf_id": 315
                      },
                      "bg": {
                        "name": "Огнена топка"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "English card name (case-insensitive).",
            "example": "Fireball"
          },
          {
            "name": "dbf_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Numeric Hearthstone dbf id.",
            "example": 315
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/hearthstone/getTranslatedCardInBG": {
      "get": {
        "operationId": "hearthstone_get_translated_card_in_bg",
        "summary": "Translate Hearthstone card to Bulgarian",
        "description": "Look up English card name; return matching Bulgarian card rows.",
        "tags": [
          "hearthstone"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "English card name.",
            "example": "Fireball"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/hearthstone/getTranslatedCardInBG/{name}": {
      "get": {
        "operationId": "hearthstone_get_translated_card_in_bg_path",
        "summary": "Translate card to BG (path name)",
        "description": "Same as getTranslatedCardInBG with name in the path.",
        "tags": [
          "hearthstone"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "English card name.",
            "example": "Fireball"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/hearthstone/getCardsByClass": {
      "get": {
        "operationId": "hearthstone_get_cards_by_class",
        "summary": "List Hearthstone cards by class",
        "description": "All cards for a class (e.g. Shaman). Each item has en and optional bg.",
        "tags": [
          "hearthstone"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "class",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Card class (Shaman, Mage, …).",
            "example": "Shaman"
          },
          {
            "name": "collectible",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter collectible cards."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows (default 200).",
            "example": 50
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/hearthstone/getCardsByClass/{card_class}": {
      "get": {
        "operationId": "hearthstone_get_cards_by_class_path",
        "summary": "List cards by class (path)",
        "description": "Same as getCardsByClass with class in the path.",
        "tags": [
          "hearthstone"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "card_class",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Card class.",
            "example": "Mage"
          },
          {
            "name": "collectible",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter collectible."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max rows."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/datasets": {
      "get": {
        "operationId": "agrifood_datasets",
        "summary": "List agri-food datasets",
        "description": "Latest import metadata per dataset (cereals, oilseeds, pigmeat).",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": [
                  {
                    "dataset": "cereals_prices",
                    "row_count": 1000
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page size (optional).",
            "example": 100
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Offset (optional).",
            "example": 0
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/datasets/{dataset_id}": {
      "get": {
        "operationId": "agrifood_dataset",
        "summary": "Agri-food dataset detail",
        "description": "Import versions for one dataset id.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "dataset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "e.g. cereals_prices, oilseeds_prices, pigmeat_prices.",
            "example": "cereals_prices"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/commodities": {
      "get": {
        "operationId": "agrifood_commodities",
        "summary": "List commodities",
        "description": "Commodity catalog across cereals, oilseeds, and pigmeat.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by dataset id.",
            "example": "cereals_prices"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search product name / pig class."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page size (default 100).",
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Offset."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/commodities/{commodity_id}/prices": {
      "get": {
        "operationId": "agrifood_commodity_prices",
        "summary": "Prices for one commodity",
        "description": "Price rows for a commodity id, newest first.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "commodity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Commodity id e.g. cereals_prices:Milling rye",
            "example": "cereals_prices:Milling rye"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Member state code or name.",
            "example": "AT"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO date start."
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO date end."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/commodities/{commodity_id}/history": {
      "get": {
        "operationId": "agrifood_commodity_history",
        "summary": "Price history for one commodity",
        "description": "Time series for a commodity (begin_date ascending).",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "commodity_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Commodity id.",
            "example": "cereals_prices:Milling rye"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Member state.",
            "example": "AT"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/countries": {
      "get": {
        "operationId": "agrifood_countries",
        "summary": "List member states",
        "description": "EU member states from agrifood_member_state.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional: countries present in that dataset."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/prices": {
      "get": {
        "operationId": "agrifood_prices",
        "summary": "Query agri-food prices",
        "description": "Union of cereals, oilseeds, and pigmeat price facts.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Dataset id.",
            "example": "cereals_prices"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Member state.",
            "example": "BG"
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Product / pig class."
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start date.",
            "example": "2024-01-01"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End date."
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Market name."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/prices/changes": {
      "get": {
        "operationId": "agrifood_prices_changes",
        "summary": "Weekly agri-food price changes",
        "description": "Period-to-period LAG changes for agri-food price series.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Dataset id.",
            "example": "pigmeat_prices"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Member state.",
            "example": "BG"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/anomalies": {
      "get": {
        "operationId": "agrifood_anomalies",
        "summary": "Agri-food price anomalies",
        "description": "Rows with large percent change or z-score within a series.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "min_percent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Min |percent_change| (default 25).",
            "example": 40
          },
          {
            "name": "z",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Min |zscore| (default 3)."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/latest": {
      "get": {
        "operationId": "agrifood_latest",
        "summary": "Latest prices per series",
        "description": "Newest begin_date per agri-food price series.",
        "tags": [
          "agrifood"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Dataset id.",
            "example": "oilseeds_prices"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/changes": {
      "get": {
        "operationId": "changes",
        "summary": "Period-to-period trade/price changes",
        "description": "Changes for price, imports, exports, trade_balance. If dataset= is set, routes to agri-food price changes.",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Reporter country.",
            "example": "BG"
          },
          {
            "name": "commodity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Product code or name.",
            "example": "1001"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start period.",
            "example": "2020"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End period.",
            "example": "2025"
          },
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "price|imports|exports|trade_balance.",
            "example": "imports"
          },
          {
            "name": "dataset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "If set, use agri-food price LAG path."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/trade": {
      "get": {
        "operationId": "trade",
        "summary": "Comext trade rows",
        "description": "Eurostat Comext trade facts (value and quantity).",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "reporter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Reporter country (or country=).",
            "example": "BG"
          },
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Partner (often WORLD)."
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Product code (or commodity=).",
            "example": "1001"
          },
          {
            "name": "flow",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "1/2 or import/export."
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start period.",
            "example": "2020"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End period."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/trade/balance": {
      "get": {
        "operationId": "trade_balance",
        "summary": "Trade balance",
        "description": "exports - imports on VALUE_IN_EUROS. Requires reporter and product.",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Reporter (or reporter=).",
            "example": "BG"
          },
          {
            "name": "commodity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Product (or product=).",
            "example": "1001"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start period."
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End period."
          },
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Partner (default WORLD)."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/trade/partners": {
      "get": {
        "operationId": "trade_partners",
        "summary": "Top trading partners",
        "description": "Ranked partners for reporter+product (excludes WORLD aggregates).",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "reporter",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Reporter country.",
            "example": "BG"
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Product code.",
            "example": "1001"
          },
          {
            "name": "flow",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "import|export|both (default both)."
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Period filter.",
            "example": "2025"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start."
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "example": 20
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "value|quantity|share."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/markets/{country}/{commodity}": {
      "get": {
        "operationId": "market_snapshot",
        "summary": "Market snapshot",
        "description": "Agri-food average price + Comext trade for country/commodity.",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Country code.",
            "example": "BG"
          },
          {
            "name": "commodity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Commodity / product code.",
            "example": "1001"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Year."
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start."
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End."
          },
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Partner (default WORLD)."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/markets/{country}/{commodity}/history": {
      "get": {
        "operationId": "market_history",
        "summary": "Market history",
        "description": "Annual series: price, imports, exports, trade_balance.",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Country code.",
            "example": "BG"
          },
          {
            "name": "commodity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Commodity code.",
            "example": "1001"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start.",
            "example": "2020"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End.",
            "example": "2025"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/markets/{country}/{commodity}/insights": {
      "get": {
        "operationId": "market_insights",
        "summary": "Market insights",
        "description": "YoY percent changes and z-score anomalies (deterministic).",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Country code.",
            "example": "BG"
          },
          {
            "name": "commodity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Commodity code.",
            "example": "1001"
          },
          {
            "name": "z",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Z-score threshold (default 3)."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/markets/changes": {
      "get": {
        "operationId": "market_changes",
        "summary": "Cross-market YoY changes",
        "description": "YoY moves with |percent| >= min_percent across markets.",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated countries.",
            "example": "BG"
          },
          {
            "name": "commodities",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated commodities.",
            "example": "1001"
          },
          {
            "name": "min_percent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Default 10.",
            "example": 10
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/markets/anomalies": {
      "get": {
        "operationId": "market_anomalies",
        "summary": "Cross-market anomalies",
        "description": "Large YoY or z-score moves on price/imports.",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated countries.",
            "example": "BG"
          },
          {
            "name": "commodities",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated commodities.",
            "example": "1001"
          },
          {
            "name": "min_percent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Default 40."
          },
          {
            "name": "z",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Z-score threshold."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/markets/compare": {
      "get": {
        "operationId": "market_compare",
        "summary": "Compare countries for one commodity",
        "description": "Compare 2+ countries for one commodity and period.",
        "tags": [
          "trade"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "countries",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated country codes.",
            "example": "BG,RO,GR,DE"
          },
          {
            "name": "commodity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Commodity code.",
            "example": "1001"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Start period."
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "End period."
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/macro/eu-inflation-divergence": {
      "get": {
        "operationId": "eu_inflation_divergence",
        "summary": "EU HICP inflation divergence vs euro area",
        "description": "Derived cross-country inflation gaps: member-state HICP YoY minus EA20/EU27 benchmark, plus MoM from the HICP index. Ranked by absolute gap.",
        "tags": [
          "macro",
          "eurostat"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "eu_inflation_divergence",
                  "benchmark": {
                    "geo": "EA20",
                    "yoy_pct": 2.1
                  },
                  "results": [
                    {
                      "geo": "BG",
                      "yoy_pct": 3.5,
                      "gap_vs_benchmark_pp": 1.4
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional period filter (e.g. 2024-08). Default: latest.",
            "example": "2024-08"
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/rates/ecb-stance": {
      "get": {
        "operationId": "ecb_stance",
        "summary": "ECB policy corridor and €STR stance",
        "description": "Derived monetary stance: DFR/MRO/MLFR corridor width, €STR−DFR spread, and a liquidity stance label. Not a raw rate dump.",
        "tags": [
          "macro",
          "ecb",
          "rates"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "ecb_stance",
                  "derived": {
                    "corridor_width_pp": 0.75,
                    "estr_minus_dfr_pp": 0.02,
                    "liquidity_stance": "balanced"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/rates/eu-curve-slope": {
      "get": {
        "operationId": "eu_curve_slope",
        "summary": "Euro-area yield curve slopes",
        "description": "Derived AAA euro-area yield-curve slopes (10Y−2Y, 30Y−10Y), butterfly, and steep/flat/inverted regime.",
        "tags": [
          "macro",
          "ecb",
          "rates"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "eu_curve_slope",
                  "derived": {
                    "slope_10y_2y_pp": 0.45,
                    "regime": "normal"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/v1/fx/eurusd-analytics": {
      "get": {
        "operationId": "eurusd_analytics",
        "summary": "EURUSD returns, vol, drawdown analytics",
        "description": "Derived FX layer on ECB EURUSD reference: multi-horizon returns, annualized vol, percentile, z-score, max drawdown.",
        "tags": [
          "macro",
          "ecb",
          "fx"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "eurusd_analytics",
                  "spot": 1.08,
                  "derived": {
                    "return_1m_pct": 1.2,
                    "vol_21d_annualized_pct": 7.5
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "lookback_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "History window for percentile/z-score (default 252).",
            "example": 252
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/us/yield-curve": {
      "get": {
        "operationId": "analytics_us_yield_curve",
        "summary": "US 10Y−2Y Treasury spread (derived)",
        "description": "Runtime FRED DGS10 − DGS2. Returns a single derived spread — not raw Treasury series. Requires license_status=APPROVED for both series.",
        "tags": [
          "macro",
          "fred",
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "indicator": "US_10Y_2Y_SPREAD",
                  "date": "2026-09-24",
                  "value": 0.42,
                  "unit": "percentage_points"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/us-eu/inflation": {
      "get": {
        "operationId": "analytics_us_eu_inflation",
        "summary": "US vs EU inflation differential (derived)",
        "description": "Runtime FRED CPI YoY vs Eurostat HICP YoY. Derived differential only. Requires CPIAUCSL license_status=APPROVED.",
        "tags": [
          "macro",
          "fred",
          "eurostat",
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "indicator": "US_EU_INFLATION_DIFFERENTIAL",
                  "us_inflation": 2.9,
                  "eu_inflation": 2.1,
                  "differential": 0.8
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/us/macro": {
      "get": {
        "operationId": "analytics_us_macro",
        "summary": "US macro regime snapshot (derived)",
        "description": "Derived inflation/unemployment/fed-funds changes and a macro regime label from runtime FRED inputs. No raw series arrays.",
        "tags": [
          "macro",
          "fred",
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/market/volatility-regime": {
      "get": {
        "operationId": "analytics_volatility_regime",
        "summary": "Market volatility regime from VIX (derived)",
        "description": "Runtime VIXCLS → regime / percentile / z-score. Requires VIXCLS license_status=APPROVED. Not a raw VIX endpoint.",
        "tags": [
          "macro",
          "fred",
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "lookback_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Lookback window (default 252).",
            "example": 252
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/economic/oecd/series/{series_code}": {
      "get": {
        "operationId": "oecd_series",
        "summary": "OECD KEI series by canonical code",
        "description": "Observations for one OECD Key Economic Indicator series (e.g. OECD_CLI_USA, OECD_UNEMP_DEU). Attribution: OECD SDMX.",
        "tags": [
          "macro",
          "oecd",
          "kei"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "oecd_series",
                  "series_code": "OECD_CLI_USA",
                  "geo": "USA",
                  "observations": [
                    {
                      "period": "2024-01",
                      "value": 99.1
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max observations (default 120).",
            "example": 120
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/economic/oecd/country/{country}": {
      "get": {
        "operationId": "oecd_country",
        "summary": "OECD KEI latest snapshot for a country",
        "description": "Latest CLI, business/consumer confidence, industrial production, retail trade, and unemployment for an ISO3 country (USA, DEU, …).",
        "tags": [
          "macro",
          "oecd",
          "kei"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "oecd_country",
                  "country": "USA",
                  "indicators": [
                    {
                      "canonical_code": "OECD_CLI_USA",
                      "value": 99.3
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/economic/country/{code}/overview": {
      "get": {
        "operationId": "country_overview",
        "summary": "Cross-source country economic overview",
        "description": "Combined Eurostat + ECB + OECD KEI + World Bank WDI snapshot for a country (ISO2 or ISO3). Multi-source value-add.",
        "tags": [
          "macro",
          "oecd",
          "eurostat",
          "ecb",
          "worldbank",
          "overview"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "country_overview",
                  "country": "DE",
                  "sources_present": [
                    "oecd",
                    "eurostat",
                    "ecb",
                    "worldbank"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/economic/worldbank/series/{series_code}": {
      "get": {
        "operationId": "worldbank_series",
        "summary": "World Bank WDI series by canonical code",
        "description": "Observations for one World Bank WDI series (e.g. WB_GDP_PER_CAPITA_USA). Attribution: World Bank.",
        "tags": [
          "macro",
          "worldbank",
          "wdi"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "worldbank_series",
                  "series_code": "WB_GDP_PER_CAPITA_USA",
                  "geo": "USA",
                  "observations": [
                    {
                      "period": "2022",
                      "value": 76329.6
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Max observations (default 120).",
            "example": 40
          }
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/economic/worldbank/country/{country}": {
      "get": {
        "operationId": "worldbank_country",
        "summary": "World Bank WDI latest snapshot for a country",
        "description": "Latest allowlisted WDI structural indicators for an ISO3 country.",
        "tags": [
          "macro",
          "worldbank",
          "wdi"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "endpoint": "worldbank_country",
                  "country": "USA",
                  "indicators": {
                    "gdp_per_capita": {
                      "value": 76329.6
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/trade-openness/{code}": {
      "get": {
        "operationId": "analytics_trade_openness",
        "summary": "Trade openness (exports+imports %GDP)",
        "description": "Derived: NE.EXP.GNFS.ZS + NE.IMP.GNFS.ZS from World Bank WDI.",
        "tags": [
          "macro",
          "worldbank",
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/debt-burden/{code}": {
      "get": {
        "operationId": "analytics_debt_burden",
        "summary": "Government debt burden (% GDP)",
        "description": "Derived structural debt burden from GC.DOD.TOTL.GD.ZS.",
        "tags": [
          "macro",
          "worldbank",
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/energy-dependency/{code}": {
      "get": {
        "operationId": "analytics_energy_dependency",
        "summary": "Energy imports and renewable share",
        "description": "Derived energy dependency metrics from World Bank WDI.",
        "tags": [
          "macro",
          "worldbank",
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    },
    "/api/analytics/country-structure/{code}": {
      "get": {
        "operationId": "analytics_country_structure",
        "summary": "Structural country profile (World Bank derived)",
        "description": "Composite structural snapshot: trade openness, debt, energy, FDI, demographics, carbon intensity. Value-add analytics (x402).",
        "tags": [
          "macro",
          "worldbank",
          "analytics",
          "overview"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "402": {
            "description": "Payment Required (x402). Challenge is in the PAYMENT-REQUIRED header (V2). Sign USDC payment and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 V2 PaymentRequired challenge",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          }
        },
        "requestBody": {
          "required": false,
          "description": "No request body required (GET). Empty object schema for discovery probes.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "asset": "USDC",
          "scheme": "exact",
          "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
          "networks": [
            {
              "id": "eip155:8453",
              "label": "Base",
              "asset": "USDC"
            },
            {
              "id": "eip155:137",
              "label": "Polygon",
              "asset": "USDC"
            },
            {
              "id": "eip155:42161",
              "label": "Arbitrum One",
              "asset": "USDC"
            }
          ],
          "facilitator": "https://facilitator.payai.network",
          "negotiation": {
            "challengeHeader": "PAYMENT-REQUIRED",
            "paymentHeader": "PAYMENT-SIGNATURE",
            "responseHeader": "PAYMENT-RESPONSE",
            "httpStatus": 402,
            "docs": "https://docs.x402.org"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 V2 payment proof. On first unpaid call the server returns HTTP 402 with a PAYMENT-REQUIRED challenge. Sign a USDC transfer for an accepted network and retry with PAYMENT-SIGNATURE. See https://docs.x402.org"
      }
    }
  },
  "x-payment-info": {
    "protocols": [
      "x402"
    ],
    "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
    },
    "asset": "USDC",
    "scheme": "exact",
    "payTo": "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68",
    "networks": [
      {
        "id": "eip155:8453",
        "label": "Base",
        "asset": "USDC"
      },
      {
        "id": "eip155:137",
        "label": "Polygon",
        "asset": "USDC"
      },
      {
        "id": "eip155:42161",
        "label": "Arbitrum One",
        "asset": "USDC"
      }
    ],
    "facilitator": "https://facilitator.payai.network",
    "negotiation": {
      "challengeHeader": "PAYMENT-REQUIRED",
      "paymentHeader": "PAYMENT-SIGNATURE",
      "responseHeader": "PAYMENT-RESPONSE",
      "httpStatus": 402,
      "docs": "https://docs.x402.org"
    }
  },
  "x-discovery": {
    "ownershipProofs": [
      "0xF691f1eB28e3071d40d4fE5d5970b2f2EAdE2c68"
    ]
  }
}