{
  "openapi": "3.1.0",
  "info": {
    "title": "Canada Earthquake Alerts MCP",
    "description": "Recent earthquakes near any Canadian postal code.\n\nThis specification documents the HTTP x402 pay-per-call routes only (not the MCP /mcp transport). Unpaid calls return HTTP 402. Retry with an X-PAYMENT header (x402 v1, scheme exact, USDC on Base). A payout address is included only in the live 402 challenge served by the Worker, not in this file. MCP endpoint: https://ca-earthquake-alerts-mcp.donniertf.workers.dev/mcp. Manifest: https://ca-earthquake-alerts-mcp.donniertf.workers.dev/.well-known/x402. Paper/free discovery routes are not billed.",
    "version": "1.0.0",
    "contact": {
      "name": "Donnie Morrison",
      "email": "dmorrisonwebdesign@gmail.com",
      "url": "https://ca-earthquake-alerts-mcp.donniertf.workers.dev/"
    },
    "license": {
      "name": "See product landing page and source licences"
    },
    "x-guidance": "Use the paid HTTP routes documented in paths (POST JSON, or GET with query args). Unpaid calls return HTTP 402; retry with an X-PAYMENT header (x402, USDC on Base). The MCP transport is at /mcp. Recent earthquakes near any Canadian postal code."
  },
  "servers": [
    {
      "url": "https://ca-earthquake-alerts-mcp.donniertf.workers.dev",
      "description": "Canada Earthquake Alerts MCP origin"
    }
  ],
  "tags": [
    {
      "name": "x402",
      "description": "USDC on Base pay-per-call routes"
    }
  ],
  "paths": {
    "/x402/recent_quakes": {
      "post": {
        "summary": "FREE. Earthquakes in the last 30 days within 300 km of a Canadian postal code — top 3 by magnitude.",
        "description": "FREE. Earthquakes in the last 30 days within 300 km of a Canadian postal code — top 3 by magnitude.",
        "operationId": "post_x402_recent_quakes",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Paid request succeeded; JSON result of the tool or pack.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Retry with an X-PAYMENT header (x402 v1, exact scheme, USDC on Base). The 402 body/header lists price and terms; payout address is only in the live 402 challenge, not in this spec."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postal_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "postal_code"
                ]
              }
            }
          }
        }
      },
      "get": {
        "summary": "FREE. Earthquakes in the last 30 days within 300 km of a Canadian postal code — top 3 by magnitude. (query or 402 probe)",
        "description": "FREE. Earthquakes in the last 30 days within 300 km of a Canadian postal code — top 3 by magnitude. Accepts query args; unpaid calls return 402.",
        "operationId": "get_x402_recent_quakes",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Paid request succeeded; JSON result of the tool or pack.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Retry with an X-PAYMENT header (x402 v1, exact scheme, USDC on Base). The 402 body/header lists price and terms; payout address is only in the live 402 challenge, not in this spec."
          }
        },
        "parameters": [
          {
            "name": "postal_code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/x402/quake_search": {
      "post": {
        "summary": "PRO. Earthquakes near a postal code with custom radius (km, max 1000), days (max 365) and minimum magnitude.",
        "description": "PRO. Earthquakes near a postal code with custom radius (km, max 1000), days (max 365) and minimum magnitude.",
        "operationId": "post_x402_quake_search",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Paid request succeeded; JSON result of the tool or pack.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Retry with an X-PAYMENT header (x402 v1, exact scheme, USDC on Base). The 402 body/header lists price and terms; payout address is only in the live 402 challenge, not in this spec."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postal_code": {
                    "type": "string"
                  },
                  "radius_km": {
                    "type": "number"
                  },
                  "days": {
                    "type": "number"
                  },
                  "min_mag": {
                    "type": "number"
                  }
                },
                "required": [
                  "postal_code"
                ]
              }
            }
          }
        }
      },
      "get": {
        "summary": "PRO. Earthquakes near a postal code with custom radius (km, max 1000), days (max 365) and minimum magnitude. (query or 402 probe)",
        "description": "PRO. Earthquakes near a postal code with custom radius (km, max 1000), days (max 365) and minimum magnitude. Accepts query args; unpaid calls return 402.",
        "operationId": "get_x402_quake_search",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Paid request succeeded; JSON result of the tool or pack.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Retry with an X-PAYMENT header (x402 v1, exact scheme, USDC on Base). The 402 body/header lists price and terms; payout address is only in the live 402 challenge, not in this spec."
          }
        },
        "parameters": [
          {
            "name": "postal_code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "min_mag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ]
      }
    },
    "/x402/sites_check": {
      "post": {
        "summary": "PRO. Quake counts (last N days, default 90) within 200 km of up to 25 postal codes.",
        "description": "PRO. Quake counts (last N days, default 90) within 200 km of up to 25 postal codes.",
        "operationId": "post_x402_sites_check",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Paid request succeeded; JSON result of the tool or pack.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Retry with an X-PAYMENT header (x402 v1, exact scheme, USDC on Base). The 402 body/header lists price and terms; payout address is only in the live 402 challenge, not in this spec."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postal_codes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "days": {
                    "type": "number"
                  },
                  "min_mag": {
                    "type": "number"
                  }
                },
                "required": [
                  "postal_codes"
                ]
              }
            }
          }
        }
      },
      "get": {
        "summary": "PRO. Quake counts (last N days, default 90) within 200 km of up to 25 postal codes. (query or 402 probe)",
        "description": "PRO. Quake counts (last N days, default 90) within 200 km of up to 25 postal codes. Accepts query args; unpaid calls return 402.",
        "operationId": "get_x402_sites_check",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Paid request succeeded; JSON result of the tool or pack.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Retry with an X-PAYMENT header (x402 v1, exact scheme, USDC on Base). The 402 body/header lists price and terms; payout address is only in the live 402 challenge, not in this spec."
          }
        },
        "parameters": [
          {
            "name": "postal_codes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "min_mag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ]
      }
    }
  }
}